@envsemble/envui 2.0.0 → 3.0.1
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/CHANGELOG.md +258 -0
- package/README.md +14 -27
- package/dist/actions/Button.d.ts +25 -8
- package/dist/actions/Button.js.map +2 -2
- package/dist/actions/CommandPalette.d.ts +37 -9
- package/dist/actions/CommandPalette.js +111 -107
- package/dist/actions/CommandPalette.js.map +2 -2
- package/dist/actions/ConfirmButton.d.ts +1 -1
- package/dist/actions/ConfirmButton.js +2 -4
- package/dist/actions/ConfirmButton.js.map +2 -2
- package/dist/actions/ContextMenu.d.ts +1 -1
- package/dist/actions/ContextMenu.js +5 -6
- package/dist/actions/ContextMenu.js.map +2 -2
- package/dist/actions/CopyButton.js +2 -2
- package/dist/actions/CopyButton.js.map +2 -2
- package/dist/actions/Menubar.d.ts +12 -5
- package/dist/actions/Menubar.js +37 -29
- package/dist/actions/Menubar.js.map +3 -3
- package/dist/actions/Toolbar.d.ts +42 -2
- package/dist/actions/Toolbar.js +18 -0
- package/dist/actions/Toolbar.js.map +2 -2
- package/dist/actions/internal/ButtonBase.d.ts +3 -2
- package/dist/actions/internal/ButtonBase.js +2 -4
- package/dist/actions/internal/ButtonBase.js.map +2 -2
- package/dist/actions/internal/CommandPaletteOptions.d.ts +7 -6
- package/dist/actions/internal/CommandPaletteOptions.js +24 -15
- package/dist/actions/internal/CommandPaletteOptions.js.map +2 -2
- package/dist/actions/internal/CommandPaletteStatus.js +23 -9
- package/dist/actions/internal/CommandPaletteStatus.js.map +2 -2
- package/dist/actions/menu/Menu.d.ts +5 -4
- package/dist/actions/menu/Menu.js +3 -6
- package/dist/actions/menu/Menu.js.map +2 -2
- package/dist/actions/menu/MenuChoices.d.ts +9 -7
- package/dist/actions/menu/MenuChoices.js +34 -6
- package/dist/actions/menu/MenuChoices.js.map +2 -2
- package/dist/actions/menu/MenuItem.d.ts +37 -8
- package/dist/actions/menu/MenuItem.js +47 -12
- package/dist/actions/menu/MenuItem.js.map +2 -2
- package/dist/actions/menu/MenuSubmenu.d.ts +9 -3
- package/dist/actions/menu/MenuSubmenu.js +26 -24
- package/dist/actions/menu/MenuSubmenu.js.map +2 -2
- package/dist/actions/{internal → menu/internal}/MenuPopup.d.ts +2 -3
- package/dist/actions/{internal → menu/internal}/MenuPopup.js +7 -12
- package/dist/actions/menu/internal/MenuPopup.js.map +7 -0
- package/dist/actions/{internal → menu/internal}/menuOpenChange.d.ts +1 -1
- package/dist/actions/menu/internal/menuTriggerProps.d.ts +11 -0
- package/dist/actions/menu/internal/menuTriggerProps.js +1 -0
- package/dist/assets/readme/overview-dark.png +0 -0
- package/dist/assets/readme/overview-light.png +0 -0
- package/dist/content/Accordion.d.ts +32 -2
- package/dist/content/Accordion.js +41 -12
- package/dist/content/Accordion.js.map +2 -2
- package/dist/content/CodeBlock.d.ts +13 -4
- package/dist/content/CodeBlock.js +2 -0
- package/dist/content/CodeBlock.js.map +2 -2
- package/dist/content/CodeDiff.d.ts +34 -4
- package/dist/content/CodeDiff.js +41 -24
- package/dist/content/CodeDiff.js.map +2 -2
- package/dist/content/Composer.d.ts +19 -2
- package/dist/content/Composer.js +19 -12
- package/dist/content/Composer.js.map +2 -2
- package/dist/content/Disclosure.d.ts +13 -1
- package/dist/content/Disclosure.js +9 -3
- package/dist/content/Disclosure.js.map +2 -2
- package/dist/content/HighlightedCodeBlock.d.ts +1 -1
- package/dist/content/HighlightedCodeBlock.js +2 -0
- package/dist/content/HighlightedCodeBlock.js.map +2 -2
- package/dist/content/Kbd.d.ts +12 -5
- package/dist/content/Kbd.js +2 -2
- package/dist/content/Kbd.js.map +2 -2
- package/dist/content/Markdown.d.ts +17 -1
- package/dist/content/Markdown.js +26 -4
- package/dist/content/Markdown.js.map +2 -2
- package/dist/content/Message.d.ts +29 -33
- package/dist/content/Message.js +21 -21
- package/dist/content/Message.js.map +2 -2
- package/dist/content/countDiffLines.d.ts +1 -1
- package/dist/content/countDiffLines.js.map +1 -1
- package/dist/content/internal/CodeBlockFrame.d.ts +3 -2
- package/dist/content/internal/CodeBlockFrame.js +25 -13
- package/dist/content/internal/CodeBlockFrame.js.map +2 -2
- package/dist/content/internal/MessageListFollow.js +1 -1
- package/dist/content/internal/MessageListFollow.js.map +2 -2
- package/dist/content/internal/MessageStatusLabel.d.ts +2 -1
- package/dist/content/internal/MessageStatusLabel.js.map +2 -2
- package/dist/content/internal/codeColors.js +2 -2
- package/dist/content/internal/codeColors.js.map +2 -2
- package/dist/content/internal/useCodeContrast.js +4 -3
- package/dist/content/internal/useCodeContrast.js.map +2 -2
- package/dist/data-display/Avatar.d.ts +13 -4
- package/dist/data-display/Avatar.js +8 -4
- package/dist/data-display/Avatar.js.map +2 -2
- package/dist/data-display/AvatarButton.d.ts +20 -5
- package/dist/data-display/AvatarButton.js +17 -2
- package/dist/data-display/AvatarButton.js.map +2 -2
- package/dist/data-display/AvatarGroup.d.ts +28 -12
- package/dist/data-display/AvatarGroup.js +21 -32
- package/dist/data-display/AvatarGroup.js.map +2 -2
- package/dist/data-display/Badge.d.ts +11 -8
- package/dist/data-display/Badge.js +4 -3
- package/dist/data-display/Badge.js.map +2 -2
- package/dist/data-display/List.d.ts +21 -9
- package/dist/data-display/List.js +1 -1
- package/dist/data-display/List.js.map +2 -2
- package/dist/data-display/Meter.d.ts +7 -1
- package/dist/data-display/Meter.js +11 -5
- package/dist/data-display/Meter.js.map +2 -2
- package/dist/data-display/RelativeTime.d.ts +8 -2
- package/dist/data-display/RelativeTime.js +18 -7
- package/dist/data-display/RelativeTime.js.map +2 -2
- package/dist/data-display/Table.d.ts +26 -7
- package/dist/data-display/Table.js +70 -65
- package/dist/data-display/Table.js.map +2 -2
- package/dist/data-display/formatRelativeTime.d.ts +0 -2
- package/dist/data-display/formatRelativeTime.js +4 -28
- package/dist/data-display/formatRelativeTime.js.map +2 -2
- package/dist/data-display/internal/ListNaming.js +1 -1
- package/dist/data-display/internal/ListNaming.js.map +1 -1
- package/dist/data-display/internal/ReorderableList.d.ts +3 -2
- package/dist/data-display/internal/ReorderableList.js +11 -16
- package/dist/data-display/internal/ReorderableList.js.map +2 -2
- package/dist/data-display/internal/avatarName.d.ts +2 -0
- package/dist/data-display/internal/avatarName.js +7 -0
- package/dist/data-display/internal/avatarName.js.map +7 -0
- package/dist/data-display/internal/{ListRows.d.ts → listMarkup.d.ts} +1 -1
- package/dist/data-display/internal/{ListRows.js → listMarkup.js} +29 -15
- package/dist/data-display/internal/listMarkup.js.map +7 -0
- package/dist/data-display/internal/relativeTimeFormat.d.ts +3 -0
- package/dist/data-display/internal/relativeTimeFormat.js +12 -0
- package/dist/data-display/internal/relativeTimeFormat.js.map +7 -0
- package/dist/data-display/internal/reorderController.js +3 -3
- package/dist/data-display/internal/reorderController.js.map +2 -2
- package/dist/data-display/internal/reorderGeometry.d.ts +0 -1
- package/dist/data-display/internal/reorderGeometry.js +1 -10
- package/dist/data-display/internal/reorderGeometry.js.map +2 -2
- package/dist/data-display/internal/tableColumns.js +8 -9
- package/dist/data-display/internal/tableColumns.js.map +2 -2
- package/dist/{internal/react/useStackedReport.d.ts → data-display/internal/tableStacking.d.ts} +2 -0
- package/dist/data-display/internal/tableStacking.js +49 -0
- package/dist/data-display/internal/tableStacking.js.map +7 -0
- package/dist/data-display/internal/useReorder.js +1 -1
- package/dist/data-display/internal/useReorder.js.map +1 -1
- package/dist/diff.d.ts +1 -1
- package/dist/diff.js +1 -4
- package/dist/diff.js.map +2 -2
- package/dist/feedback/Alert.d.ts +13 -3
- package/dist/feedback/Alert.js +16 -6
- package/dist/feedback/Alert.js.map +2 -2
- package/dist/feedback/EmptyState.d.ts +12 -3
- package/dist/feedback/EmptyState.js +6 -6
- package/dist/feedback/EmptyState.js.map +2 -2
- package/dist/feedback/Halo.d.ts +27 -0
- package/dist/feedback/Halo.js +21 -0
- package/dist/feedback/Halo.js.map +7 -0
- package/dist/feedback/Progress.js +3 -2
- package/dist/feedback/Progress.js.map +2 -2
- package/dist/feedback/toast/ToastProvider.js +1 -1
- package/dist/feedback/toast/ToastProvider.js.map +1 -1
- package/dist/feedback/toast/internal/ContainedToast.d.ts +12 -0
- package/dist/feedback/toast/internal/ContainedToast.js +43 -0
- package/dist/feedback/toast/internal/ContainedToast.js.map +7 -0
- package/dist/feedback/toast/internal/{PictureNotice.d.ts → ContainedToastRoot.d.ts} +1 -1
- package/dist/feedback/toast/internal/{PictureNotice.js → ContainedToastRoot.js} +3 -3
- package/dist/feedback/toast/internal/ContainedToastRoot.js.map +7 -0
- package/dist/feedback/toast/internal/LiveToast.d.ts +10 -0
- package/dist/feedback/toast/internal/LiveToast.js +78 -0
- package/dist/feedback/toast/internal/LiveToast.js.map +7 -0
- package/dist/feedback/toast/internal/ToastBody.d.ts +2 -1
- package/dist/feedback/toast/internal/ToastBody.js +6 -2
- package/dist/feedback/toast/internal/ToastBody.js.map +2 -2
- package/dist/feedback/toast/internal/ToastButtons.d.ts +14 -0
- package/dist/feedback/toast/internal/ToastButtons.js +77 -0
- package/dist/feedback/toast/internal/ToastButtons.js.map +7 -0
- package/dist/feedback/toast/internal/ToastManagerContext.d.ts +3 -0
- package/dist/feedback/toast/internal/ToastManagerContext.js +7 -0
- package/dist/feedback/toast/internal/ToastManagerContext.js.map +7 -0
- package/dist/feedback/toast/internal/ToastRegion.js +43 -172
- package/dist/feedback/toast/internal/ToastRegion.js.map +2 -2
- package/dist/feedback/toast/internal/toastEntry.d.ts +9 -2
- package/dist/feedback/toast/internal/toastEntry.js +10 -1
- package/dist/feedback/toast/internal/toastEntry.js.map +2 -2
- package/dist/feedback/toast/internal/useToastController.d.ts +3 -3
- package/dist/feedback/toast/internal/useToastController.js +4 -2
- package/dist/feedback/toast/internal/useToastController.js.map +2 -2
- package/dist/feedback/toast/internal/useToastGlide.js +2 -1
- package/dist/feedback/toast/internal/useToastGlide.js.map +2 -2
- package/dist/feedback/toast/toastTypes.d.ts +38 -11
- package/dist/feedback/toast/useToast.d.ts +0 -2
- package/dist/feedback/toast/useToast.js +2 -3
- package/dist/feedback/toast/useToast.js.map +2 -2
- package/dist/forms/Calendar.d.ts +30 -11
- package/dist/forms/Calendar.js +19 -13
- package/dist/forms/Calendar.js.map +2 -2
- package/dist/forms/Checkbox.d.ts +7 -1
- package/dist/forms/Checkbox.js +33 -27
- package/dist/forms/Checkbox.js.map +2 -2
- package/dist/forms/Combobox.d.ts +4 -4
- package/dist/forms/Combobox.js +26 -146
- package/dist/forms/Combobox.js.map +2 -2
- package/dist/forms/DatePicker.d.ts +38 -11
- package/dist/forms/DatePicker.js +32 -52
- package/dist/forms/DatePicker.js.map +2 -2
- package/dist/forms/DropZone.d.ts +23 -4
- package/dist/forms/DropZone.js +29 -11
- package/dist/forms/DropZone.js.map +2 -2
- package/dist/forms/Field.d.ts +7 -1
- package/dist/forms/Field.js +13 -6
- package/dist/forms/Field.js.map +2 -2
- package/dist/forms/MonthPicker.d.ts +8 -1
- package/dist/forms/MonthPicker.js +22 -42
- package/dist/forms/MonthPicker.js.map +2 -2
- package/dist/forms/Radio.d.ts +15 -5
- package/dist/forms/Radio.js +20 -18
- package/dist/forms/Radio.js.map +2 -2
- package/dist/forms/SearchField.d.ts +13 -5
- package/dist/forms/SearchField.js +26 -21
- package/dist/forms/SearchField.js.map +2 -2
- package/dist/forms/SegmentedControl.d.ts +37 -8
- package/dist/forms/SegmentedControl.js +31 -25
- package/dist/forms/SegmentedControl.js.map +2 -2
- package/dist/forms/Select.d.ts +31 -6
- package/dist/forms/Select.js +43 -24
- package/dist/forms/Select.js.map +2 -2
- package/dist/forms/Slider.d.ts +12 -4
- package/dist/forms/Slider.js +32 -21
- package/dist/forms/Slider.js.map +2 -2
- package/dist/forms/Switch.d.ts +7 -1
- package/dist/forms/Switch.js +31 -25
- package/dist/forms/Switch.js.map +2 -2
- package/dist/forms/TextField.d.ts +5 -5
- package/dist/forms/TextField.js +20 -11
- package/dist/forms/TextField.js.map +2 -2
- package/dist/forms/Textarea.d.ts +1 -1
- package/dist/forms/Textarea.js +12 -2
- package/dist/forms/Textarea.js.map +2 -2
- package/dist/forms/TimePicker.d.ts +8 -1
- package/dist/forms/TimePicker.js +20 -45
- package/dist/forms/TimePicker.js.map +2 -2
- package/dist/forms/color/ColorPicker.d.ts +1 -1
- package/dist/forms/color/ColorPicker.js +29 -23
- package/dist/forms/color/ColorPicker.js.map +2 -2
- package/dist/forms/color/ColorPickerButton.d.ts +12 -2
- package/dist/forms/color/ColorPickerButton.js +37 -22
- package/dist/forms/color/ColorPickerButton.js.map +2 -2
- package/dist/forms/color/ColorSwatch.js +2 -2
- package/dist/forms/color/ColorSwatch.js.map +2 -2
- package/dist/forms/color/internal/{colorChange.js → ColorChangeContext.js} +1 -1
- package/dist/forms/color/internal/{colorChange.js.map → ColorChangeContext.js.map} +1 -1
- package/dist/forms/color/internal/ColorLocale.d.ts +0 -3
- package/dist/forms/color/internal/ColorLocale.js +2 -8
- package/dist/forms/color/internal/ColorLocale.js.map +2 -2
- package/dist/forms/color/internal/ColorValues.d.ts +1 -1
- package/dist/forms/color/internal/ColorValues.js +2 -2
- package/dist/forms/color/internal/ColorValues.js.map +2 -2
- package/dist/forms/color/internal/SwatchList.js +6 -9
- package/dist/forms/color/internal/SwatchList.js.map +2 -2
- package/dist/forms/color/internal/colorPickerValueProps.d.ts +12 -0
- package/dist/forms/color/internal/colorValue.d.ts +1 -0
- package/dist/forms/color/internal/colorValue.js +5 -0
- package/dist/forms/color/internal/colorValue.js.map +2 -2
- package/dist/forms/color/internal/useColorFollowingValue.d.ts +7 -0
- package/dist/forms/color/internal/useColorFollowingValue.js +15 -0
- package/dist/forms/color/internal/useColorFollowingValue.js.map +7 -0
- package/dist/forms/color/internal/useFormResetting.d.ts +9 -0
- package/dist/forms/color/internal/useFormResetting.js +36 -0
- package/dist/forms/color/internal/useFormResetting.js.map +7 -0
- package/dist/forms/color/internal/useSwatchFocus.d.ts +17 -0
- package/dist/forms/color/internal/useSwatchFocus.js +62 -0
- package/dist/forms/color/internal/useSwatchFocus.js.map +7 -0
- package/dist/forms/internal/ComboboxField.d.ts +30 -0
- package/dist/forms/internal/ComboboxField.js +147 -0
- package/dist/forms/internal/ComboboxField.js.map +7 -0
- package/dist/forms/internal/ComboboxPopup.d.ts +2 -2
- package/dist/forms/internal/ComboboxPopup.js +8 -16
- package/dist/forms/internal/ComboboxPopup.js.map +2 -2
- package/dist/forms/internal/MonthGrid.d.ts +1 -1
- package/dist/forms/internal/MonthGrid.js +4 -4
- package/dist/forms/internal/MonthGrid.js.map +2 -2
- package/dist/forms/internal/PickerField.d.ts +32 -27
- package/dist/forms/internal/PickerField.js +70 -52
- package/dist/forms/internal/PickerField.js.map +3 -3
- package/dist/forms/internal/PickerPopup.d.ts +2 -1
- package/dist/forms/internal/PickerPopup.js +3 -0
- package/dist/forms/internal/PickerPopup.js.map +2 -2
- package/dist/forms/internal/TimeList.d.ts +1 -1
- package/dist/forms/internal/TimeList.js +4 -4
- package/dist/forms/internal/TimeList.js.map +2 -2
- package/dist/forms/internal/TimeWheel.d.ts +3 -3
- package/dist/forms/internal/TimeWheel.js +5 -5
- package/dist/forms/internal/TimeWheel.js.map +2 -2
- package/dist/{internal/time → forms/internal}/calendarDays.d.ts +1 -0
- package/dist/{internal/time → forms/internal}/calendarDays.js +5 -1
- package/dist/forms/internal/calendarDays.js.map +7 -0
- package/dist/forms/internal/comboboxItems.d.ts +15 -4
- package/dist/forms/internal/comboboxItems.js +0 -12
- package/dist/forms/internal/comboboxItems.js.map +3 -3
- package/dist/forms/internal/pickerFocus.d.ts +4 -0
- package/dist/forms/internal/pickerFocus.js +13 -0
- package/dist/forms/internal/pickerFocus.js.map +7 -0
- package/dist/forms/internal/timeWheelRows.d.ts +4 -4
- package/dist/forms/internal/timeWheelRows.js +6 -4
- package/dist/forms/internal/timeWheelRows.js.map +2 -2
- package/dist/forms/internal/useComboboxOpen.js +2 -5
- package/dist/forms/internal/useComboboxOpen.js.map +2 -2
- package/dist/forms/internal/useComboboxOptions.js +3 -4
- package/dist/forms/internal/useComboboxOptions.js.map +2 -2
- package/dist/forms/internal/useComboboxSelection.d.ts +1 -1
- package/dist/forms/internal/usePicker.d.ts +29 -0
- package/dist/forms/internal/usePicker.js +38 -0
- package/dist/forms/internal/usePicker.js.map +7 -0
- package/dist/forms/internal/usePickerFormatter.d.ts +4 -0
- package/dist/forms/internal/usePickerFormatter.js +23 -0
- package/dist/forms/internal/usePickerFormatter.js.map +7 -0
- package/dist/forms/internal/useTimeWheelTurn.d.ts +2 -2
- package/dist/forms/internal/useTimeWheelTurn.js +7 -7
- package/dist/forms/internal/useTimeWheelTurn.js.map +2 -2
- package/dist/foundations/PortalContainer.js +1 -1
- package/dist/foundations/PortalContainer.js.map +1 -1
- package/dist/foundations/Theme.d.ts +9 -2
- package/dist/foundations/Theme.js +24 -19
- package/dist/foundations/Theme.js.map +2 -2
- package/dist/foundations/ThemeMenuRadioGroup.d.ts +13 -6
- package/dist/foundations/ThemeMenuRadioGroup.js +6 -11
- package/dist/foundations/ThemeMenuRadioGroup.js.map +2 -2
- package/dist/foundations/ThemePreferenceProvider.d.ts +48 -0
- package/dist/foundations/{ThemePreference.js → ThemePreferenceProvider.js} +48 -106
- package/dist/foundations/ThemePreferenceProvider.js.map +7 -0
- package/dist/foundations/ThemeToggle.d.ts +9 -2
- package/dist/foundations/ThemeToggle.js +3 -2
- package/dist/foundations/ThemeToggle.js.map +2 -2
- package/dist/foundations/internal/ThemePreferenceContext.d.ts +4 -4
- package/dist/foundations/internal/ThemePreferenceContext.js.map +1 -1
- package/dist/foundations/internal/storedPreference.d.ts +3 -0
- package/dist/foundations/internal/storedPreference.js +8 -0
- package/dist/foundations/internal/storedPreference.js.map +7 -0
- package/dist/foundations/messages/defaultMessages.d.ts +4 -72
- package/dist/foundations/messages/defaultMessages.js +0 -14
- package/dist/foundations/messages/defaultMessages.js.map +2 -2
- package/dist/foundations/messages/list.d.ts +13 -35
- package/dist/foundations/messages/list.js +1 -5
- package/dist/foundations/messages/list.js.map +2 -2
- package/dist/foundations/messages/message.d.ts +1 -1
- package/dist/foundations/messages/message.js +1 -1
- package/dist/foundations/messages/message.js.map +1 -1
- package/dist/foundations/messages/navigation.d.ts +4 -0
- package/dist/foundations/messages/navigation.js +2 -0
- package/dist/foundations/messages/navigation.js.map +2 -2
- package/dist/foundations/themeBootstrap.d.ts +13 -35
- package/dist/foundations/themeBootstrap.js +4 -35
- package/dist/foundations/themeBootstrap.js.map +2 -2
- package/dist/foundations/themeStorage.d.ts +20 -0
- package/dist/foundations/themeStorage.js +12 -0
- package/dist/foundations/themeStorage.js.map +7 -0
- package/dist/foundations/useContainerSize.js +13 -11
- package/dist/foundations/useContainerSize.js.map +2 -2
- package/dist/foundations/useSkeleton.d.ts +5 -0
- package/dist/foundations/useSkeleton.js +10 -0
- package/dist/foundations/useSkeleton.js.map +7 -0
- package/dist/foundations/useStoredThemePreference.d.ts +16 -0
- package/dist/foundations/useStoredThemePreference.js +63 -0
- package/dist/foundations/useStoredThemePreference.js.map +7 -0
- package/dist/foundations/windowClasses.d.ts +0 -2
- package/dist/foundations/windowClasses.js +1 -4
- package/dist/foundations/windowClasses.js.map +2 -2
- package/dist/index.d.ts +15 -20
- package/dist/index.js +16 -36
- package/dist/index.js.map +2 -2
- package/dist/internal/control/ActionElement.d.ts +3 -2
- package/dist/internal/control/ActionElement.js +8 -0
- package/dist/internal/control/ActionElement.js.map +2 -2
- package/dist/internal/dialog/ModalLayer.d.ts +9 -0
- package/dist/internal/dialog/ModalLayer.js +32 -0
- package/dist/internal/dialog/ModalLayer.js.map +7 -0
- package/dist/internal/dom/idRefs.d.ts +2 -0
- package/dist/internal/dom/idRefs.js +7 -0
- package/dist/internal/dom/idRefs.js.map +7 -0
- package/dist/internal/dom/lengths.d.ts +3 -1
- package/dist/internal/dom/lengths.js +7 -2
- package/dist/internal/dom/lengths.js.map +2 -2
- package/dist/internal/dom/observeResize.d.ts +7 -0
- package/dist/internal/dom/observeResize.js +11 -0
- package/dist/internal/dom/observeResize.js.map +7 -0
- package/dist/internal/dom/verticalScrollerOf.d.ts +5 -0
- package/dist/internal/dom/verticalScrollerOf.js +12 -0
- package/dist/internal/dom/verticalScrollerOf.js.map +7 -0
- package/dist/internal/field/FieldFrame.d.ts +2 -61
- package/dist/internal/field/FieldFrame.js +17 -8
- package/dist/internal/field/FieldFrame.js.map +2 -2
- package/dist/internal/field/{rowControl.d.ts → RowControl.d.ts} +2 -2
- package/dist/internal/field/{rowControl.js → RowControl.js} +4 -7
- package/dist/internal/field/RowControl.js.map +7 -0
- package/dist/internal/field/TextareaControl.d.ts +2 -2
- package/dist/internal/field/TextareaControl.js +5 -11
- package/dist/internal/field/TextareaControl.js.map +2 -2
- package/dist/internal/field/{TextareaResizeEdge.d.ts → TextareaResizeHandle.d.ts} +1 -1
- package/dist/internal/field/{TextareaResizeEdge.js → TextareaResizeHandle.js} +10 -11
- package/dist/internal/field/TextareaResizeHandle.js.map +7 -0
- package/dist/internal/field/fieldProps.d.ts +67 -0
- package/dist/internal/field/fieldProps.js +1 -0
- package/dist/internal/field/fieldProps.js.map +7 -0
- package/dist/internal/field/fieldSizing.d.ts +1 -0
- package/dist/internal/field/fieldSizing.js +5 -0
- package/dist/internal/field/fieldSizing.js.map +7 -0
- package/dist/internal/field/useFieldControl.d.ts +36 -0
- package/dist/internal/field/useFieldControl.js +53 -0
- package/dist/internal/field/useFieldControl.js.map +7 -0
- package/dist/internal/field/useFormReset.js +1 -1
- package/dist/internal/field/useFormReset.js.map +1 -1
- package/dist/internal/icon/DecorativeIcon.d.ts +2 -1
- package/dist/internal/icon/DecorativeIcon.js +6 -2
- package/dist/internal/icon/DecorativeIcon.js.map +2 -2
- package/dist/internal/layout/Slot.d.ts +2 -1
- package/dist/internal/layout/Slot.js +3 -1
- package/dist/internal/layout/Slot.js.map +2 -2
- package/dist/internal/popup/ListRow.d.ts +39 -0
- package/dist/internal/{list → popup}/ListRow.js +15 -7
- package/dist/internal/popup/ListRow.js.map +7 -0
- package/dist/internal/popup/PopupSurface.d.ts +1 -1
- package/dist/internal/popup/PopupSurface.js +3 -6
- package/dist/internal/popup/PopupSurface.js.map +2 -2
- package/dist/internal/popup/TooltipPopup.d.ts +3 -9
- package/dist/internal/popup/TooltipPopup.js +2 -9
- package/dist/internal/popup/TooltipPopup.js.map +2 -2
- package/dist/internal/popup/{PortalContainerContext.d.ts → containedOverlays.d.ts} +2 -14
- package/dist/internal/popup/{PortalContainerContext.js → containedOverlays.js} +7 -13
- package/dist/internal/popup/containedOverlays.js.map +7 -0
- package/dist/internal/popup/listEntries.d.ts +13 -0
- package/dist/internal/popup/listEntries.js +11 -0
- package/dist/internal/popup/listEntries.js.map +7 -0
- package/dist/internal/popup/useCutShort.d.ts +6 -0
- package/dist/internal/popup/useCutShort.js +19 -0
- package/dist/internal/popup/useCutShort.js.map +7 -0
- package/dist/internal/provider/PortalContainerContext.d.ts +14 -0
- package/dist/internal/provider/PortalContainerContext.js +11 -0
- package/dist/internal/provider/PortalContainerContext.js.map +7 -0
- package/dist/internal/provider/formatters.d.ts +17 -0
- package/dist/internal/provider/formatters.js +21 -0
- package/dist/internal/provider/formatters.js.map +7 -0
- package/dist/internal/provider/locale.d.ts +4 -4
- package/dist/internal/provider/locale.js +9 -1
- package/dist/internal/provider/locale.js.map +2 -2
- package/dist/internal/provider/useDirection.d.ts +1 -1
- package/dist/internal/provider/useDirection.js +2 -14
- package/dist/internal/provider/useDirection.js.map +2 -2
- package/dist/internal/provider/useFormatters.d.ts +1 -16
- package/dist/internal/provider/useFormatters.js +3 -26
- package/dist/internal/provider/useFormatters.js.map +2 -2
- package/dist/internal/rangeBarProps.d.ts +6 -2
- package/dist/internal/react/chainHandlers.d.ts +6 -0
- package/dist/internal/react/chainHandlers.js +12 -0
- package/dist/internal/react/chainHandlers.js.map +7 -0
- package/dist/internal/react/renderElement.js +2 -14
- package/dist/internal/react/renderElement.js.map +2 -2
- package/dist/internal/react/rendersContent.d.ts +2 -0
- package/dist/internal/react/rendersContent.js +7 -0
- package/dist/internal/react/rendersContent.js.map +7 -0
- package/dist/internal/react/setRef.d.ts +6 -1
- package/dist/internal/react/setRef.js +13 -0
- package/dist/internal/react/setRef.js.map +2 -2
- package/dist/internal/react/useControllableState.js +1 -1
- package/dist/internal/react/useControllableState.js.map +1 -1
- package/dist/internal/{useCopy.js.map → react/useCopy.js.map} +1 -1
- package/dist/internal/{useLatest.js.map → react/useLatest.js.map} +1 -1
- package/dist/internal/react/useMergedRefs.d.ts +3 -0
- package/dist/internal/react/useMergedRefs.js +10 -0
- package/dist/internal/react/useMergedRefs.js.map +7 -0
- package/dist/internal/resize/useResizableWidth.d.ts +4 -16
- package/dist/internal/resize/useResizableWidth.js +5 -17
- package/dist/internal/resize/useResizableWidth.js.map +2 -2
- package/dist/internal/sizeTokens.d.ts +13 -0
- package/dist/internal/sizeTokens.js +15 -0
- package/dist/internal/sizeTokens.js.map +7 -0
- package/dist/internal/skeleton/SkeletonContext.d.ts +2 -0
- package/dist/internal/skeleton/SkeletonContext.js +7 -0
- package/dist/internal/skeleton/SkeletonContext.js.map +7 -0
- package/dist/{foundations → internal/skeleton}/SkeletonScope.d.ts +0 -10
- package/dist/{foundations → internal/skeleton}/SkeletonScope.js +6 -11
- package/dist/internal/skeleton/SkeletonScope.js.map +7 -0
- package/dist/internal/{skeleton.d.ts → skeleton/skeleton.d.ts} +1 -3
- package/dist/internal/{skeleton.js → skeleton/skeleton.js} +1 -2
- package/dist/internal/skeleton/skeleton.js.map +7 -0
- package/dist/{foundations/internal → internal/skeleton}/skeletonText.js +5 -5
- package/dist/internal/skeleton/skeletonText.js.map +7 -0
- package/dist/internal/text/labelText.d.ts +15 -0
- package/dist/internal/text/labelText.js +34 -0
- package/dist/internal/text/labelText.js.map +7 -0
- package/dist/internal/text/useRenderedText.d.ts +3 -0
- package/dist/internal/text/useRenderedText.js +19 -0
- package/dist/internal/text/useRenderedText.js.map +7 -0
- package/dist/internal/theme/themeRoot.d.ts +27 -0
- package/dist/internal/theme/themeRoot.js +45 -0
- package/dist/internal/theme/themeRoot.js.map +7 -0
- package/dist/internal/typeahead.d.ts +9 -5
- package/dist/internal/typeahead.js +4 -1
- package/dist/internal/typeahead.js.map +2 -2
- package/dist/layout/Card.d.ts +21 -4
- package/dist/layout/Card.js +12 -6
- package/dist/layout/Card.js.map +2 -2
- package/dist/layout/Layout.d.ts +2 -2
- package/dist/layout/Layout.js.map +1 -1
- package/dist/layout/Page.d.ts +2 -2
- package/dist/layout/Page.js.map +1 -1
- package/dist/layout/PageHeader.d.ts +6 -1
- package/dist/layout/PageHeader.js +3 -1
- package/dist/layout/PageHeader.js.map +2 -2
- package/dist/layout/Panes.d.ts +10 -20
- package/dist/layout/Panes.js +5 -25
- package/dist/layout/Panes.js.map +2 -2
- package/dist/layout/ResizeHandle.d.ts +1 -0
- package/dist/layout/ResizeHandle.js +11 -21
- package/dist/layout/ResizeHandle.js.map +2 -2
- package/dist/layout/Scaffold.d.ts +14 -4
- package/dist/layout/Scaffold.js +16 -51
- package/dist/layout/Scaffold.js.map +2 -2
- package/dist/layout/Surface.d.ts +1 -1
- package/dist/layout/Surface.js +4 -1
- package/dist/layout/Surface.js.map +2 -2
- package/dist/layout/TopBar.d.ts +2 -2
- package/dist/layout/TopBar.js +4 -5
- package/dist/layout/TopBar.js.map +2 -2
- package/dist/layout/internal/LoadingBar.d.ts +3 -7
- package/dist/layout/internal/LoadingBar.js +5 -10
- package/dist/layout/internal/LoadingBar.js.map +2 -2
- package/dist/layout/internal/PageTitleFocus.d.ts +0 -9
- package/dist/layout/internal/PageTitleFocus.js +3 -24
- package/dist/layout/internal/PageTitleFocus.js.map +2 -2
- package/dist/layout/internal/StickyHeaderSize.js +3 -3
- package/dist/layout/internal/StickyHeaderSize.js.map +2 -2
- package/dist/layout/internal/{navigationForms.d.ts → scaffold/navigationForms.d.ts} +2 -2
- package/dist/layout/internal/scaffold/navigationForms.js.map +7 -0
- package/dist/layout/internal/{scaffoldFocus.js.map → scaffold/scaffoldFocus.js.map} +1 -1
- package/dist/layout/internal/{scrollKeys.js → scaffold/scrollKeys.js} +1 -1
- package/dist/layout/internal/scaffold/scrollKeys.js.map +7 -0
- package/dist/layout/internal/scaffold/useBarSizes.d.ts +6 -0
- package/dist/layout/internal/scaffold/useBarSizes.js +54 -0
- package/dist/layout/internal/scaffold/useBarSizes.js.map +7 -0
- package/dist/layout/internal/{useNavigationFocusHandoff.js → scaffold/useNavigationFocusHandoff.js} +5 -4
- package/dist/layout/internal/scaffold/useNavigationFocusHandoff.js.map +7 -0
- package/dist/layout/internal/{useScrollKeys.js → scaffold/useScrollKeys.js} +1 -1
- package/dist/layout/internal/scaffold/useScrollKeys.js.map +7 -0
- package/dist/layout/internal/scaffoldPages.d.ts +9 -0
- package/dist/layout/internal/scaffoldPages.js +27 -0
- package/dist/layout/internal/scaffoldPages.js.map +7 -0
- package/dist/markdown.d.ts +0 -1
- package/dist/markdown.js +0 -1
- package/dist/markdown.js.map +2 -2
- package/dist/messages.d.ts +1 -1
- package/dist/messages.js +1 -6
- package/dist/messages.js.map +2 -2
- package/dist/navigation/Breadcrumbs.d.ts +15 -4
- package/dist/navigation/Breadcrumbs.js +36 -27
- package/dist/navigation/Breadcrumbs.js.map +2 -2
- package/dist/navigation/DocumentTabs.d.ts +54 -12
- package/dist/navigation/DocumentTabs.js +50 -150
- package/dist/navigation/DocumentTabs.js.map +3 -3
- package/dist/navigation/NavigationBar.d.ts +10 -3
- package/dist/navigation/NavigationBar.js +75 -35
- package/dist/navigation/NavigationBar.js.map +2 -2
- package/dist/navigation/NavigationDrawer.d.ts +9 -3
- package/dist/navigation/NavigationDrawer.js +24 -217
- package/dist/navigation/NavigationDrawer.js.map +2 -2
- package/dist/navigation/NavigationRail.d.ts +10 -3
- package/dist/navigation/NavigationRail.js +20 -10
- package/dist/navigation/NavigationRail.js.map +2 -2
- package/dist/navigation/Pager.d.ts +25 -11
- package/dist/navigation/Pager.js +49 -12
- package/dist/navigation/Pager.js.map +3 -3
- package/dist/navigation/Pagination.d.ts +24 -9
- package/dist/navigation/Pagination.js +37 -11
- package/dist/navigation/Pagination.js.map +2 -2
- package/dist/navigation/TableOfContents.d.ts +18 -4
- package/dist/navigation/TableOfContents.js +41 -121
- package/dist/navigation/TableOfContents.js.map +2 -2
- package/dist/navigation/Tree.d.ts +28 -11
- package/dist/navigation/Tree.js +41 -37
- package/dist/navigation/Tree.js.map +2 -2
- package/dist/navigation/destinations.d.ts +43 -11
- package/dist/navigation/internal/DestinationItem.d.ts +5 -41
- package/dist/navigation/internal/DestinationItem.js +41 -44
- package/dist/navigation/internal/DestinationItem.js.map +2 -2
- package/dist/navigation/internal/destinationModel.d.ts +16 -0
- package/dist/navigation/internal/destinationModel.js +28 -0
- package/dist/navigation/internal/destinationModel.js.map +7 -0
- package/dist/navigation/internal/documentTabs/DocumentTab.d.ts +12 -0
- package/dist/navigation/internal/documentTabs/DocumentTab.js +122 -0
- package/dist/navigation/internal/documentTabs/DocumentTab.js.map +7 -0
- package/dist/navigation/internal/documentTabs/tabMenuContent.d.ts +21 -0
- package/dist/navigation/internal/documentTabs/tabMenuContent.js +73 -0
- package/dist/navigation/internal/documentTabs/tabMenuContent.js.map +7 -0
- package/dist/navigation/internal/documentTabs/tabStrip.d.ts +7 -0
- package/dist/navigation/internal/documentTabs/tabStrip.js +26 -0
- package/dist/navigation/internal/documentTabs/tabStrip.js.map +7 -0
- package/dist/navigation/internal/{useTabCloseFocus.js → documentTabs/useTabCloseFocus.js} +2 -2
- package/dist/navigation/internal/documentTabs/useTabCloseFocus.js.map +7 -0
- package/dist/navigation/internal/{useTabDrag.d.ts → documentTabs/useTabDrag.d.ts} +3 -3
- package/dist/navigation/internal/{useTabDrag.js → documentTabs/useTabDrag.js} +8 -8
- package/dist/navigation/internal/documentTabs/useTabDrag.js.map +7 -0
- package/dist/navigation/internal/{useTabStripScrolling.js → documentTabs/useTabStripScrolling.js} +22 -3
- package/dist/navigation/internal/documentTabs/useTabStripScrolling.js.map +7 -0
- package/dist/navigation/internal/landmarkLabel.d.ts +1 -0
- package/dist/navigation/internal/landmarkLabel.js +5 -0
- package/dist/navigation/internal/landmarkLabel.js.map +7 -0
- package/dist/navigation/internal/navigationDrawer/DrawerRows.d.ts +18 -0
- package/dist/navigation/internal/navigationDrawer/DrawerRows.js +151 -0
- package/dist/navigation/internal/navigationDrawer/DrawerRows.js.map +7 -0
- package/dist/navigation/internal/navigationDrawer/destinationSections.d.ts +13 -0
- package/dist/navigation/internal/navigationDrawer/destinationSections.js +13 -0
- package/dist/navigation/internal/navigationDrawer/destinationSections.js.map +7 -0
- package/dist/navigation/internal/navigationDrawer/useExpandedSections.d.ts +6 -0
- package/dist/navigation/internal/navigationDrawer/useExpandedSections.js +57 -0
- package/dist/navigation/internal/navigationDrawer/useExpandedSections.js.map +7 -0
- package/dist/navigation/internal/tableOfContents/contentsOutline.d.ts +26 -0
- package/dist/navigation/internal/tableOfContents/contentsOutline.js +38 -0
- package/dist/navigation/internal/tableOfContents/contentsOutline.js.map +7 -0
- package/dist/navigation/internal/{contentsWave.js → tableOfContents/contentsWave.js} +1 -1
- package/dist/navigation/internal/tableOfContents/contentsWave.js.map +7 -0
- package/dist/navigation/internal/tableOfContents/readingPosition.d.ts +25 -0
- package/dist/navigation/internal/{contentsOutline.js → tableOfContents/readingPosition.js} +2 -37
- package/dist/navigation/internal/tableOfContents/readingPosition.js.map +7 -0
- package/dist/navigation/internal/{sectionScroll.d.ts → tableOfContents/sectionScroll.d.ts} +6 -1
- package/dist/navigation/internal/{sectionScroll.js → tableOfContents/sectionScroll.js} +18 -10
- package/dist/navigation/internal/tableOfContents/sectionScroll.js.map +7 -0
- package/dist/navigation/internal/{useContentsHeadings.d.ts → tableOfContents/useContentsHeadings.d.ts} +2 -2
- package/dist/navigation/internal/{useContentsHeadings.js → tableOfContents/useContentsHeadings.js} +4 -7
- package/dist/navigation/internal/tableOfContents/useContentsHeadings.js.map +7 -0
- package/dist/navigation/internal/tableOfContents/useReadingPlace.d.ts +15 -0
- package/dist/navigation/internal/tableOfContents/useReadingPlace.js +119 -0
- package/dist/navigation/internal/tableOfContents/useReadingPlace.js.map +7 -0
- package/dist/navigation/internal/{waveDrawer.js → tableOfContents/waveDrawer.js} +5 -4
- package/dist/navigation/internal/tableOfContents/waveDrawer.js.map +7 -0
- package/dist/navigation/internal/{TreeRow.d.ts → tree/TreeRow.d.ts} +1 -1
- package/dist/navigation/internal/{TreeRow.js → tree/TreeRow.js} +9 -5
- package/dist/navigation/internal/tree/TreeRow.js.map +7 -0
- package/dist/navigation/internal/{treeModel.d.ts → tree/treeModel.d.ts} +7 -9
- package/dist/navigation/internal/{treeModel.js → tree/treeModel.js} +10 -13
- package/dist/navigation/internal/tree/treeModel.js.map +7 -0
- package/dist/navigation/internal/{useTreeTransitions.d.ts → tree/useTreeTransitions.d.ts} +1 -1
- package/dist/navigation/internal/tree/useTreeTransitions.js.map +7 -0
- package/dist/navigation/internal/{useTreeViewport.d.ts → tree/useTreeViewport.d.ts} +3 -3
- package/dist/navigation/internal/{useTreeViewport.js → tree/useTreeViewport.js} +11 -12
- package/dist/navigation/internal/tree/useTreeViewport.js.map +7 -0
- package/dist/navigation/internal/useLabelText.d.ts +6 -0
- package/dist/navigation/internal/useLabelText.js +11 -0
- package/dist/navigation/internal/useLabelText.js.map +7 -0
- package/dist/navigation/navigationBackground.d.ts +0 -2
- package/dist/navigation/navigationBackground.js +0 -6
- package/dist/navigation/navigationBackground.js.map +3 -3
- package/dist/overlays/ConfirmDialog.d.ts +6 -3
- package/dist/overlays/ConfirmDialog.js +64 -68
- package/dist/overlays/ConfirmDialog.js.map +2 -2
- package/dist/overlays/Dialog.d.ts +40 -6
- package/dist/overlays/Dialog.js +69 -41
- package/dist/overlays/Dialog.js.map +2 -2
- package/dist/overlays/HoverCard.d.ts +9 -2
- package/dist/overlays/HoverCard.js +5 -5
- package/dist/overlays/HoverCard.js.map +2 -2
- package/dist/overlays/Popover.d.ts +20 -5
- package/dist/overlays/Popover.js +8 -6
- package/dist/overlays/Popover.js.map +2 -2
- package/dist/overlays/Sheet.d.ts +16 -3
- package/dist/overlays/Sheet.js +88 -87
- package/dist/overlays/Sheet.js.map +2 -2
- package/dist/overlays/Tooltip.d.ts +7 -0
- package/dist/overlays/Tooltip.js +10 -15
- package/dist/overlays/Tooltip.js.map +2 -2
- package/dist/overlays/internal/accessibleName.js +2 -1
- package/dist/overlays/internal/accessibleName.js.map +2 -2
- package/dist/overlays/internal/dialog/DialogHeadingClose.d.ts +8 -0
- package/dist/overlays/internal/dialog/DialogHeadingClose.js +19 -0
- package/dist/overlays/internal/dialog/DialogHeadingClose.js.map +7 -0
- package/dist/overlays/internal/dialog/DialogParts.d.ts +33 -0
- package/dist/overlays/internal/dialog/DialogParts.js +64 -0
- package/dist/overlays/internal/dialog/DialogParts.js.map +7 -0
- package/dist/overlays/internal/{DialogPendingAction.d.ts → dialog/dialogPending.d.ts} +8 -0
- package/dist/overlays/internal/{DialogPendingAction.js → dialog/dialogPending.js} +13 -2
- package/dist/overlays/internal/dialog/dialogPending.js.map +7 -0
- package/dist/styles/Accordion.css +1 -1
- package/dist/styles/Alert.css +1 -1
- package/dist/styles/Avatar.css +1 -1
- package/dist/styles/Badge.css +1 -1
- package/dist/styles/Base.css +1 -1
- package/dist/styles/Breadcrumbs.css +1 -1
- package/dist/styles/Card.css +1 -1
- package/dist/styles/Checkbox.css +1 -1
- package/dist/styles/Code.css +1 -1
- package/dist/styles/Combobox.css +1 -1
- package/dist/styles/CommandPalette.css +1 -1
- package/dist/styles/Composer.css +1 -1
- package/dist/styles/CopyButton.css +1 -1
- package/dist/styles/Dialog.css +1 -1
- package/dist/styles/Disclosure.css +1 -1
- package/dist/styles/DocumentTabs.css +1 -1
- package/dist/styles/DropZone.css +1 -1
- package/dist/styles/EmptyState.css +1 -1
- package/dist/styles/Halo.css +1 -0
- package/dist/styles/List.css +1 -1
- package/dist/styles/ListRow.css +1 -1
- package/dist/styles/LoadingBar.css +1 -1
- package/dist/styles/Menu.css +1 -1
- package/dist/styles/Message.css +1 -1
- package/dist/styles/Meter.css +1 -1
- package/dist/styles/NavigationBar.css +1 -1
- package/dist/styles/NavigationDestinations.css +1 -0
- package/dist/styles/NavigationDrawer.css +1 -1
- package/dist/styles/NavigationRail.css +1 -1
- package/dist/styles/Pager.css +1 -1
- package/dist/styles/Panes.css +1 -1
- package/dist/styles/Progress.css +1 -0
- package/dist/styles/Radio.css +1 -1
- package/dist/styles/Scaffold.css +1 -1
- package/dist/styles/SegmentedControl.css +1 -1
- package/dist/styles/Select.css +1 -1
- package/dist/styles/Switch.css +1 -1
- package/dist/styles/Table.css +1 -1
- package/dist/styles/TableOfContents.css +1 -1
- package/dist/styles/Text.css +1 -1
- package/dist/styles/TextField.css +1 -1
- package/dist/styles/Toast.css +1 -1
- package/dist/styles/Toolbar.css +1 -1
- package/dist/styles/Tree.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/theme-bootstrap.d.ts +1 -1
- package/dist/theme-bootstrap.js +1 -8
- package/dist/theme-bootstrap.js.map +2 -2
- package/dist/theme-storage.d.ts +2 -0
- package/dist/theme-storage.js +3 -0
- package/dist/theme-storage.js.map +7 -0
- package/dist/tokens.json +0 -13
- package/docs/components/accordion.md +13 -0
- package/docs/components/alert.md +8 -1
- package/docs/components/avatar.md +16 -4
- package/docs/components/badge.md +10 -39
- package/docs/components/box.md +3 -3
- package/docs/components/breadcrumbs.md +6 -1
- package/docs/components/button.md +14 -9
- package/docs/components/card.md +14 -5
- package/docs/components/checkbox.md +3 -1
- package/docs/components/code.md +15 -6
- package/docs/components/color-picker.md +10 -2
- package/docs/components/column.md +2 -2
- package/docs/components/combobox.md +1 -1
- package/docs/components/command-palette.md +6 -2
- package/docs/components/composer.md +19 -8
- package/docs/components/confirm-dialog.md +3 -3
- package/docs/components/date-picker.md +15 -3
- package/docs/components/description-list.md +1 -1
- package/docs/components/dialog.md +34 -8
- package/docs/components/disclosure.md +4 -0
- package/docs/components/document-tabs.md +23 -13
- package/docs/components/drop-zone.md +10 -1
- package/docs/components/empty-state.md +12 -3
- package/docs/components/field.md +2 -1
- package/docs/components/graphic.md +1 -1
- package/docs/components/grid.md +2 -2
- package/docs/components/halo.md +80 -0
- package/docs/components/hover-card.md +2 -1
- package/docs/components/kbd.md +8 -2
- package/docs/components/link.md +1 -1
- package/docs/components/list.md +13 -5
- package/docs/components/markdown.md +9 -116
- package/docs/components/menu.md +28 -12
- package/docs/components/menubar.md +4 -3
- package/docs/components/message.md +17 -13
- package/docs/components/meter.md +8 -3
- package/docs/components/month-picker.md +4 -2
- package/docs/components/navigation-drawer.md +32 -7
- package/docs/components/page.md +4 -3
- package/docs/components/pager.md +16 -6
- package/docs/components/pagination.md +3 -2
- package/docs/components/panes.md +13 -26
- package/docs/components/popover.md +3 -2
- package/docs/components/progress.md +2 -2
- package/docs/components/radio.md +13 -5
- package/docs/components/relative-time.md +2 -1
- package/docs/components/resize-handle.md +6 -4
- package/docs/components/row.md +2 -2
- package/docs/components/scaffold.md +13 -4
- package/docs/components/segmented-control.md +10 -4
- package/docs/components/select.md +10 -2
- package/docs/components/sheet.md +4 -1
- package/docs/components/slider.md +8 -2
- package/docs/components/spinner.md +1 -1
- package/docs/components/surface.md +1 -1
- package/docs/components/switch.md +2 -0
- package/docs/components/table-of-contents.md +3 -2
- package/docs/components/table.md +18 -3
- package/docs/components/text-field.md +14 -8
- package/docs/components/time-picker.md +4 -2
- package/docs/components/toast.md +2 -1
- package/docs/components/toolbar.md +31 -6
- package/docs/components/tooltip.md +1 -0
- package/docs/components/top-bar.md +1 -1
- package/docs/components/tree.md +9 -4
- package/docs/customizing.md +59 -91
- package/docs/examples/accordion/IntegrationSwitches.tsx +33 -0
- package/docs/examples/alert/BannerAction.tsx +19 -0
- package/docs/examples/avatar/BotsAndPresence.tsx +24 -0
- package/docs/examples/badge/BadgeAnatomy.tsx +1 -1
- package/docs/examples/badge/CountsInButtons.tsx +2 -2
- package/docs/examples/badge/WithContent.tsx +13 -0
- package/docs/examples/breadcrumbs/WithAvatar.tsx +20 -0
- package/docs/examples/button/ButtonAnatomy.tsx +1 -1
- package/docs/examples/button/CreateProject.tsx +1 -1
- package/docs/examples/button/FillSidebar.tsx +1 -1
- package/docs/examples/button/Icons.tsx +2 -2
- package/docs/examples/button/PictureBeforeLabel.tsx +14 -0
- package/docs/examples/card/CardAnatomy.tsx +3 -1
- package/docs/examples/card/OpenFromCard.tsx +65 -0
- package/docs/examples/code/PackageManagers.tsx +35 -0
- package/docs/examples/code/SettingsDiff.tsx +5 -9
- package/docs/examples/color-picker/TextColorInToolbar.tsx +44 -0
- package/docs/examples/colors/Status.tsx +6 -6
- package/docs/examples/command-palette/CommandPaletteAnatomy.tsx +11 -5
- package/docs/examples/command-palette/GoToDocument.tsx +17 -14
- package/docs/examples/command-palette/NarrowSidebar.tsx +1 -1
- package/docs/examples/command-palette/RunCommand.tsx +16 -12
- package/docs/examples/command-palette/SearchButton.tsx +2 -2
- package/docs/examples/command-palette/TypeToSearch.tsx +2 -2
- package/docs/examples/composer/AttachmentsAndVoice.tsx +30 -0
- package/docs/examples/confirm-dialog/FromMenu.tsx +1 -1
- package/docs/examples/date-picker/PresetsAndBusyDays.tsx +61 -0
- package/docs/examples/dialog/EditMember.tsx +28 -0
- package/docs/examples/dialog/FindPlan.tsx +1 -1
- package/docs/examples/document-tabs/DocumentTabsAnatomy.tsx +2 -2
- package/docs/examples/document-tabs/EditorTabs.tsx +57 -0
- package/docs/examples/document-tabs/OpenDocuments.tsx +2 -2
- package/docs/examples/drop-zone/FilesInsideTheZone.tsx +40 -0
- package/docs/examples/empty-state/WithIllustration.tsx +22 -0
- package/docs/examples/graphic/Colors.tsx +1 -1
- package/docs/examples/graphic/SignInWithLogo.tsx +1 -1
- package/docs/examples/halo/AroundACard.tsx +14 -0
- package/docs/examples/halo/InviteTeam.tsx +15 -0
- package/docs/examples/halo/Tones.tsx +14 -0
- package/docs/examples/icons/FollowText.tsx +3 -3
- package/docs/examples/kbd/Sequences.tsx +10 -0
- package/docs/examples/list/TitleActions.tsx +32 -0
- package/docs/examples/menu/AccountSwitcher.tsx +32 -0
- package/docs/examples/menu/Choices.tsx +1 -1
- package/docs/examples/menu/ContextMenuForRows.tsx +3 -3
- package/docs/examples/menu/Destinations.tsx +5 -5
- package/docs/examples/menu/GroupsAndSeparators.tsx +6 -6
- package/docs/examples/menu/IconsAndShortcuts.tsx +5 -5
- package/docs/examples/menu/MenuAnatomy.tsx +3 -3
- package/docs/examples/menu/Submenus.tsx +4 -4
- package/docs/examples/menubar/NotesMenubar.tsx +4 -4
- package/docs/examples/message/CommentThread.tsx +30 -0
- package/docs/examples/message/Conversation.tsx +7 -2
- package/docs/examples/meter/InlineUsage.tsx +10 -0
- package/docs/examples/navigation-drawer/ActivityBar.tsx +26 -0
- package/docs/examples/navigation-drawer/GroupActions.tsx +43 -0
- package/docs/examples/page/WithBreadcrumbs.tsx +1 -1
- package/docs/examples/page/WithHeader.tsx +1 -1
- package/docs/examples/page/WithToolbar.tsx +1 -1
- package/docs/examples/pager/LongTitles.tsx +2 -2
- package/docs/examples/pager/PagerAnatomy.tsx +2 -2
- package/docs/examples/pager/PreviousAndNext.tsx +2 -2
- package/docs/examples/pager/StepThroughAGuide.tsx +2 -2
- package/docs/examples/panes/DocumentAndDetails.tsx +53 -0
- package/docs/examples/panes/PanesAnatomy.tsx +20 -12
- package/docs/examples/panes/ResizableDetails.tsx +35 -2
- package/docs/examples/panes/StackedWhenNarrow.tsx +11 -10
- package/docs/examples/popover/DocumentDetails.tsx +1 -1
- package/docs/examples/popover/RenameInPlace.tsx +1 -1
- package/docs/examples/progress/ExportMembers.tsx +1 -1
- package/docs/examples/radio/PlanRows.tsx +35 -0
- package/docs/examples/relative-time/PastAndComing.tsx +6 -6
- package/docs/examples/relative-time/VersionLabels.tsx +5 -5
- package/docs/examples/resize-handle/DockedLogs.tsx +44 -0
- package/docs/examples/resize-handle/ResizeHandleAnatomy.tsx +22 -22
- package/docs/examples/row/SectionHeading.tsx +1 -1
- package/docs/examples/scaffold/InspectorAndStatus.tsx +63 -0
- package/docs/examples/segmented-control/IconOnlyAndBadge.tsx +31 -0
- package/docs/examples/segmented-control/SegmentedControlAnatomy.tsx +2 -2
- package/docs/examples/segmented-control/SmallToolbar.tsx +4 -4
- package/docs/examples/select/Assignee.tsx +29 -0
- package/docs/examples/select/SmallToolbar.tsx +23 -21
- package/docs/examples/sheet/FilterPanel.tsx +1 -1
- package/docs/examples/sheet/ShareChoices.tsx +1 -1
- package/docs/examples/slider/IconsAndUnits.tsx +42 -0
- package/docs/examples/spacing/Align.tsx +1 -1
- package/docs/examples/table/HeaderEndAndTotals.tsx +61 -0
- package/docs/examples/table/WorkItemsWithParts.tsx +1 -1
- package/docs/examples/table-of-contents/DocsArticle.tsx +16 -11
- package/docs/examples/text-field/ContentAffixes.tsx +32 -0
- package/docs/examples/text-field/FieldsBesideButtons.tsx +1 -1
- package/docs/examples/text-field/IconAndEndAction.tsx +1 -1
- package/docs/examples/text-field/TextFieldAnatomy.tsx +1 -1
- package/docs/examples/text-field/Variants.tsx +1 -1
- package/docs/examples/toast/ExportReady.tsx +7 -5
- package/docs/examples/toast/RetryAfterError.tsx +8 -6
- package/docs/examples/toast/ToastAnatomy.tsx +1 -1
- package/docs/examples/toast/TopCenter.tsx +1 -1
- package/docs/examples/toast/UndoArchive.tsx +10 -8
- package/docs/examples/toolbar/LabelledControls.tsx +40 -0
- package/docs/examples/tooltip/MenuTrigger.tsx +2 -2
- package/docs/examples/tree/ContextMenuActions.tsx +5 -5
- package/docs/examples/tree/FileTree.tsx +1 -1
- package/docs/examples/tree/MatchedLetters.tsx +37 -0
- package/docs/examples/tree/NarrowTree.tsx +3 -3
- package/docs/examples/tree/RowDensity.tsx +6 -6
- package/docs/examples/tree/TreeAnatomy.tsx +2 -2
- package/docs/foundations/accessibility.md +3 -3
- package/docs/foundations/colors.md +2 -3
- package/docs/foundations/icons.md +3 -3
- package/docs/foundations/responsive.md +2 -2
- package/docs/foundations/spacing.md +2 -2
- package/docs/foundations/typography.md +2 -2
- package/docs/generated/exports.json +34 -52
- package/docs/generated/parts.json +469 -484
- package/docs/generated/props.json +1053 -903
- package/docs/index.md +52 -56
- package/docs/setup.md +62 -20
- package/docs/writing.md +1 -1
- package/package.json +6 -25
- package/dist/actions/internal/MenuPopup.js.map +0 -7
- package/dist/assets/readme/gallery-dark.png +0 -0
- package/dist/assets/readme/gallery-light.png +0 -0
- package/dist/content/MarkdownEditor.d.ts +0 -35
- package/dist/content/MarkdownEditor.js +0 -236
- package/dist/content/MarkdownEditor.js.map +0 -7
- package/dist/content/internal/markdown/MarkdownPreview.d.ts +0 -9
- package/dist/content/internal/markdown/MarkdownPreview.js +0 -30
- package/dist/content/internal/markdown/MarkdownPreview.js.map +0 -7
- package/dist/content/internal/markdown/markdownFormatting.d.ts +0 -15
- package/dist/content/internal/markdown/markdownFormatting.js +0 -96
- package/dist/content/internal/markdown/markdownFormatting.js.map +0 -7
- package/dist/content/internal/markdown/markdownHistory.d.ts +0 -10
- package/dist/content/internal/markdown/markdownHistory.js +0 -54
- package/dist/content/internal/markdown/markdownHistory.js.map +0 -7
- package/dist/content/internal/markdown/useMarkdownEditing.d.ts +0 -19
- package/dist/content/internal/markdown/useMarkdownEditing.js +0 -127
- package/dist/content/internal/markdown/useMarkdownEditing.js.map +0 -7
- package/dist/content/internal/markdown/useMarkdownLink.d.ts +0 -22
- package/dist/content/internal/markdown/useMarkdownLink.js +0 -73
- package/dist/content/internal/markdown/useMarkdownLink.js.map +0 -7
- package/dist/data-display/AnimatedNumber.d.ts +0 -15
- package/dist/data-display/AnimatedNumber.js +0 -111
- package/dist/data-display/AnimatedNumber.js.map +0 -7
- package/dist/data-display/CalendarHeatmap.d.ts +0 -92
- package/dist/data-display/CalendarHeatmap.js +0 -224
- package/dist/data-display/CalendarHeatmap.js.map +0 -7
- package/dist/data-display/DiffStat.d.ts +0 -23
- package/dist/data-display/DiffStat.js +0 -42
- package/dist/data-display/DiffStat.js.map +0 -7
- package/dist/data-display/Rating.d.ts +0 -32
- package/dist/data-display/Rating.js +0 -45
- package/dist/data-display/Rating.js.map +0 -7
- package/dist/data-display/internal/ListRows.js.map +0 -7
- package/dist/data-display/internal/calendarHeatmapModel.d.ts +0 -44
- package/dist/data-display/internal/calendarHeatmapModel.js +0 -133
- package/dist/data-display/internal/calendarHeatmapModel.js.map +0 -7
- package/dist/data-display/internal/useHeatmapLabels.d.ts +0 -16
- package/dist/data-display/internal/useHeatmapLabels.js +0 -56
- package/dist/data-display/internal/useHeatmapLabels.js.map +0 -7
- package/dist/data-display/internal/useHeatmapTooltip.d.ts +0 -24
- package/dist/data-display/internal/useHeatmapTooltip.js +0 -142
- package/dist/data-display/internal/useHeatmapTooltip.js.map +0 -7
- package/dist/dev/api.d.ts +0 -64
- package/dist/dev/api.js +0 -88
- package/dist/dev/api.js.map +0 -7
- package/dist/dev/elements.d.ts +0 -7
- package/dist/dev/elements.js +0 -32
- package/dist/dev/elements.js.map +0 -7
- package/dist/dev/inner.d.ts +0 -17
- package/dist/dev/inner.js +0 -139
- package/dist/dev/inner.js.map +0 -7
- package/dist/dev/install.d.ts +0 -64
- package/dist/dev/install.js +0 -128
- package/dist/dev/install.js.map +0 -7
- package/dist/dev/measure.d.ts +0 -10
- package/dist/dev/measure.js +0 -304
- package/dist/dev/measure.js.map +0 -7
- package/dist/dev/model.d.ts +0 -136
- package/dist/dev/model.js +0 -5
- package/dist/dev/model.js.map +0 -7
- package/dist/dev/overlays.d.ts +0 -5
- package/dist/dev/overlays.js +0 -52
- package/dist/dev/overlays.js.map +0 -7
- package/dist/dev/parts.d.ts +0 -49
- package/dist/dev/parts.js +0 -89
- package/dist/dev/parts.js.map +0 -7
- package/dist/dev/queries.d.ts +0 -28
- package/dist/dev/queries.js +0 -135
- package/dist/dev/queries.js.map +0 -7
- package/dist/dev/readout.d.ts +0 -9
- package/dist/dev/readout.js +0 -275
- package/dist/dev/readout.js.map +0 -7
- package/dist/dev/skeletonShift.d.ts +0 -6
- package/dist/dev/skeletonShift.js +0 -174
- package/dist/dev/skeletonShift.js.map +0 -7
- package/dist/dev/ui/Controls.d.ts +0 -20
- package/dist/dev/ui/Controls.js +0 -53
- package/dist/dev/ui/Controls.js.map +0 -7
- package/dist/dev/ui/DevMode.d.ts +0 -14
- package/dist/dev/ui/DevMode.js +0 -222
- package/dist/dev/ui/DevMode.js.map +0 -7
- package/dist/dev/ui/Frame.d.ts +0 -14
- package/dist/dev/ui/Frame.js +0 -178
- package/dist/dev/ui/Frame.js.map +0 -7
- package/dist/dev/ui/Icons.d.ts +0 -5
- package/dist/dev/ui/Icons.js +0 -38
- package/dist/dev/ui/Icons.js.map +0 -7
- package/dist/dev/ui/Inspector.d.ts +0 -24
- package/dist/dev/ui/Inspector.js +0 -366
- package/dist/dev/ui/Inspector.js.map +0 -7
- package/dist/dev/ui/Legend.d.ts +0 -4
- package/dist/dev/ui/Legend.js +0 -50
- package/dist/dev/ui/Legend.js.map +0 -7
- package/dist/dev/ui/NodeHints.d.ts +0 -15
- package/dist/dev/ui/NodeHints.js +0 -95
- package/dist/dev/ui/NodeHints.js.map +0 -7
- package/dist/dev/ui/PerformancePanel.d.ts +0 -3
- package/dist/dev/ui/PerformancePanel.js +0 -72
- package/dist/dev/ui/PerformancePanel.js.map +0 -7
- package/dist/dev/ui/Plane.d.ts +0 -37
- package/dist/dev/ui/Plane.js +0 -154
- package/dist/dev/ui/Plane.js.map +0 -7
- package/dist/dev/ui/View3D.d.ts +0 -19
- package/dist/dev/ui/View3D.js +0 -248
- package/dist/dev/ui/View3D.js.map +0 -7
- package/dist/dev/ui/ViewToolbar.d.ts +0 -40
- package/dist/dev/ui/ViewToolbar.js +0 -352
- package/dist/dev/ui/ViewToolbar.js.map +0 -7
- package/dist/dev/ui/camera.d.ts +0 -42
- package/dist/dev/ui/camera.js +0 -157
- package/dist/dev/ui/camera.js.map +0 -7
- package/dist/dev/ui/devices.d.ts +0 -9
- package/dist/dev/ui/devices.js +0 -34
- package/dist/dev/ui/devices.js.map +0 -7
- package/dist/dev/ui/editorTheme.d.ts +0 -6
- package/dist/dev/ui/editorTheme.js +0 -30
- package/dist/dev/ui/editorTheme.js.map +0 -7
- package/dist/dev/ui/sides.d.ts +0 -20
- package/dist/dev/ui/sides.js +0 -43
- package/dist/dev/ui/sides.js.map +0 -7
- package/dist/dev/ui/stats.d.ts +0 -25
- package/dist/dev/ui/stats.js +0 -26
- package/dist/dev/ui/stats.js.map +0 -7
- package/dist/dev/ui/surfaces.d.ts +0 -4
- package/dist/dev/ui/surfaces.js +0 -249
- package/dist/dev/ui/surfaces.js.map +0 -7
- package/dist/dev/ui/useLivePage.d.ts +0 -13
- package/dist/dev/ui/useLivePage.js +0 -138
- package/dist/dev/ui/useLivePage.js.map +0 -7
- package/dist/dev/ui/usePlaneHover.d.ts +0 -9
- package/dist/dev/ui/usePlaneHover.js +0 -46
- package/dist/dev/ui/usePlaneHover.js.map +0 -7
- package/dist/dev/ui/useViewFit.d.ts +0 -16
- package/dist/dev/ui/useViewFit.js +0 -59
- package/dist/dev/ui/useViewFit.js.map +0 -7
- package/dist/dev/ui/useViewWheel.d.ts +0 -11
- package/dist/dev/ui/useViewWheel.js +0 -48
- package/dist/dev/ui/useViewWheel.js.map +0 -7
- package/dist/dev/ui/wheel.d.ts +0 -7
- package/dist/dev/ui/wheel.js +0 -98
- package/dist/dev/ui/wheel.js.map +0 -7
- package/dist/dev/units.d.ts +0 -7
- package/dist/dev/units.js +0 -22
- package/dist/dev/units.js.map +0 -7
- package/dist/dev/usedTokens.d.ts +0 -5
- package/dist/dev/usedTokens.js +0 -56
- package/dist/dev/usedTokens.js.map +0 -7
- package/dist/dev.d.ts +0 -5
- package/dist/dev.js +0 -9
- package/dist/dev.js.map +0 -7
- package/dist/feedback/toast/internal/PictureNotice.js.map +0 -7
- package/dist/forms/color/internal/useColorState.d.ts +0 -10
- package/dist/forms/color/internal/useColorState.js +0 -49
- package/dist/forms/color/internal/useColorState.js.map +0 -7
- package/dist/forms/internal/usePickerValue.d.ts +0 -13
- package/dist/forms/internal/usePickerValue.js +0 -45
- package/dist/forms/internal/usePickerValue.js.map +0 -7
- package/dist/forms/internal/useRovingFocus.d.ts +0 -47
- package/dist/forms/internal/useRovingFocus.js +0 -179
- package/dist/forms/internal/useRovingFocus.js.map +0 -7
- package/dist/forms/rich-text/RichText.d.ts +0 -7
- package/dist/forms/rich-text/RichText.js +0 -91
- package/dist/forms/rich-text/RichText.js.map +0 -7
- package/dist/forms/rich-text/RichTextEditor.d.ts +0 -9
- package/dist/forms/rich-text/RichTextEditor.js +0 -225
- package/dist/forms/rich-text/RichTextEditor.js.map +0 -7
- package/dist/forms/rich-text/extensions.d.ts +0 -10
- package/dist/forms/rich-text/extensions.js +0 -45
- package/dist/forms/rich-text/extensions.js.map +0 -7
- package/dist/forms/rich-text/internal/Listbox.d.ts +0 -10
- package/dist/forms/rich-text/internal/Listbox.js +0 -48
- package/dist/forms/rich-text/internal/Listbox.js.map +0 -7
- package/dist/forms/rich-text/internal/Reference.d.ts +0 -13
- package/dist/forms/rich-text/internal/Reference.js +0 -79
- package/dist/forms/rich-text/internal/Reference.js.map +0 -7
- package/dist/forms/rich-text/internal/commands.d.ts +0 -6
- package/dist/forms/rich-text/internal/commands.js +0 -74
- package/dist/forms/rich-text/internal/commands.js.map +0 -7
- package/dist/forms/rich-text/internal/readOnlyCheckbox.d.ts +0 -6
- package/dist/forms/rich-text/internal/readOnlyCheckbox.js +0 -9
- package/dist/forms/rich-text/internal/readOnlyCheckbox.js.map +0 -7
- package/dist/forms/rich-text/internal/referenceAttributes.d.ts +0 -3
- package/dist/forms/rich-text/internal/referenceAttributes.js +0 -23
- package/dist/forms/rich-text/internal/referenceAttributes.js.map +0 -7
- package/dist/forms/rich-text/internal/referenceExtension.d.ts +0 -2
- package/dist/forms/rich-text/internal/referenceExtension.js +0 -103
- package/dist/forms/rich-text/internal/referenceExtension.js.map +0 -7
- package/dist/forms/rich-text/internal/suggestions.d.ts +0 -16
- package/dist/forms/rich-text/internal/suggestions.js +0 -185
- package/dist/forms/rich-text/internal/suggestions.js.map +0 -7
- package/dist/forms/rich-text/internal/taskItem.d.ts +0 -1
- package/dist/forms/rich-text/internal/taskItem.js +0 -43
- package/dist/forms/rich-text/internal/taskItem.js.map +0 -7
- package/dist/forms/rich-text/internal/useDocumentAttributes.d.ts +0 -13
- package/dist/forms/rich-text/internal/useDocumentAttributes.js +0 -42
- package/dist/forms/rich-text/internal/useDocumentAttributes.js.map +0 -7
- package/dist/forms/rich-text/internal/useLinksAndUploads.d.ts +0 -19
- package/dist/forms/rich-text/internal/useLinksAndUploads.js +0 -141
- package/dist/forms/rich-text/internal/useLinksAndUploads.js.map +0 -7
- package/dist/forms/rich-text/internal/useRichTextDocument.d.ts +0 -26
- package/dist/forms/rich-text/internal/useRichTextDocument.js +0 -101
- package/dist/forms/rich-text/internal/useRichTextDocument.js.map +0 -7
- package/dist/forms/rich-text/internal/useRichTextExtensions.d.ts +0 -13
- package/dist/forms/rich-text/internal/useRichTextExtensions.js +0 -85
- package/dist/forms/rich-text/internal/useRichTextExtensions.js.map +0 -7
- package/dist/forms/rich-text/types.d.ts +0 -190
- package/dist/forms/rich-text/types.js +0 -1
- package/dist/foundations/SkeletonScope.js.map +0 -7
- package/dist/foundations/ThemePreference.d.ts +0 -35
- package/dist/foundations/ThemePreference.js.map +0 -7
- package/dist/foundations/internal/skeletonText.js.map +0 -7
- package/dist/foundations/messages/calendarHeatmap.d.ts +0 -10
- package/dist/foundations/messages/calendarHeatmap.js +0 -10
- package/dist/foundations/messages/calendarHeatmap.js.map +0 -7
- package/dist/foundations/messages/diffStat.d.ts +0 -16
- package/dist/foundations/messages/diffStat.js +0 -17
- package/dist/foundations/messages/diffStat.js.map +0 -7
- package/dist/foundations/messages/editor.d.ts +0 -35
- package/dist/foundations/messages/editor.js +0 -34
- package/dist/foundations/messages/editor.js.map +0 -7
- package/dist/foundations/messages/linkDialog.d.ts +0 -20
- package/dist/foundations/messages/linkDialog.js +0 -20
- package/dist/foundations/messages/linkDialog.js.map +0 -7
- package/dist/foundations/messages/markdownEditor.d.ts +0 -26
- package/dist/foundations/messages/markdownEditor.js +0 -26
- package/dist/foundations/messages/markdownEditor.js.map +0 -7
- package/dist/foundations/messages/rating.d.ts +0 -11
- package/dist/foundations/messages/rating.js +0 -8
- package/dist/foundations/messages/rating.js.map +0 -7
- package/dist/foundations/messages/richText.d.ts +0 -34
- package/dist/foundations/messages/richText.js +0 -34
- package/dist/foundations/messages/richText.js.map +0 -7
- package/dist/internal/dialog/DialogParts.d.ts +0 -46
- package/dist/internal/dialog/DialogParts.js +0 -66
- package/dist/internal/dialog/DialogParts.js.map +0 -7
- package/dist/internal/dom/paints.d.ts +0 -5
- package/dist/internal/dom/paints.js +0 -17
- package/dist/internal/dom/paints.js.map +0 -7
- package/dist/internal/dom/useStripWheel.d.ts +0 -6
- package/dist/internal/dom/useStripWheel.js +0 -26
- package/dist/internal/dom/useStripWheel.js.map +0 -7
- package/dist/internal/editor/EditorStatus.d.ts +0 -8
- package/dist/internal/editor/EditorStatus.js +0 -11
- package/dist/internal/editor/EditorStatus.js.map +0 -7
- package/dist/internal/editor/EditorToolbar.d.ts +0 -28
- package/dist/internal/editor/EditorToolbar.js +0 -89
- package/dist/internal/editor/EditorToolbar.js.map +0 -7
- package/dist/internal/editor/LinkDialog.d.ts +0 -20
- package/dist/internal/editor/LinkDialog.js +0 -78
- package/dist/internal/editor/LinkDialog.js.map +0 -7
- package/dist/internal/editor/editorCommands.d.ts +0 -20
- package/dist/internal/editor/editorCommands.js +0 -45
- package/dist/internal/editor/editorCommands.js.map +0 -7
- package/dist/internal/field/TextareaResizeEdge.js.map +0 -7
- package/dist/internal/field/rowControl.js.map +0 -7
- package/dist/internal/field/useFieldMetadata.d.ts +0 -16
- package/dist/internal/field/useFieldMetadata.js +0 -24
- package/dist/internal/field/useFieldMetadata.js.map +0 -7
- package/dist/internal/list/ListRow.d.ts +0 -33
- package/dist/internal/list/ListRow.js.map +0 -7
- package/dist/internal/popup/PortalContainerContext.js.map +0 -7
- package/dist/internal/react/useStackedReport.js +0 -28
- package/dist/internal/react/useStackedReport.js.map +0 -7
- package/dist/internal/skeleton.js.map +0 -7
- package/dist/internal/time/calendarDays.js.map +0 -7
- package/dist/layout/internal/navigationForms.js.map +0 -7
- package/dist/layout/internal/scrollKeys.js.map +0 -7
- package/dist/layout/internal/useNavigationFocusHandoff.js.map +0 -7
- package/dist/layout/internal/useScrollKeys.js.map +0 -7
- package/dist/layout/panesSize.d.ts +0 -13
- package/dist/layout/panesSize.js +0 -39
- package/dist/layout/panesSize.js.map +0 -7
- package/dist/navigation/internal/TreeRow.js.map +0 -7
- package/dist/navigation/internal/contentsOutline.d.ts +0 -60
- package/dist/navigation/internal/contentsOutline.js.map +0 -7
- package/dist/navigation/internal/contentsWave.js.map +0 -7
- package/dist/navigation/internal/sectionScroll.js.map +0 -7
- package/dist/navigation/internal/tabStrip.d.ts +0 -6
- package/dist/navigation/internal/tabStrip.js +0 -24
- package/dist/navigation/internal/tabStrip.js.map +0 -7
- package/dist/navigation/internal/treeModel.js.map +0 -7
- package/dist/navigation/internal/useContentsHeadings.js.map +0 -7
- package/dist/navigation/internal/useTabCloseFocus.js.map +0 -7
- package/dist/navigation/internal/useTabDrag.js.map +0 -7
- package/dist/navigation/internal/useTabStripScrolling.js.map +0 -7
- package/dist/navigation/internal/useTreeTransitions.js.map +0 -7
- package/dist/navigation/internal/useTreeViewport.js.map +0 -7
- package/dist/navigation/internal/waveDrawer.js.map +0 -7
- package/dist/overlays/internal/DialogPendingAction.js.map +0 -7
- package/dist/rich-text.d.ts +0 -5
- package/dist/rich-text.js +0 -9
- package/dist/rich-text.js.map +0 -7
- package/dist/styles/CalendarHeatmap.css +0 -1
- package/dist/styles/Editor.css +0 -1
- package/dist/styles/Listbox.css +0 -1
- package/dist/styles/MarkdownEditor.css +0 -1
- package/dist/styles/Rating.css +0 -1
- package/dist/styles/RichText.css +0 -1
- package/docs/components/animated-number.md +0 -72
- package/docs/components/calendar-heatmap.md +0 -140
- package/docs/components/rating.md +0 -84
- package/docs/components/rich-text.md +0 -224
- package/docs/dev-mode.md +0 -59
- package/docs/examples/animated-number/AnimatedNumberAnatomy.tsx +0 -9
- package/docs/examples/animated-number/CustomFormat.tsx +0 -28
- package/docs/examples/animated-number/ShowResults.tsx +0 -38
- package/docs/examples/badge/ChangeSize.tsx +0 -21
- package/docs/examples/calendar-heatmap/ApplicationStrings.tsx +0 -23
- package/docs/examples/calendar-heatmap/ColorByRank.tsx +0 -26
- package/docs/examples/calendar-heatmap/CustomTooltip.tsx +0 -26
- package/docs/examples/calendar-heatmap/Deployments.tsx +0 -22
- package/docs/examples/calendar-heatmap/HeatmapAnatomy.tsx +0 -10
- package/docs/examples/calendar-heatmap/ScrollingWeeks.tsx +0 -10
- package/docs/examples/markdown/LinkPicker.tsx +0 -65
- package/docs/examples/markdown/MarkdownEditorAnatomy.tsx +0 -13
- package/docs/examples/markdown/WriteNote.tsx +0 -21
- package/docs/examples/panes/ListAndDetail.tsx +0 -55
- package/docs/examples/rating/RatingAnatomy.tsx +0 -5
- package/docs/examples/rating/ReviewScore.tsx +0 -13
- package/docs/examples/rating/Scales.tsx +0 -11
- package/docs/examples/resize-handle/ProjectSidebar.tsx +0 -40
- package/docs/examples/rich-text/MeetingNotes.tsx +0 -14
- package/docs/examples/rich-text/References.tsx +0 -47
- package/docs/examples/rich-text/RichTextAnatomy.tsx +0 -18
- package/docs/examples/rich-text/SavedContent.tsx +0 -33
- package/docs/examples/rich-text/SlashCommands.tsx +0 -24
- package/docs/examples/rich-text/UploadsAndLinks.tsx +0 -36
- /package/dist/actions/{internal → menu/internal}/menuOpenChange.js +0 -0
- /package/dist/actions/{internal → menu/internal}/menuOpenChange.js.map +0 -0
- /package/dist/{forms/rich-text/types.js.map → actions/menu/internal/menuTriggerProps.js.map} +0 -0
- /package/dist/forms/color/internal/{colorChange.d.ts → ColorChangeContext.d.ts} +0 -0
- /package/dist/internal/{useCopy.d.ts → react/useCopy.d.ts} +0 -0
- /package/dist/internal/{useCopy.js → react/useCopy.js} +0 -0
- /package/dist/internal/{useLatest.d.ts → react/useLatest.d.ts} +0 -0
- /package/dist/internal/{useLatest.js → react/useLatest.js} +0 -0
- /package/dist/{foundations/internal → internal/skeleton}/skeletonText.d.ts +0 -0
- /package/dist/layout/internal/{navigationForms.js → scaffold/navigationForms.js} +0 -0
- /package/dist/layout/internal/{scaffoldFocus.d.ts → scaffold/scaffoldFocus.d.ts} +0 -0
- /package/dist/layout/internal/{scaffoldFocus.js → scaffold/scaffoldFocus.js} +0 -0
- /package/dist/layout/internal/{scrollKeys.d.ts → scaffold/scrollKeys.d.ts} +0 -0
- /package/dist/layout/internal/{useNavigationFocusHandoff.d.ts → scaffold/useNavigationFocusHandoff.d.ts} +0 -0
- /package/dist/layout/internal/{useScrollKeys.d.ts → scaffold/useScrollKeys.d.ts} +0 -0
- /package/dist/navigation/internal/{useTabCloseFocus.d.ts → documentTabs/useTabCloseFocus.d.ts} +0 -0
- /package/dist/navigation/internal/{useTabStripScrolling.d.ts → documentTabs/useTabStripScrolling.d.ts} +0 -0
- /package/dist/navigation/internal/{contentsWave.d.ts → tableOfContents/contentsWave.d.ts} +0 -0
- /package/dist/navigation/internal/{waveDrawer.d.ts → tableOfContents/waveDrawer.d.ts} +0 -0
- /package/dist/navigation/internal/{useTreeTransitions.js → tree/useTreeTransitions.js} +0 -0
- /package/dist/styles/{TextareaResizeEdge.css → TextareaResizeHandle.css} +0 -0
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
type RowPosition = {
|
|
2
|
+
label: string;
|
|
3
|
+
position: string;
|
|
4
|
+
count: string;
|
|
5
|
+
};
|
|
1
6
|
/**
|
|
2
7
|
* The English defaults of the `list` messages: List. EnvUIProvider's `messages.list` overrides any
|
|
3
8
|
* of them. In the announcements, `position` and `count` are in the locale's digits.
|
|
@@ -13,45 +18,18 @@ export declare const list: {
|
|
|
13
18
|
* Announced when a row is picked up by keyboard or a press of its handle; the handle's
|
|
14
19
|
* description already says how to move it.
|
|
15
20
|
*/
|
|
16
|
-
lifted: ({ label, position, count }:
|
|
17
|
-
label: string;
|
|
18
|
-
position: string;
|
|
19
|
-
count: string;
|
|
20
|
-
}) => string;
|
|
21
|
+
lifted: ({ label, position, count }: RowPosition) => string;
|
|
21
22
|
/** Announced when the pointer starts dragging a row. */
|
|
22
|
-
liftedByPointer: ({ label, position, count
|
|
23
|
-
label: string;
|
|
24
|
-
position: string;
|
|
25
|
-
count: string;
|
|
26
|
-
}) => string;
|
|
23
|
+
liftedByPointer: ({ label, position, count }: RowPosition) => string;
|
|
27
24
|
/** Announced as a picked-up row moves. */
|
|
28
|
-
moved: ({ label, position, count }:
|
|
29
|
-
label: string;
|
|
30
|
-
position: string;
|
|
31
|
-
count: string;
|
|
32
|
-
}) => string;
|
|
25
|
+
moved: ({ label, position, count }: RowPosition) => string;
|
|
33
26
|
/** Announced when a row can't move further up: it is first. */
|
|
34
|
-
atStart: ({ label, position, count }:
|
|
35
|
-
label: string;
|
|
36
|
-
position: string;
|
|
37
|
-
count: string;
|
|
38
|
-
}) => string;
|
|
27
|
+
atStart: ({ label, position, count }: RowPosition) => string;
|
|
39
28
|
/** Announced when a row can't move further down: it is last. */
|
|
40
|
-
atEnd: ({ label, position, count }:
|
|
41
|
-
label: string;
|
|
42
|
-
position: string;
|
|
43
|
-
count: string;
|
|
44
|
-
}) => string;
|
|
29
|
+
atEnd: ({ label, position, count }: RowPosition) => string;
|
|
45
30
|
/** Announced when a row is dropped in its new place. */
|
|
46
|
-
dropped: ({ label, position, count }:
|
|
47
|
-
label: string;
|
|
48
|
-
position: string;
|
|
49
|
-
count: string;
|
|
50
|
-
}) => string;
|
|
31
|
+
dropped: ({ label, position, count }: RowPosition) => string;
|
|
51
32
|
/** Announced when a move is cancelled and the row goes back. */
|
|
52
|
-
cancelled: ({ label, position, count }:
|
|
53
|
-
label: string;
|
|
54
|
-
position: string;
|
|
55
|
-
count: string;
|
|
56
|
-
}) => string;
|
|
33
|
+
cancelled: ({ label, position, count }: RowPosition) => string;
|
|
57
34
|
};
|
|
35
|
+
export {};
|
|
@@ -9,11 +9,7 @@ const list = {
|
|
|
9
9
|
*/
|
|
10
10
|
lifted: ({ label, position, count }) => `${label} picked up, position ${position} of ${count}.`,
|
|
11
11
|
/** Announced when the pointer starts dragging a row. */
|
|
12
|
-
liftedByPointer: ({
|
|
13
|
-
label,
|
|
14
|
-
position,
|
|
15
|
-
count
|
|
16
|
-
}) => `${label} picked up, position ${position} of ${count}. Drag it to its place and release it to drop it.`,
|
|
12
|
+
liftedByPointer: ({ label, position, count }) => `${label} picked up, position ${position} of ${count}. Drag it to its place and release it to drop it.`,
|
|
17
13
|
/** Announced as a picked-up row moves. */
|
|
18
14
|
moved: ({ label, position, count }) => `${label} moved to position ${position} of ${count}.`,
|
|
19
15
|
/** Announced when a row can't move further up: it is first. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/foundations/messages/list.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * The English defaults of the `list` messages: List. EnvUIProvider's `messages.list` overrides any\n * of them. In the announcements, `position` and `count` are in the locale's digits.\n */\nexport const list = {\n /** A row's drag handle, such as Reorder Intro slide. */\n reorder: ({ label }: { label: string }) => `Reorder ${label}`,\n /** Describes each drag handle: how to move its row without a pointer. */\n instructions:\n 'Press Space or Enter, or click, to pick the row up. Then use the arrow keys to move it, and press Space or Enter, or click, to drop it. Escape cancels.',\n /**\n * Announced when a row is picked up by keyboard or a press of its handle; the handle's\n * description already says how to move it.\n */\n lifted: ({ label, position, count }:
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["type RowPosition = { label: string; position: string; count: string };\n\n/**\n * The English defaults of the `list` messages: List. EnvUIProvider's `messages.list` overrides any\n * of them. In the announcements, `position` and `count` are in the locale's digits.\n */\nexport const list = {\n /** A row's drag handle, such as Reorder Intro slide. */\n reorder: ({ label }: { label: string }) => `Reorder ${label}`,\n /** Describes each drag handle: how to move its row without a pointer. */\n instructions:\n 'Press Space or Enter, or click, to pick the row up. Then use the arrow keys to move it, and press Space or Enter, or click, to drop it. Escape cancels.',\n /**\n * Announced when a row is picked up by keyboard or a press of its handle; the handle's\n * description already says how to move it.\n */\n lifted: ({ label, position, count }: RowPosition) =>\n `${label} picked up, position ${position} of ${count}.`,\n /** Announced when the pointer starts dragging a row. */\n liftedByPointer: ({ label, position, count }: RowPosition) =>\n `${label} picked up, position ${position} of ${count}. Drag it to its place and release it to drop it.`,\n /** Announced as a picked-up row moves. */\n moved: ({ label, position, count }: RowPosition) =>\n `${label} moved to position ${position} of ${count}.`,\n /** Announced when a row can't move further up: it is first. */\n atStart: ({ label, position, count }: RowPosition) =>\n `${label} is at the start of the list, position ${position} of ${count}.`,\n /** Announced when a row can't move further down: it is last. */\n atEnd: ({ label, position, count }: RowPosition) =>\n `${label} is at the end of the list, position ${position} of ${count}.`,\n /** Announced when a row is dropped in its new place. */\n dropped: ({ label, position, count }: RowPosition) =>\n `${label} dropped at position ${position} of ${count}.`,\n /** Announced when a move is cancelled and the row goes back. */\n cancelled: ({ label, position, count }: RowPosition) =>\n `Move cancelled. ${label} is back at position ${position} of ${count}.`,\n};\n"],
|
|
5
|
+
"mappings": "AAMO,MAAM,OAAO;AAAA;AAAA,EAElB,SAAS,CAAC,EAAE,MAAM,MAAyB,WAAW,KAAK;AAAA;AAAA,EAE3D,cACE;AAAA;AAAA;AAAA;AAAA;AAAA,EAKF,QAAQ,CAAC,EAAE,OAAO,UAAU,MAAM,MAChC,GAAG,KAAK,wBAAwB,QAAQ,OAAO,KAAK;AAAA;AAAA,EAEtD,iBAAiB,CAAC,EAAE,OAAO,UAAU,MAAM,MACzC,GAAG,KAAK,wBAAwB,QAAQ,OAAO,KAAK;AAAA;AAAA,EAEtD,OAAO,CAAC,EAAE,OAAO,UAAU,MAAM,MAC/B,GAAG,KAAK,sBAAsB,QAAQ,OAAO,KAAK;AAAA;AAAA,EAEpD,SAAS,CAAC,EAAE,OAAO,UAAU,MAAM,MACjC,GAAG,KAAK,0CAA0C,QAAQ,OAAO,KAAK;AAAA;AAAA,EAExE,OAAO,CAAC,EAAE,OAAO,UAAU,MAAM,MAC/B,GAAG,KAAK,wCAAwC,QAAQ,OAAO,KAAK;AAAA;AAAA,EAEtE,SAAS,CAAC,EAAE,OAAO,UAAU,MAAM,MACjC,GAAG,KAAK,wBAAwB,QAAQ,OAAO,KAAK;AAAA;AAAA,EAEtD,WAAW,CAAC,EAAE,OAAO,UAAU,MAAM,MACnC,mBAAmB,KAAK,wBAAwB,QAAQ,OAAO,KAAK;AACxE;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -7,7 +7,7 @@ export declare const message: {
|
|
|
7
7
|
sending: string;
|
|
8
8
|
/** The status of a message that could not be sent. */
|
|
9
9
|
failed: string;
|
|
10
|
-
/**
|
|
10
|
+
/** The status of a reply still being written, beside its spinner. */
|
|
11
11
|
working: string;
|
|
12
12
|
/** The button of a MessageList that follows, shown once newer messages arrive out of view. */
|
|
13
13
|
jumpToLatest: string;
|
|
@@ -3,7 +3,7 @@ const message = {
|
|
|
3
3
|
sending: "Sending",
|
|
4
4
|
/** The status of a message that could not be sent. */
|
|
5
5
|
failed: "Not sent",
|
|
6
|
-
/**
|
|
6
|
+
/** The status of a reply still being written, beside its spinner. */
|
|
7
7
|
working: "Working",
|
|
8
8
|
/** The button of a MessageList that follows, shown once newer messages arrive out of view. */
|
|
9
9
|
jumpToLatest: "Jump to latest"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/foundations/messages/message.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * The English defaults of the `message` messages: Message. EnvUIProvider's `messages.message`\n * overrides any of them.\n */\nexport const message = {\n /** The status of a message on its way. */\n sending: 'Sending',\n /** The status of a message that could not be sent. */\n failed: 'Not sent',\n /**
|
|
4
|
+
"sourcesContent": ["/**\n * The English defaults of the `message` messages: Message. EnvUIProvider's `messages.message`\n * overrides any of them.\n */\nexport const message = {\n /** The status of a message on its way. */\n sending: 'Sending',\n /** The status of a message that could not be sent. */\n failed: 'Not sent',\n /** The status of a reply still being written, beside its spinner. */\n working: 'Working',\n /** The button of a MessageList that follows, shown once newer messages arrive out of view. */\n jumpToLatest: 'Jump to latest',\n};\n"],
|
|
5
5
|
"mappings": "AAIO,MAAM,UAAU;AAAA;AAAA,EAErB,SAAS;AAAA;AAAA,EAET,QAAQ;AAAA;AAAA,EAER,SAAS;AAAA;AAAA,EAET,cAAc;AAChB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -10,6 +10,10 @@ export declare const navigation: {
|
|
|
10
10
|
label: string;
|
|
11
11
|
count: string;
|
|
12
12
|
}) => string;
|
|
13
|
+
/** Names a destination with something new and no count, shown as a dot, such as Activity, new. */
|
|
14
|
+
itemNew: ({ label }: {
|
|
15
|
+
label: string;
|
|
16
|
+
}) => string;
|
|
13
17
|
/** Labels the NavigationBar's last item, which opens the destinations that don't fit in a menu. */
|
|
14
18
|
more: string;
|
|
15
19
|
/**
|
|
@@ -3,6 +3,8 @@ const navigation = {
|
|
|
3
3
|
label: "Main",
|
|
4
4
|
/** Names a destination with a count, such as Inbox, 3 new. */
|
|
5
5
|
itemCount: ({ label, count }) => `${label}, ${count} new`,
|
|
6
|
+
/** Names a destination with something new and no count, shown as a dot, such as Activity, new. */
|
|
7
|
+
itemNew: ({ label }) => `${label}, new`,
|
|
6
8
|
/** Labels the NavigationBar's last item, which opens the destinations that don't fit in a menu. */
|
|
7
9
|
more: "More",
|
|
8
10
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/foundations/messages/navigation.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * The English defaults of the `navigation` messages: NavigationBar, NavigationRail and NavigationDrawer. EnvUIProvider's\n * `messages.navigation` overrides any of them.\n */\nexport const navigation = {\n /** Names the navigation landmark where the application gives it no name of its own. */\n label: 'Main',\n /** Names a destination with a count, such as Inbox, 3 new. */\n itemCount: ({ label, count }: { label: string; count: string }) => `${label}, ${count} new`,\n /** Labels the NavigationBar's last item, which opens the destinations that don't fit in a menu. */\n more: 'More',\n /**\n * Names the NavigationBar's More item while its menu holds the current destination, after its name with any\n * count, such as More, 5 new, current page inside.\n */\n moreCurrent: ({ name }: { name: string }) => `${name}, current page inside`,\n /**\n * Names the button beside a NavigationDrawer destination that opens and closes the destinations nested\n * under it, such as Guides contents; its aria-expanded says whether they show.\n */\n contents: ({ label }: { label: string }) => `${label} contents`,\n /** Names the handle that resizes a resizable NavigationDrawer. */\n resize: 'Resize navigation',\n /** The resize handle's value: the NavigationDrawer's width in rem, such as 17.5 rem, in the locale's digits. */\n width: ({ width }: { width: string }) => `${width} rem`,\n};\n\nexport type NavigationMessages = typeof navigation;\n"],
|
|
5
|
-
"mappings": "AAIO,MAAM,aAAa;AAAA;AAAA,EAExB,OAAO;AAAA;AAAA,EAEP,WAAW,CAAC,EAAE,OAAO,MAAM,MAAwC,GAAG,KAAK,KAAK,KAAK;AAAA;AAAA,EAErF,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA,EAKN,aAAa,CAAC,EAAE,KAAK,MAAwB,GAAG,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA,EAKpD,UAAU,CAAC,EAAE,MAAM,MAAyB,GAAG,KAAK;AAAA;AAAA,EAEpD,QAAQ;AAAA;AAAA,EAER,OAAO,CAAC,EAAE,MAAM,MAAyB,GAAG,KAAK;AACnD;",
|
|
4
|
+
"sourcesContent": ["/**\n * The English defaults of the `navigation` messages: NavigationBar, NavigationRail and NavigationDrawer. EnvUIProvider's\n * `messages.navigation` overrides any of them.\n */\nexport const navigation = {\n /** Names the navigation landmark where the application gives it no name of its own. */\n label: 'Main',\n /** Names a destination with a count, such as Inbox, 3 new. */\n itemCount: ({ label, count }: { label: string; count: string }) => `${label}, ${count} new`,\n /** Names a destination with something new and no count, shown as a dot, such as Activity, new. */\n itemNew: ({ label }: { label: string }) => `${label}, new`,\n /** Labels the NavigationBar's last item, which opens the destinations that don't fit in a menu. */\n more: 'More',\n /**\n * Names the NavigationBar's More item while its menu holds the current destination, after its name with any\n * count, such as More, 5 new, current page inside.\n */\n moreCurrent: ({ name }: { name: string }) => `${name}, current page inside`,\n /**\n * Names the button beside a NavigationDrawer destination that opens and closes the destinations nested\n * under it, such as Guides contents; its aria-expanded says whether they show.\n */\n contents: ({ label }: { label: string }) => `${label} contents`,\n /** Names the handle that resizes a resizable NavigationDrawer. */\n resize: 'Resize navigation',\n /** The resize handle's value: the NavigationDrawer's width in rem, such as 17.5 rem, in the locale's digits. */\n width: ({ width }: { width: string }) => `${width} rem`,\n};\n\nexport type NavigationMessages = typeof navigation;\n"],
|
|
5
|
+
"mappings": "AAIO,MAAM,aAAa;AAAA;AAAA,EAExB,OAAO;AAAA;AAAA,EAEP,WAAW,CAAC,EAAE,OAAO,MAAM,MAAwC,GAAG,KAAK,KAAK,KAAK;AAAA;AAAA,EAErF,SAAS,CAAC,EAAE,MAAM,MAAyB,GAAG,KAAK;AAAA;AAAA,EAEnD,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA,EAKN,aAAa,CAAC,EAAE,KAAK,MAAwB,GAAG,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA,EAKpD,UAAU,CAAC,EAAE,MAAM,MAAyB,GAAG,KAAK;AAAA;AAAA,EAEpD,QAAQ;AAAA;AAAA,EAER,OAAO,CAAC,EAAE,MAAM,MAAyB,GAAG,KAAK;AACnD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ThemeContrast, ThemeCorners, ThemeScale, ThemeSelection } from './Theme.js';
|
|
2
|
-
/**
|
|
2
|
+
/** A theme preference: an explicit theme or the operating system's. */
|
|
3
3
|
export type ThemePreference = 'light' | 'dark' | 'system';
|
|
4
4
|
/**
|
|
5
5
|
* An application's theme, defined once with defineTheme and given to both
|
|
@@ -7,16 +7,6 @@ export type ThemePreference = 'light' | 'dark' | 'system';
|
|
|
7
7
|
* application agree.
|
|
8
8
|
*/
|
|
9
9
|
export interface ThemeDefinition {
|
|
10
|
-
/**
|
|
11
|
-
* The localStorage key the stored preference is kept under.
|
|
12
|
-
* @default 'env-theme'
|
|
13
|
-
*/
|
|
14
|
-
storageKey?: string;
|
|
15
|
-
/**
|
|
16
|
-
* The preference used while nothing is stored.
|
|
17
|
-
* @default 'system'
|
|
18
|
-
*/
|
|
19
|
-
defaultPreference?: ThemePreference;
|
|
20
10
|
/**
|
|
21
11
|
* `high` for the high-contrast colors, `standard` for the standard ones even while the system
|
|
22
12
|
* asks for more, `system` to follow `prefers-contrast: more`. The bootstrap script writes `high`
|
|
@@ -47,30 +37,18 @@ export interface ThemeDefinition {
|
|
|
47
37
|
* createThemeBootstrapScript, so the two can't drift apart.
|
|
48
38
|
*/
|
|
49
39
|
export declare function defineTheme(definition?: ThemeDefinition): Readonly<ThemeDefinition>;
|
|
50
|
-
export
|
|
51
|
-
/**
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
export declare const contrastSourceAttribute = "data-env-contrast-source";
|
|
59
|
-
export declare const ownContrastSource: (contrast: string) => string;
|
|
60
|
-
/**
|
|
61
|
-
* Marks a root `data-env-scale` that envUI wrote, as contrastSourceAttribute marks a contrast: the
|
|
62
|
-
* marker holds the value written, `envui:compact`, so a scale the page wrote over envUI's stays.
|
|
63
|
-
*/
|
|
64
|
-
export declare const scaleSourceAttribute = "data-env-scale-source";
|
|
65
|
-
export declare const ownScaleSource: (scale: string) => string;
|
|
66
|
-
export declare const lookAttributes: {
|
|
67
|
-
readonly selection: "data-env-selection";
|
|
68
|
-
readonly corners: "data-env-corners";
|
|
69
|
-
};
|
|
40
|
+
export interface ThemeBootstrapOptions {
|
|
41
|
+
/**
|
|
42
|
+
* The preference the first paint shows, such as the one the server read for this request from
|
|
43
|
+
* the application's cookie or account.
|
|
44
|
+
* @default 'system'
|
|
45
|
+
*/
|
|
46
|
+
preference?: ThemePreference;
|
|
47
|
+
}
|
|
70
48
|
/**
|
|
71
49
|
* Inline script for the document head. It themes the root element before the first paint, so a
|
|
72
|
-
*
|
|
73
|
-
* scale, selection and corners of the theme apply from the start. Give it the theme
|
|
74
|
-
* ThemePreferenceProvider takes.
|
|
50
|
+
* chosen or system dark theme does not flash light while the application loads, and the contrast,
|
|
51
|
+
* scale, selection and corners of the theme apply from the start. Give it the theme and the
|
|
52
|
+
* preference ThemePreferenceProvider takes.
|
|
75
53
|
*/
|
|
76
|
-
export declare function createThemeBootstrapScript(theme?: ThemeDefinition): string;
|
|
54
|
+
export declare function createThemeBootstrapScript(theme?: ThemeDefinition, { preference }?: ThemeBootstrapOptions): string;
|
|
@@ -1,43 +1,12 @@
|
|
|
1
|
+
import { themeBootstrapScript } from "../internal/theme/themeRoot.js";
|
|
1
2
|
function defineTheme(definition = {}) {
|
|
2
3
|
return Object.freeze({ ...definition });
|
|
3
4
|
}
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const ownContrastSource = (contrast) => `envui:${contrast}`;
|
|
7
|
-
const scaleSourceAttribute = "data-env-scale-source";
|
|
8
|
-
const ownScaleSource = (scale) => `envui:${scale}`;
|
|
9
|
-
const lookAttributes = {
|
|
10
|
-
selection: "data-env-selection",
|
|
11
|
-
corners: "data-env-corners"
|
|
12
|
-
};
|
|
13
|
-
const lookValues = {
|
|
14
|
-
selection: ["neutral", "accent"],
|
|
15
|
-
corners: ["sharp", "rounded", "round"]
|
|
16
|
-
};
|
|
17
|
-
const setAttribute = (name, value) => `r.setAttribute(${JSON.stringify(name)},${JSON.stringify(value)});`;
|
|
18
|
-
function createThemeBootstrapScript(theme = {}) {
|
|
19
|
-
const {
|
|
20
|
-
storageKey = defaultThemeStorageKey,
|
|
21
|
-
defaultPreference = "system",
|
|
22
|
-
contrast = "system",
|
|
23
|
-
scale = "system"
|
|
24
|
-
} = theme;
|
|
25
|
-
const writeContrast = contrast === "high" || contrast === "standard" ? setAttribute("data-env-contrast", contrast) + setAttribute(contrastSourceAttribute, ownContrastSource(contrast)) : "";
|
|
26
|
-
const writeScale = scale === "compact" || scale === "comfortable" ? setAttribute("data-env-scale", scale) + setAttribute(scaleSourceAttribute, ownScaleSource(scale)) : "";
|
|
27
|
-
const writeLook = Object.keys(lookAttributes).map((setting) => {
|
|
28
|
-
const value = theme[setting];
|
|
29
|
-
return value !== void 0 && lookValues[setting].includes(value) ? setAttribute(lookAttributes[setting], value) : "";
|
|
30
|
-
}).join("");
|
|
31
|
-
return `(function(){var r=document.documentElement,t="light";try{var p=localStorage.getItem(${JSON.stringify(storageKey)});if(p!=="light"&&p!=="dark"&&p!=="system")p=${JSON.stringify(defaultPreference)};t=p==="system"?(matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"):p}catch(e){}r.classList.add("env-theme");r.setAttribute("data-env-theme",t);${writeContrast}${writeScale}${writeLook}r.style.colorScheme=t})();`;
|
|
5
|
+
function createThemeBootstrapScript(theme = {}, { preference = "system" } = {}) {
|
|
6
|
+
return themeBootstrapScript(theme, `var p=${JSON.stringify(preference)};`);
|
|
32
7
|
}
|
|
33
8
|
export {
|
|
34
|
-
contrastSourceAttribute,
|
|
35
9
|
createThemeBootstrapScript,
|
|
36
|
-
|
|
37
|
-
defineTheme,
|
|
38
|
-
lookAttributes,
|
|
39
|
-
ownContrastSource,
|
|
40
|
-
ownScaleSource,
|
|
41
|
-
scaleSourceAttribute
|
|
10
|
+
defineTheme
|
|
42
11
|
};
|
|
43
12
|
//# sourceMappingURL=themeBootstrap.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/foundations/themeBootstrap.ts"],
|
|
4
|
-
"sourcesContent": ["import type { ThemeContrast, ThemeCorners, ThemeScale, ThemeSelection } from './Theme.js';\n\n/**
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import type { ThemeContrast, ThemeCorners, ThemeScale, ThemeSelection } from './Theme.js';\nimport { themeBootstrapScript } from '../internal/theme/themeRoot.js';\n\n/** A theme preference: an explicit theme or the operating system's. */\nexport type ThemePreference = 'light' | 'dark' | 'system';\n\n/**\n * An application's theme, defined once with defineTheme and given to both\n * ThemePreferenceProvider's `theme` and createThemeBootstrapScript, so the first paint and the\n * application agree.\n */\nexport interface ThemeDefinition {\n /**\n * `high` for the high-contrast colors, `standard` for the standard ones even while the system\n * asks for more, `system` to follow `prefers-contrast: more`. The bootstrap script writes `high`\n * and `standard` to the root before the first paint, marked with `data-env-contrast-source`, so\n * the provider takes it as its own. Left out, the provider takes an enclosing Theme's contrast,\n * or one the page set on the root, and else `system`.\n */\n contrast?: ThemeContrast;\n /**\n * The app scale: comfortable, compact, or `system`, compact under a fine pointer and comfortable\n * on touch. The bootstrap script writes `compact` and `comfortable` to the root before the first\n * paint, marked with `data-env-scale-source`. Left out, the provider takes an enclosing Theme's\n * scale, or one the page set on the root, and else `system`.\n */\n scale?: ThemeScale;\n /**\n * The tone of what is selected: neutral, a gray under the text color, or accent, the brand's\n * tint. Left out, an enclosing Theme's, and else neutral.\n */\n selection?: ThemeSelection;\n /**\n * The corner shape: sharp, rounded or round. Left out, an enclosing Theme's, and else rounded.\n */\n corners?: ThemeCorners;\n}\n\n/**\n * Defines an application's theme once, for ThemePreferenceProvider's `theme` and\n * createThemeBootstrapScript, so the two can't drift apart.\n */\nexport function defineTheme(definition: ThemeDefinition = {}): Readonly<ThemeDefinition> {\n return Object.freeze({ ...definition });\n}\n\nexport interface ThemeBootstrapOptions {\n /**\n * The preference the first paint shows, such as the one the server read for this request from\n * the application's cookie or account.\n * @default 'system'\n */\n preference?: ThemePreference;\n}\n\n/**\n * Inline script for the document head. It themes the root element before the first paint, so a\n * chosen or system dark theme does not flash light while the application loads, and the contrast,\n * scale, selection and corners of the theme apply from the start. Give it the theme and the\n * preference ThemePreferenceProvider takes.\n */\nexport function createThemeBootstrapScript(\n theme: ThemeDefinition = {},\n { preference = 'system' }: ThemeBootstrapOptions = {},\n) {\n return themeBootstrapScript(theme, `var p=${JSON.stringify(preference)};`);\n}\n"],
|
|
5
|
+
"mappings": "AACA,SAAS,4BAA4B;AAyC9B,SAAS,YAAY,aAA8B,CAAC,GAA8B;AACvF,SAAO,OAAO,OAAO,EAAE,GAAG,WAAW,CAAC;AACxC;AAiBO,SAAS,2BACd,QAAyB,CAAC,GAC1B,EAAE,aAAa,SAAS,IAA2B,CAAC,GACpD;AACA,SAAO,qBAAqB,OAAO,SAAS,KAAK,UAAU,UAAU,CAAC,GAAG;AAC3E;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ThemeDefinition, ThemePreference } from './themeBootstrap.js';
|
|
2
|
+
/** Where the browser keeps the theme preference: the same for the hook and the head script. */
|
|
3
|
+
export interface ThemeStorageOptions {
|
|
4
|
+
/**
|
|
5
|
+
* The localStorage key the preference is kept under.
|
|
6
|
+
* @default 'env-theme'
|
|
7
|
+
*/
|
|
8
|
+
storageKey?: string;
|
|
9
|
+
/**
|
|
10
|
+
* The preference while nothing is stored.
|
|
11
|
+
* @default 'system'
|
|
12
|
+
*/
|
|
13
|
+
defaultPreference?: ThemePreference;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Inline script for the document head of an application that keeps the theme preference with
|
|
17
|
+
* useStoredThemePreference: createThemeBootstrapScript's script, with the preference stored in
|
|
18
|
+
* localStorage, so a stored dark theme does not flash light while the application loads.
|
|
19
|
+
*/
|
|
20
|
+
export declare function createStoredThemeBootstrapScript(theme?: ThemeDefinition, { storageKey, defaultPreference }?: ThemeStorageOptions): string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { themeBootstrapScript } from "../internal/theme/themeRoot.js";
|
|
2
|
+
import { defaultThemeStorageKey } from "./internal/storedPreference.js";
|
|
3
|
+
function createStoredThemeBootstrapScript(theme = {}, { storageKey = defaultThemeStorageKey, defaultPreference = "system" } = {}) {
|
|
4
|
+
return themeBootstrapScript(
|
|
5
|
+
theme,
|
|
6
|
+
`var p=localStorage.getItem(${JSON.stringify(storageKey)});if(p!=="light"&&p!=="dark"&&p!=="system")p=${JSON.stringify(defaultPreference)};`
|
|
7
|
+
);
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
createStoredThemeBootstrapScript
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=themeStorage.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/foundations/themeStorage.ts"],
|
|
4
|
+
"sourcesContent": ["import type { ThemeDefinition, ThemePreference } from './themeBootstrap.js';\nimport { themeBootstrapScript } from '../internal/theme/themeRoot.js';\nimport { defaultThemeStorageKey } from './internal/storedPreference.js';\n\n/** Where the browser keeps the theme preference: the same for the hook and the head script. */\nexport interface ThemeStorageOptions {\n /**\n * The localStorage key the preference is kept under.\n * @default 'env-theme'\n */\n storageKey?: string;\n /**\n * The preference while nothing is stored.\n * @default 'system'\n */\n defaultPreference?: ThemePreference;\n}\n\n/**\n * Inline script for the document head of an application that keeps the theme preference with\n * useStoredThemePreference: createThemeBootstrapScript's script, with the preference stored in\n * localStorage, so a stored dark theme does not flash light while the application loads.\n */\nexport function createStoredThemeBootstrapScript(\n theme: ThemeDefinition = {},\n { storageKey = defaultThemeStorageKey, defaultPreference = 'system' }: ThemeStorageOptions = {},\n) {\n return themeBootstrapScript(\n theme,\n `var p=localStorage.getItem(${JSON.stringify(storageKey)});if(p!==\"light\"&&p!==\"dark\"&&p!==\"system\")p=${JSON.stringify(defaultPreference)};`,\n );\n}\n"],
|
|
5
|
+
"mappings": "AACA,SAAS,4BAA4B;AACrC,SAAS,8BAA8B;AAqBhC,SAAS,iCACd,QAAyB,CAAC,GAC1B,EAAE,aAAa,wBAAwB,oBAAoB,SAAS,IAAyB,CAAC,GAC9F;AACA,SAAO;AAAA,IACL;AAAA,IACA,8BAA8B,KAAK,UAAU,UAAU,CAAC,gDAAgD,KAAK,UAAU,iBAAiB,CAAC;AAAA,EAC3I;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useLayoutEffect, useState } from "react";
|
|
3
3
|
import { pixelsOf } from "../internal/dom/lengths.js";
|
|
4
|
+
import { observeResize } from "../internal/dom/observeResize.js";
|
|
4
5
|
function measureAsResizeObserverWould(element, box) {
|
|
5
6
|
const style = getComputedStyle(element);
|
|
6
7
|
let width;
|
|
@@ -32,17 +33,18 @@ function useContainerSize(target, options = {}) {
|
|
|
32
33
|
(previous) => previous?.inlineSize === next.inlineSize && previous.blockSize === next.blockSize ? previous : next
|
|
33
34
|
);
|
|
34
35
|
if (hasBox(element)) update(measureAsResizeObserverWould(element, box));
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
36
|
+
return observeResize(
|
|
37
|
+
element,
|
|
38
|
+
([entry]) => {
|
|
39
|
+
if (!entry || !hasBox(element)) return;
|
|
40
|
+
const sizes = box === "border-box" ? entry.borderBoxSize : entry.contentBoxSize;
|
|
41
|
+
const first = sizes?.[0];
|
|
42
|
+
update(
|
|
43
|
+
first ? { inlineSize: first.inlineSize, blockSize: first.blockSize } : measureAsResizeObserverWould(element, box)
|
|
44
|
+
);
|
|
45
|
+
},
|
|
46
|
+
{ box }
|
|
47
|
+
);
|
|
46
48
|
}, [target, box]);
|
|
47
49
|
return size;
|
|
48
50
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/foundations/useContainerSize.ts"],
|
|
4
|
-
"sourcesContent": ["'use client';\n\nimport { useLayoutEffect, useState, type RefObject } from 'react';\nimport { pixelsOf } from '../internal/dom/lengths.js';\n\n/** An element's size along its own writing mode, in CSS pixels. */\nexport interface ContainerSize {\n /** The size along the line: the width in horizontal text, the height in vertical text. */\n inlineSize: number;\n /** The size across the lines: the height in horizontal text, the width in vertical text. */\n blockSize: number;\n}\n\nexport interface ContainerSizeOptions {\n /**\n * Which box to measure: content-box, inside the padding and the scrollbar, or border-box, the\n * element's whole box with its padding and border.\n * @default 'content-box'\n */\n box?: 'content-box' | 'border-box';\n}\n\nfunction measureAsResizeObserverWould(\n element: Element,\n box: 'content-box' | 'border-box',\n): ContainerSize {\n const style = getComputedStyle(element);\n let width: number;\n let height: number;\n if (element instanceof HTMLElement) {\n if (box === 'border-box') {\n width = element.offsetWidth;\n height = element.offsetHeight;\n } else {\n width = element.clientWidth - pixelsOf(style.paddingLeft) - pixelsOf(style.paddingRight);\n height = element.clientHeight - pixelsOf(style.paddingTop) - pixelsOf(style.paddingBottom);\n }\n } else {\n const rect = element.getBoundingClientRect();\n width = rect.width;\n height = rect.height;\n }\n const vertical = !style.writingMode.startsWith('horizontal') && style.writingMode !== '';\n return vertical\n ? { inlineSize: Math.max(0, height), blockSize: Math.max(0, width) }\n : { inlineSize: Math.max(0, width), blockSize: Math.max(0, height) };\n}\n\nconst hasBox = (element: Element) => element.getClientRects().length > 0;\n\n/**\n * The size of an element, kept up to date as it changes: its inline and block size in CSS pixels,\n * along its writing mode, from a ResizeObserver. It is undefined on the server and until the\n * element is measured, which happens before the browser paints it; an element that stops being\n * rendered, such as one in a hidden tab panel, keeps its last size until it shows again.\n *\n * Pass a ref object, read once the element mounts, or the element itself, such as one kept in\n * state by a callback ref. Prefer a container query (`@container`) where only styles change.\n *\n * const panel = useRef<HTMLDivElement>(null);\n * const size = useContainerSize(panel);\n * const narrow = size !== undefined && size.inlineSize < 640;\n */\nexport function useContainerSize<T extends Element>(\n target: RefObject<T | null> | T | null,\n options: ContainerSizeOptions = {},\n): ContainerSize | undefined {\n const { box = 'content-box' } = options;\n const [size, setSize] = useState<ContainerSize>();\n\n useLayoutEffect(() => {\n const element = target && 'current' in target ? target.current : target;\n if (!element) return;\n const update = (next: ContainerSize) =>\n setSize((previous) =>\n previous?.inlineSize === next.inlineSize && previous.blockSize === next.blockSize\n ? previous\n : next,\n );\n if (hasBox(element)) update(measureAsResizeObserverWould(element, box));\n
|
|
5
|
-
"mappings": ";AAEA,SAAS,iBAAiB,gBAAgC;AAC1D,SAAS,gBAAgB;
|
|
4
|
+
"sourcesContent": ["'use client';\n\nimport { useLayoutEffect, useState, type RefObject } from 'react';\nimport { pixelsOf } from '../internal/dom/lengths.js';\nimport { observeResize } from '../internal/dom/observeResize.js';\n\n/** An element's size along its own writing mode, in CSS pixels. */\nexport interface ContainerSize {\n /** The size along the line: the width in horizontal text, the height in vertical text. */\n inlineSize: number;\n /** The size across the lines: the height in horizontal text, the width in vertical text. */\n blockSize: number;\n}\n\nexport interface ContainerSizeOptions {\n /**\n * Which box to measure: content-box, inside the padding and the scrollbar, or border-box, the\n * element's whole box with its padding and border.\n * @default 'content-box'\n */\n box?: 'content-box' | 'border-box';\n}\n\nfunction measureAsResizeObserverWould(\n element: Element,\n box: 'content-box' | 'border-box',\n): ContainerSize {\n const style = getComputedStyle(element);\n let width: number;\n let height: number;\n if (element instanceof HTMLElement) {\n if (box === 'border-box') {\n width = element.offsetWidth;\n height = element.offsetHeight;\n } else {\n width = element.clientWidth - pixelsOf(style.paddingLeft) - pixelsOf(style.paddingRight);\n height = element.clientHeight - pixelsOf(style.paddingTop) - pixelsOf(style.paddingBottom);\n }\n } else {\n const rect = element.getBoundingClientRect();\n width = rect.width;\n height = rect.height;\n }\n const vertical = !style.writingMode.startsWith('horizontal') && style.writingMode !== '';\n return vertical\n ? { inlineSize: Math.max(0, height), blockSize: Math.max(0, width) }\n : { inlineSize: Math.max(0, width), blockSize: Math.max(0, height) };\n}\n\nconst hasBox = (element: Element) => element.getClientRects().length > 0;\n\n/**\n * The size of an element, kept up to date as it changes: its inline and block size in CSS pixels,\n * along its writing mode, from a ResizeObserver. It is undefined on the server and until the\n * element is measured, which happens before the browser paints it; an element that stops being\n * rendered, such as one in a hidden tab panel, keeps its last size until it shows again.\n *\n * Pass a ref object, read once the element mounts, or the element itself, such as one kept in\n * state by a callback ref. Prefer a container query (`@container`) where only styles change.\n *\n * const panel = useRef<HTMLDivElement>(null);\n * const size = useContainerSize(panel);\n * const narrow = size !== undefined && size.inlineSize < 640;\n */\nexport function useContainerSize<T extends Element>(\n target: RefObject<T | null> | T | null,\n options: ContainerSizeOptions = {},\n): ContainerSize | undefined {\n const { box = 'content-box' } = options;\n const [size, setSize] = useState<ContainerSize>();\n\n useLayoutEffect(() => {\n const element = target && 'current' in target ? target.current : target;\n if (!element) return;\n const update = (next: ContainerSize) =>\n setSize((previous) =>\n previous?.inlineSize === next.inlineSize && previous.blockSize === next.blockSize\n ? previous\n : next,\n );\n if (hasBox(element)) update(measureAsResizeObserverWould(element, box));\n return observeResize(\n element,\n ([entry]) => {\n if (!entry || !hasBox(element)) return;\n const sizes = box === 'border-box' ? entry.borderBoxSize : entry.contentBoxSize;\n const first = sizes?.[0];\n update(\n first\n ? { inlineSize: first.inlineSize, blockSize: first.blockSize }\n : measureAsResizeObserverWould(element, box),\n );\n },\n { box },\n );\n }, [target, box]);\n\n return size;\n}\n"],
|
|
5
|
+
"mappings": ";AAEA,SAAS,iBAAiB,gBAAgC;AAC1D,SAAS,gBAAgB;AACzB,SAAS,qBAAqB;AAmB9B,SAAS,6BACP,SACA,KACe;AACf,QAAM,QAAQ,iBAAiB,OAAO;AACtC,MAAI;AACJ,MAAI;AACJ,MAAI,mBAAmB,aAAa;AAClC,QAAI,QAAQ,cAAc;AACxB,cAAQ,QAAQ;AAChB,eAAS,QAAQ;AAAA,IACnB,OAAO;AACL,cAAQ,QAAQ,cAAc,SAAS,MAAM,WAAW,IAAI,SAAS,MAAM,YAAY;AACvF,eAAS,QAAQ,eAAe,SAAS,MAAM,UAAU,IAAI,SAAS,MAAM,aAAa;AAAA,IAC3F;AAAA,EACF,OAAO;AACL,UAAM,OAAO,QAAQ,sBAAsB;AAC3C,YAAQ,KAAK;AACb,aAAS,KAAK;AAAA,EAChB;AACA,QAAM,WAAW,CAAC,MAAM,YAAY,WAAW,YAAY,KAAK,MAAM,gBAAgB;AACtF,SAAO,WACH,EAAE,YAAY,KAAK,IAAI,GAAG,MAAM,GAAG,WAAW,KAAK,IAAI,GAAG,KAAK,EAAE,IACjE,EAAE,YAAY,KAAK,IAAI,GAAG,KAAK,GAAG,WAAW,KAAK,IAAI,GAAG,MAAM,EAAE;AACvE;AAEA,MAAM,SAAS,CAAC,YAAqB,QAAQ,eAAe,EAAE,SAAS;AAehE,SAAS,iBACd,QACA,UAAgC,CAAC,GACN;AAC3B,QAAM,EAAE,MAAM,cAAc,IAAI;AAChC,QAAM,CAAC,MAAM,OAAO,IAAI,SAAwB;AAEhD,kBAAgB,MAAM;AACpB,UAAM,UAAU,UAAU,aAAa,SAAS,OAAO,UAAU;AACjE,QAAI,CAAC,QAAS;AACd,UAAM,SAAS,CAAC,SACd;AAAA,MAAQ,CAAC,aACP,UAAU,eAAe,KAAK,cAAc,SAAS,cAAc,KAAK,YACpE,WACA;AAAA,IACN;AACF,QAAI,OAAO,OAAO,EAAG,QAAO,6BAA6B,SAAS,GAAG,CAAC;AACtE,WAAO;AAAA,MACL;AAAA,MACA,CAAC,CAAC,KAAK,MAAM;AACX,YAAI,CAAC,SAAS,CAAC,OAAO,OAAO,EAAG;AAChC,cAAM,QAAQ,QAAQ,eAAe,MAAM,gBAAgB,MAAM;AACjE,cAAM,QAAQ,QAAQ,CAAC;AACvB;AAAA,UACE,QACI,EAAE,YAAY,MAAM,YAAY,WAAW,MAAM,UAAU,IAC3D,6BAA6B,SAAS,GAAG;AAAA,QAC/C;AAAA,MACF;AAAA,MACA,EAAE,IAAI;AAAA,IACR;AAAA,EACF,GAAG,CAAC,QAAQ,GAAG,CAAC;AAEhB,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useContext } from "react";
|
|
3
|
+
import { SkeletonContext } from "../internal/skeleton/SkeletonContext.js";
|
|
4
|
+
function useSkeleton() {
|
|
5
|
+
return useContext(SkeletonContext);
|
|
6
|
+
}
|
|
7
|
+
export {
|
|
8
|
+
useSkeleton
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=useSkeleton.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/foundations/useSkeleton.ts"],
|
|
4
|
+
"sourcesContent": ["'use client';\n\nimport { useContext } from 'react';\nimport { SkeletonContext } from '../internal/skeleton/SkeletonContext.js';\n\n/**\n * Whether the component is inside a skeleton: a surface with `skeleton` around it. A component of\n * the application's own reads it to give its skeleton a look of its own, such as a chart's.\n */\nexport function useSkeleton(): boolean {\n return useContext(SkeletonContext);\n}\n"],
|
|
5
|
+
"mappings": ";AAEA,SAAS,kBAAkB;AAC3B,SAAS,uBAAuB;AAMzB,SAAS,cAAuB;AACrC,SAAO,WAAW,eAAe;AACnC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ThemePreference } from './themeBootstrap.js';
|
|
2
|
+
import type { ThemeStorageOptions } from './themeStorage.js';
|
|
3
|
+
/** What useStoredThemePreference returns, to spread on ThemePreferenceProvider. */
|
|
4
|
+
export interface StoredThemePreference {
|
|
5
|
+
/** The stored preference, or the default while nothing is stored. */
|
|
6
|
+
preference: ThemePreference;
|
|
7
|
+
/** Stores a preference. */
|
|
8
|
+
onPreferenceChange: (preference: ThemePreference) => void;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Keeps the theme preference in localStorage, follows a choice made in another window of the
|
|
12
|
+
* same origin, and keeps a choice for the page's life where storage is blocked. Spread what it
|
|
13
|
+
* returns on ThemePreferenceProvider, and give createStoredThemeBootstrapScript the same options.
|
|
14
|
+
* On the server and while the page hydrates it returns the default, as the server rendered it.
|
|
15
|
+
*/
|
|
16
|
+
export declare function useStoredThemePreference({ storageKey, defaultPreference, }?: ThemeStorageOptions): StoredThemePreference;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useCallback, useMemo, useSyncExternalStore } from "react";
|
|
3
|
+
import { defaultThemeStorageKey, isThemePreference } from "./internal/storedPreference.js";
|
|
4
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
5
|
+
const keptWhereStorageIsBlocked = /* @__PURE__ */ new Map();
|
|
6
|
+
function readStorage(key) {
|
|
7
|
+
try {
|
|
8
|
+
return window.localStorage.getItem(key);
|
|
9
|
+
} catch {
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
function writeStorage(key, value) {
|
|
14
|
+
try {
|
|
15
|
+
window.localStorage.setItem(key, value);
|
|
16
|
+
return true;
|
|
17
|
+
} catch {
|
|
18
|
+
return false;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
function changedInStorage(event) {
|
|
22
|
+
try {
|
|
23
|
+
if (event.storageArea !== window.localStorage) return;
|
|
24
|
+
} catch {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
if (event.key === null) keptWhereStorageIsBlocked.clear();
|
|
28
|
+
else keptWhereStorageIsBlocked.delete(event.key);
|
|
29
|
+
for (const listener of listeners) listener();
|
|
30
|
+
}
|
|
31
|
+
function subscribe(listener) {
|
|
32
|
+
if (listeners.size === 0) window.addEventListener("storage", changedInStorage);
|
|
33
|
+
listeners.add(listener);
|
|
34
|
+
return () => {
|
|
35
|
+
listeners.delete(listener);
|
|
36
|
+
if (listeners.size === 0) window.removeEventListener("storage", changedInStorage);
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function useStoredThemePreference({
|
|
40
|
+
storageKey = defaultThemeStorageKey,
|
|
41
|
+
defaultPreference = "system"
|
|
42
|
+
} = {}) {
|
|
43
|
+
const read = useCallback(() => {
|
|
44
|
+
const kept = keptWhereStorageIsBlocked.get(storageKey);
|
|
45
|
+
if (kept !== void 0) return kept;
|
|
46
|
+
const stored = readStorage(storageKey);
|
|
47
|
+
return isThemePreference(stored) ? stored : defaultPreference;
|
|
48
|
+
}, [storageKey, defaultPreference]);
|
|
49
|
+
const preference = useSyncExternalStore(subscribe, read, () => defaultPreference);
|
|
50
|
+
const onPreferenceChange = useCallback(
|
|
51
|
+
(next) => {
|
|
52
|
+
if (writeStorage(storageKey, next)) keptWhereStorageIsBlocked.delete(storageKey);
|
|
53
|
+
else keptWhereStorageIsBlocked.set(storageKey, next);
|
|
54
|
+
for (const listener of listeners) listener();
|
|
55
|
+
},
|
|
56
|
+
[storageKey]
|
|
57
|
+
);
|
|
58
|
+
return useMemo(() => ({ preference, onPreferenceChange }), [preference, onPreferenceChange]);
|
|
59
|
+
}
|
|
60
|
+
export {
|
|
61
|
+
useStoredThemePreference
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=useStoredThemePreference.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/foundations/useStoredThemePreference.ts"],
|
|
4
|
+
"sourcesContent": ["'use client';\n\nimport { useCallback, useMemo, useSyncExternalStore } from 'react';\nimport type { ThemePreference } from './themeBootstrap.js';\nimport type { ThemeStorageOptions } from './themeStorage.js';\nimport { defaultThemeStorageKey, isThemePreference } from './internal/storedPreference.js';\n\n/** What useStoredThemePreference returns, to spread on ThemePreferenceProvider. */\nexport interface StoredThemePreference {\n /** The stored preference, or the default while nothing is stored. */\n preference: ThemePreference;\n /** Stores a preference. */\n onPreferenceChange: (preference: ThemePreference) => void;\n}\n\nconst listeners = new Set<() => void>();\nconst keptWhereStorageIsBlocked = new Map<string, ThemePreference>();\n\nfunction readStorage(key: string) {\n try {\n return window.localStorage.getItem(key);\n } catch {\n return null;\n }\n}\n\nfunction writeStorage(key: string, value: string) {\n try {\n window.localStorage.setItem(key, value);\n return true;\n } catch {\n return false;\n }\n}\n\nfunction changedInStorage(event: StorageEvent) {\n try {\n if (event.storageArea !== window.localStorage) return;\n } catch {\n return;\n }\n if (event.key === null) keptWhereStorageIsBlocked.clear();\n else keptWhereStorageIsBlocked.delete(event.key);\n for (const listener of listeners) listener();\n}\n\nfunction subscribe(listener: () => void) {\n if (listeners.size === 0) window.addEventListener('storage', changedInStorage);\n listeners.add(listener);\n return () => {\n listeners.delete(listener);\n if (listeners.size === 0) window.removeEventListener('storage', changedInStorage);\n };\n}\n\n/**\n * Keeps the theme preference in localStorage, follows a choice made in another window of the\n * same origin, and keeps a choice for the page's life where storage is blocked. Spread what it\n * returns on ThemePreferenceProvider, and give createStoredThemeBootstrapScript the same options.\n * On the server and while the page hydrates it returns the default, as the server rendered it.\n */\nexport function useStoredThemePreference({\n storageKey = defaultThemeStorageKey,\n defaultPreference = 'system',\n}: ThemeStorageOptions = {}): StoredThemePreference {\n const read = useCallback(() => {\n const kept = keptWhereStorageIsBlocked.get(storageKey);\n if (kept !== undefined) return kept;\n const stored = readStorage(storageKey);\n return isThemePreference(stored) ? stored : defaultPreference;\n }, [storageKey, defaultPreference]);\n const preference = useSyncExternalStore(subscribe, read, () => defaultPreference);\n const onPreferenceChange = useCallback(\n (next: ThemePreference) => {\n if (writeStorage(storageKey, next)) keptWhereStorageIsBlocked.delete(storageKey);\n else keptWhereStorageIsBlocked.set(storageKey, next);\n for (const listener of listeners) listener();\n },\n [storageKey],\n );\n return useMemo(() => ({ preference, onPreferenceChange }), [preference, onPreferenceChange]);\n}\n"],
|
|
5
|
+
"mappings": ";AAEA,SAAS,aAAa,SAAS,4BAA4B;AAG3D,SAAS,wBAAwB,yBAAyB;AAU1D,MAAM,YAAY,oBAAI,IAAgB;AACtC,MAAM,4BAA4B,oBAAI,IAA6B;AAEnE,SAAS,YAAY,KAAa;AAChC,MAAI;AACF,WAAO,OAAO,aAAa,QAAQ,GAAG;AAAA,EACxC,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAEA,SAAS,aAAa,KAAa,OAAe;AAChD,MAAI;AACF,WAAO,aAAa,QAAQ,KAAK,KAAK;AACtC,WAAO;AAAA,EACT,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAEA,SAAS,iBAAiB,OAAqB;AAC7C,MAAI;AACF,QAAI,MAAM,gBAAgB,OAAO,aAAc;AAAA,EACjD,QAAQ;AACN;AAAA,EACF;AACA,MAAI,MAAM,QAAQ,KAAM,2BAA0B,MAAM;AAAA,MACnD,2BAA0B,OAAO,MAAM,GAAG;AAC/C,aAAW,YAAY,UAAW,UAAS;AAC7C;AAEA,SAAS,UAAU,UAAsB;AACvC,MAAI,UAAU,SAAS,EAAG,QAAO,iBAAiB,WAAW,gBAAgB;AAC7E,YAAU,IAAI,QAAQ;AACtB,SAAO,MAAM;AACX,cAAU,OAAO,QAAQ;AACzB,QAAI,UAAU,SAAS,EAAG,QAAO,oBAAoB,WAAW,gBAAgB;AAAA,EAClF;AACF;AAQO,SAAS,yBAAyB;AAAA,EACvC,aAAa;AAAA,EACb,oBAAoB;AACtB,IAAyB,CAAC,GAA0B;AAClD,QAAM,OAAO,YAAY,MAAM;AAC7B,UAAM,OAAO,0BAA0B,IAAI,UAAU;AACrD,QAAI,SAAS,OAAW,QAAO;AAC/B,UAAM,SAAS,YAAY,UAAU;AACrC,WAAO,kBAAkB,MAAM,IAAI,SAAS;AAAA,EAC9C,GAAG,CAAC,YAAY,iBAAiB,CAAC;AAClC,QAAM,aAAa,qBAAqB,WAAW,MAAM,MAAM,iBAAiB;AAChF,QAAM,qBAAqB;AAAA,IACzB,CAAC,SAA0B;AACzB,UAAI,aAAa,YAAY,IAAI,EAAG,2BAA0B,OAAO,UAAU;AAAA,UAC1E,2BAA0B,IAAI,YAAY,IAAI;AACnD,iBAAW,YAAY,UAAW,UAAS;AAAA,IAC7C;AAAA,IACA,CAAC,UAAU;AAAA,EACb;AACA,SAAO,QAAQ,OAAO,EAAE,YAAY,mBAAmB,IAAI,CAAC,YAAY,kBAAkB,CAAC;AAC7F;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -26,5 +26,3 @@ export type WindowClass = keyof typeof windowClasses;
|
|
|
26
26
|
* const compact = size !== undefined && windowClassOf(size.inlineSize) === 'compact';
|
|
27
27
|
*/
|
|
28
28
|
export declare function windowClassOf(inlineSize: number): WindowClass;
|
|
29
|
-
/** The window class of a width in rem, as the dev mode's readout measures widths. */
|
|
30
|
-
export declare function windowClassOfRem(widthRem: number): WindowClass;
|
|
@@ -6,9 +6,7 @@ const windowClasses = {
|
|
|
6
6
|
large: "75rem"
|
|
7
7
|
};
|
|
8
8
|
function windowClassOf(inlineSize) {
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
function windowClassOfRem(widthRem) {
|
|
9
|
+
const widthRem = inlineSize / remPixels();
|
|
12
10
|
let found = "compact";
|
|
13
11
|
for (const [name, start] of Object.entries(windowClasses))
|
|
14
12
|
if (widthRem >= Number.parseFloat(start)) found = name;
|
|
@@ -16,7 +14,6 @@ function windowClassOfRem(widthRem) {
|
|
|
16
14
|
}
|
|
17
15
|
export {
|
|
18
16
|
windowClassOf,
|
|
19
|
-
windowClassOfRem,
|
|
20
17
|
windowClasses
|
|
21
18
|
};
|
|
22
19
|
//# sourceMappingURL=windowClasses.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/foundations/windowClasses.ts"],
|
|
4
|
-
"sourcesContent": ["import { remPixels } from '../internal/dom/lengths.js';\n\n/**\n * The window classes: ranges of a container's width at which arrangement may change, each given by\n * the width where it starts. compact is narrower than 37.5 rem, medium from 37.5 rem, expanded from\n * 52.5 rem and large from 75 rem (600, 840 and 1200 px at a 16 px root).\n *\n * envUI measures them on a container, never on the viewport: the outermost theme boundary is the\n * `env-window` container. Style sheets write compact first and switch up, as in\n * `@container env-window (width >= 37.5rem)`, so content without a window stays compact. CSS can't\n * read a custom property inside a query, so they write these widths literally; the\n * `--env-window-class-*` tokens hold the same values.\n */\nexport const windowClasses = {\n compact: '0rem',\n medium: '37.5rem',\n expanded: '52.5rem',\n large: '75rem',\n} as const;\n\n/** A window class: compact (< 37.5 rem), medium (< 52.5 rem), expanded (< 75 rem) or large. */\nexport type WindowClass = keyof typeof windowClasses;\n\n/**\n * The window class of a width in CSS pixels, such as useContainerSize's inlineSize, at the\n * document's root font size, as the window classes are in rem. Prefer a container query where only\n * styles change.\n *\n * const size = useContainerSize(panel);\n * const compact = size !== undefined && windowClassOf(size.inlineSize) === 'compact';\n */\nexport function windowClassOf(inlineSize: number): WindowClass {\n
|
|
5
|
-
"mappings": "AAAA,SAAS,iBAAiB;AAanB,MAAM,gBAAgB;AAAA,EAC3B,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,OAAO;AACT;AAaO,SAAS,cAAc,YAAiC;AAC7D,
|
|
4
|
+
"sourcesContent": ["import { remPixels } from '../internal/dom/lengths.js';\n\n/**\n * The window classes: ranges of a container's width at which arrangement may change, each given by\n * the width where it starts. compact is narrower than 37.5 rem, medium from 37.5 rem, expanded from\n * 52.5 rem and large from 75 rem (600, 840 and 1200 px at a 16 px root).\n *\n * envUI measures them on a container, never on the viewport: the outermost theme boundary is the\n * `env-window` container. Style sheets write compact first and switch up, as in\n * `@container env-window (width >= 37.5rem)`, so content without a window stays compact. CSS can't\n * read a custom property inside a query, so they write these widths literally; the\n * `--env-window-class-*` tokens hold the same values.\n */\nexport const windowClasses = {\n compact: '0rem',\n medium: '37.5rem',\n expanded: '52.5rem',\n large: '75rem',\n} as const;\n\n/** A window class: compact (< 37.5 rem), medium (< 52.5 rem), expanded (< 75 rem) or large. */\nexport type WindowClass = keyof typeof windowClasses;\n\n/**\n * The window class of a width in CSS pixels, such as useContainerSize's inlineSize, at the\n * document's root font size, as the window classes are in rem. Prefer a container query where only\n * styles change.\n *\n * const size = useContainerSize(panel);\n * const compact = size !== undefined && windowClassOf(size.inlineSize) === 'compact';\n */\nexport function windowClassOf(inlineSize: number): WindowClass {\n const widthRem = inlineSize / remPixels();\n let found: WindowClass = 'compact';\n for (const [name, start] of Object.entries(windowClasses) as [WindowClass, string][])\n if (widthRem >= Number.parseFloat(start)) found = name;\n return found;\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,iBAAiB;AAanB,MAAM,gBAAgB;AAAA,EAC3B,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,OAAO;AACT;AAaO,SAAS,cAAc,YAAiC;AAC7D,QAAM,WAAW,aAAa,UAAU;AACxC,MAAI,QAAqB;AACzB,aAAW,CAAC,MAAM,KAAK,KAAK,OAAO,QAAQ,aAAa;AACtD,QAAI,YAAY,OAAO,WAAW,KAAK,EAAG,SAAQ;AACpD,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|