@ifloppy/maxcraftmc-ui-svelte 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/LICENSE +201 -0
- package/NOTICE +11 -0
- package/README.md +122 -0
- package/css/_popover.scss +325 -0
- package/css/all.css +1 -0
- package/css/all.scss +81 -0
- package/css/g10.css +1 -0
- package/css/g10.scss +34 -0
- package/css/g100.css +1 -0
- package/css/g100.scss +33 -0
- package/css/g80.css +1 -0
- package/css/g80.scss +34 -0
- package/css/g90.css +1 -0
- package/css/g90.scss +33 -0
- package/css/maxcraft.css +3239 -0
- package/css/white.css +1 -0
- package/css/white.scss +33 -0
- package/docs/compatibility.md +53 -0
- package/docs/component-catalog.md +99 -0
- package/docs/consumer-checklist.md +42 -0
- package/docs/contributing.md +80 -0
- package/docs/hugo-integration.md +94 -0
- package/docs/installation.md +89 -0
- package/docs/publishing.md +74 -0
- package/docs/svelte-migration.md +123 -0
- package/docs/theme-tokens.md +60 -0
- package/examples/component-gallery/index.html +12 -0
- package/examples/component-gallery/src/App.svelte +474 -0
- package/examples/component-gallery/src/main.js +6 -0
- package/examples/component-gallery/vite.config.js +6 -0
- package/examples/hugo-head.html +25 -0
- package/examples/hugo-module-mounts.toml +34 -0
- package/examples/svelte-basic/+layout.svelte +11 -0
- package/examples/svelte-basic/+page.svelte +150 -0
- package/package.json +80 -0
- package/src/Accordion/Accordion.svelte +60 -0
- package/src/Accordion/AccordionItem.svelte +79 -0
- package/src/Accordion/AccordionSkeleton.svelte +63 -0
- package/src/Accordion/index.js +3 -0
- package/src/AspectRatio/AspectRatio.svelte +25 -0
- package/src/AspectRatio/index.js +1 -0
- package/src/Breadcrumb/Breadcrumb.svelte +40 -0
- package/src/Breadcrumb/BreadcrumbItem.svelte +46 -0
- package/src/Breadcrumb/BreadcrumbSkeleton.svelte +26 -0
- package/src/Breadcrumb/index.js +3 -0
- package/src/Breakpoint/Breakpoint.svelte +47 -0
- package/src/Breakpoint/breakpointObserver.d.ts +28 -0
- package/src/Breakpoint/breakpointObserver.js +82 -0
- package/src/Breakpoint/breakpoints.d.ts +11 -0
- package/src/Breakpoint/breakpoints.js +13 -0
- package/src/Breakpoint/index.d.ts +4 -0
- package/src/Breakpoint/index.js +3 -0
- package/src/Button/Button.svelte +212 -0
- package/src/Button/ButtonSet.svelte +12 -0
- package/src/Button/ButtonSkeleton.svelte +54 -0
- package/src/Button/index.js +3 -0
- package/src/Checkbox/Checkbox.svelte +130 -0
- package/src/Checkbox/CheckboxSkeleton.svelte +14 -0
- package/src/Checkbox/InlineCheckbox.svelte +41 -0
- package/src/Checkbox/index.js +3 -0
- package/src/CodeSnippet/CodeSnippet.svelte +280 -0
- package/src/CodeSnippet/CodeSnippetSkeleton.svelte +27 -0
- package/src/CodeSnippet/index.js +2 -0
- package/src/ComboBox/ComboBox.svelte +432 -0
- package/src/ComboBox/index.js +1 -0
- package/src/ComposedModal/ComposedModal.svelte +172 -0
- package/src/ComposedModal/ModalBody.svelte +22 -0
- package/src/ComposedModal/ModalFooter.svelte +90 -0
- package/src/ComposedModal/ModalHeader.svelte +65 -0
- package/src/ComposedModal/index.js +4 -0
- package/src/ContentSwitcher/ContentSwitcher.svelte +74 -0
- package/src/ContentSwitcher/Switch.svelte +72 -0
- package/src/ContentSwitcher/index.js +2 -0
- package/src/ContextMenu/ContextMenu.svelte +196 -0
- package/src/ContextMenu/ContextMenuDivider.svelte +1 -0
- package/src/ContextMenu/ContextMenuGroup.svelte +36 -0
- package/src/ContextMenu/ContextMenuOption.svelte +286 -0
- package/src/ContextMenu/ContextMenuRadioGroup.svelte +34 -0
- package/src/ContextMenu/index.js +5 -0
- package/src/CopyButton/CopyButton.svelte +82 -0
- package/src/CopyButton/index.js +1 -0
- package/src/DataTable/DataTable.svelte +609 -0
- package/src/DataTable/DataTableSkeleton.svelte +102 -0
- package/src/DataTable/DataTableTypes.d.ts +18 -0
- package/src/DataTable/Table.svelte +60 -0
- package/src/DataTable/TableBody.svelte +3 -0
- package/src/DataTable/TableCell.svelte +4 -0
- package/src/DataTable/TableContainer.svelte +28 -0
- package/src/DataTable/TableHead.svelte +5 -0
- package/src/DataTable/TableHeader.svelte +76 -0
- package/src/DataTable/TableRow.svelte +4 -0
- package/src/DataTable/Toolbar.svelte +34 -0
- package/src/DataTable/ToolbarBatchActions.svelte +99 -0
- package/src/DataTable/ToolbarContent.svelte +3 -0
- package/src/DataTable/ToolbarMenu.svelte +23 -0
- package/src/DataTable/ToolbarMenuItem.svelte +9 -0
- package/src/DataTable/ToolbarSearch.svelte +122 -0
- package/src/DataTable/index.js +15 -0
- package/src/DatePicker/DatePicker.svelte +271 -0
- package/src/DatePicker/DatePickerInput.svelte +173 -0
- package/src/DatePicker/DatePickerSkeleton.svelte +36 -0
- package/src/DatePicker/createCalendar.js +100 -0
- package/src/DatePicker/index.js +3 -0
- package/src/Dropdown/Dropdown.svelte +336 -0
- package/src/Dropdown/DropdownSkeleton.svelte +23 -0
- package/src/Dropdown/index.js +2 -0
- package/src/FileUploader/FileUploader.svelte +177 -0
- package/src/FileUploader/FileUploaderButton.svelte +125 -0
- package/src/FileUploader/FileUploaderDropContainer.svelte +129 -0
- package/src/FileUploader/FileUploaderItem.svelte +79 -0
- package/src/FileUploader/FileUploaderSkeleton.svelte +19 -0
- package/src/FileUploader/Filename.svelte +57 -0
- package/src/FileUploader/index.js +6 -0
- package/src/FluidForm/FluidForm.svelte +23 -0
- package/src/FluidForm/index.js +1 -0
- package/src/Form/Form.svelte +20 -0
- package/src/Form/index.js +1 -0
- package/src/FormGroup/FormGroup.svelte +44 -0
- package/src/FormGroup/index.js +1 -0
- package/src/FormItem/FormItem.svelte +12 -0
- package/src/FormItem/index.js +1 -0
- package/src/FormLabel/FormLabel.svelte +18 -0
- package/src/FormLabel/index.js +1 -0
- package/src/Grid/Column.svelte +119 -0
- package/src/Grid/Grid.svelte +58 -0
- package/src/Grid/Row.svelte +54 -0
- package/src/Grid/index.js +3 -0
- package/src/ImageLoader/ImageLoader.svelte +117 -0
- package/src/ImageLoader/index.js +1 -0
- package/src/InlineLoading/InlineLoading.svelte +82 -0
- package/src/InlineLoading/index.js +1 -0
- package/src/Link/Link.svelte +89 -0
- package/src/Link/OutboundLink.svelte +18 -0
- package/src/Link/index.js +2 -0
- package/src/ListBox/ListBox.svelte +64 -0
- package/src/ListBox/ListBoxField.svelte +67 -0
- package/src/ListBox/ListBoxMenu.svelte +18 -0
- package/src/ListBox/ListBoxMenuIcon.svelte +38 -0
- package/src/ListBox/ListBoxMenuItem.svelte +38 -0
- package/src/ListBox/ListBoxSelection.svelte +114 -0
- package/src/ListBox/index.js +6 -0
- package/src/ListItem/ListItem.svelte +12 -0
- package/src/ListItem/index.js +1 -0
- package/src/Loading/Loading.svelte +76 -0
- package/src/Loading/index.js +1 -0
- package/src/LocalStorage/LocalStorage.svelte +71 -0
- package/src/LocalStorage/index.js +1 -0
- package/src/Modal/Modal.svelte +304 -0
- package/src/Modal/index.js +1 -0
- package/src/Modal/modalStore.js +36 -0
- package/src/MultiSelect/MultiSelect.svelte +557 -0
- package/src/MultiSelect/index.js +1 -0
- package/src/Notification/InlineNotification.svelte +114 -0
- package/src/Notification/NotificationActionButton.svelte +18 -0
- package/src/Notification/NotificationButton.svelte +47 -0
- package/src/Notification/NotificationIcon.svelte +41 -0
- package/src/Notification/ToastNotification.svelte +131 -0
- package/src/Notification/index.js +5 -0
- package/src/NumberInput/NumberInput.svelte +279 -0
- package/src/NumberInput/NumberInputSkeleton.svelte +20 -0
- package/src/NumberInput/index.js +2 -0
- package/src/OrderedList/OrderedList.svelte +26 -0
- package/src/OrderedList/index.js +1 -0
- package/src/OverflowMenu/OverflowMenu.svelte +259 -0
- package/src/OverflowMenu/OverflowMenuItem.svelte +117 -0
- package/src/OverflowMenu/index.js +2 -0
- package/src/Pagination/Pagination.svelte +216 -0
- package/src/Pagination/PaginationSkeleton.svelte +24 -0
- package/src/Pagination/index.js +2 -0
- package/src/PaginationNav/PaginationItem.svelte +23 -0
- package/src/PaginationNav/PaginationNav.svelte +190 -0
- package/src/PaginationNav/PaginationOverflow.svelte +56 -0
- package/src/PaginationNav/index.js +1 -0
- package/src/Popover/Popover.svelte +73 -0
- package/src/Popover/index.js +1 -0
- package/src/ProgressBar/ProgressBar.svelte +110 -0
- package/src/ProgressBar/index.js +1 -0
- package/src/ProgressIndicator/ProgressIndicator.svelte +79 -0
- package/src/ProgressIndicator/ProgressIndicatorSkeleton.svelte +38 -0
- package/src/ProgressIndicator/ProgressStep.svelte +107 -0
- package/src/ProgressIndicator/index.js +3 -0
- package/src/RadioButton/RadioButton.svelte +93 -0
- package/src/RadioButton/RadioButtonSkeleton.svelte +13 -0
- package/src/RadioButton/index.js +2 -0
- package/src/RadioButtonGroup/RadioButtonGroup.svelte +120 -0
- package/src/RadioButtonGroup/index.js +1 -0
- package/src/RecursiveList/RecursiveList.svelte +38 -0
- package/src/RecursiveList/RecursiveListItem.svelte +19 -0
- package/src/RecursiveList/index.js +1 -0
- package/src/Search/Search.svelte +173 -0
- package/src/Search/SearchSkeleton.svelte +24 -0
- package/src/Search/index.js +2 -0
- package/src/Select/Select.svelte +248 -0
- package/src/Select/SelectItem.svelte +63 -0
- package/src/Select/SelectItemGroup.svelte +11 -0
- package/src/Select/SelectSkeleton.svelte +22 -0
- package/src/Select/index.js +4 -0
- package/src/SkeletonPlaceholder/SkeletonPlaceholder.svelte +10 -0
- package/src/SkeletonPlaceholder/index.js +1 -0
- package/src/SkeletonText/SkeletonText.svelte +50 -0
- package/src/SkeletonText/index.js +1 -0
- package/src/Slider/Slider.svelte +232 -0
- package/src/Slider/SliderSkeleton.svelte +28 -0
- package/src/Slider/index.js +2 -0
- package/src/StructuredList/StructuredList.svelte +53 -0
- package/src/StructuredList/StructuredListBody.svelte +13 -0
- package/src/StructuredList/StructuredListCell.svelte +22 -0
- package/src/StructuredList/StructuredListHead.svelte +13 -0
- package/src/StructuredList/StructuredListInput.svelte +45 -0
- package/src/StructuredList/StructuredListRow.svelte +44 -0
- package/src/StructuredList/StructuredListSkeleton.svelte +36 -0
- package/src/StructuredList/index.js +7 -0
- package/src/Tabs/Tab.svelte +74 -0
- package/src/Tabs/TabContent.svelte +26 -0
- package/src/Tabs/Tabs.svelte +168 -0
- package/src/Tabs/TabsSkeleton.svelte +34 -0
- package/src/Tabs/index.js +4 -0
- package/src/Tag/Tag.svelte +172 -0
- package/src/Tag/TagSkeleton.svelte +17 -0
- package/src/Tag/index.js +2 -0
- package/src/TextArea/TextArea.svelte +134 -0
- package/src/TextArea/TextAreaSkeleton.svelte +20 -0
- package/src/TextArea/index.js +2 -0
- package/src/TextInput/PasswordInput.svelte +265 -0
- package/src/TextInput/TextInput.svelte +249 -0
- package/src/TextInput/TextInputSkeleton.svelte +20 -0
- package/src/TextInput/index.js +3 -0
- package/src/Theme/Theme.svelte +120 -0
- package/src/Theme/index.js +1 -0
- package/src/Tile/ClickableTile.svelte +43 -0
- package/src/Tile/ExpandableTile.svelte +104 -0
- package/src/Tile/RadioTile.svelte +95 -0
- package/src/Tile/SelectableTile.svelte +95 -0
- package/src/Tile/Tile.svelte +18 -0
- package/src/Tile/TileGroup.svelte +66 -0
- package/src/Tile/index.js +6 -0
- package/src/TimePicker/TimePicker.svelte +115 -0
- package/src/TimePicker/TimePickerSelect.svelte +78 -0
- package/src/TimePicker/index.js +2 -0
- package/src/Toggle/Toggle.svelte +107 -0
- package/src/Toggle/ToggleSkeleton.svelte +51 -0
- package/src/Toggle/index.js +2 -0
- package/src/Tooltip/Tooltip.svelte +269 -0
- package/src/Tooltip/TooltipFooter.svelte +29 -0
- package/src/Tooltip/index.js +2 -0
- package/src/TooltipDefinition/TooltipDefinition.svelte +85 -0
- package/src/TooltipDefinition/index.js +1 -0
- package/src/TooltipIcon/TooltipIcon.svelte +83 -0
- package/src/TooltipIcon/index.js +1 -0
- package/src/TreeView/TreeView.svelte +266 -0
- package/src/TreeView/TreeViewNode.svelte +133 -0
- package/src/TreeView/TreeViewNodeList.svelte +179 -0
- package/src/TreeView/index.d.ts +1 -0
- package/src/TreeView/index.js +1 -0
- package/src/Truncate/Truncate.svelte +12 -0
- package/src/Truncate/index.js +2 -0
- package/src/Truncate/truncate.d.ts +12 -0
- package/src/Truncate/truncate.js +29 -0
- package/src/UIShell/Content.svelte +24 -0
- package/src/UIShell/HamburgerMenu.svelte +45 -0
- package/src/UIShell/Header.svelte +103 -0
- package/src/UIShell/HeaderAction.svelte +160 -0
- package/src/UIShell/HeaderActionLink.svelte +43 -0
- package/src/UIShell/HeaderGlobalAction.svelte +33 -0
- package/src/UIShell/HeaderNav.svelte +13 -0
- package/src/UIShell/HeaderNavItem.svelte +66 -0
- package/src/UIShell/HeaderNavMenu.svelte +106 -0
- package/src/UIShell/HeaderPanelDivider.svelte +22 -0
- package/src/UIShell/HeaderPanelLink.svelte +23 -0
- package/src/UIShell/HeaderPanelLinks.svelte +3 -0
- package/src/UIShell/HeaderSearch.svelte +338 -0
- package/src/UIShell/HeaderUtilities.svelte +3 -0
- package/src/UIShell/SideNav.svelte +84 -0
- package/src/UIShell/SideNavDivider.svelte +1 -0
- package/src/UIShell/SideNavItems.svelte +3 -0
- package/src/UIShell/SideNavLink.svelte +54 -0
- package/src/UIShell/SideNavMenu.svelte +59 -0
- package/src/UIShell/SideNavMenuItem.svelte +32 -0
- package/src/UIShell/SkipToContent.svelte +11 -0
- package/src/UIShell/index.js +20 -0
- package/src/UIShell/navStore.js +7 -0
- package/src/UnorderedList/UnorderedList.svelte +22 -0
- package/src/UnorderedList/index.js +1 -0
- package/src/icons/Add.svelte +28 -0
- package/src/icons/ArrowUp.svelte +28 -0
- package/src/icons/ArrowsVertical.svelte +28 -0
- package/src/icons/Calendar.svelte +28 -0
- package/src/icons/CaretDown.svelte +26 -0
- package/src/icons/CaretLeft.svelte +26 -0
- package/src/icons/CaretRight.svelte +26 -0
- package/src/icons/Checkmark.svelte +26 -0
- package/src/icons/CheckmarkFilled.svelte +32 -0
- package/src/icons/CheckmarkOutline.svelte +30 -0
- package/src/icons/ChevronDown.svelte +26 -0
- package/src/icons/ChevronRight.svelte +26 -0
- package/src/icons/CircleDash.svelte +28 -0
- package/src/icons/Close.svelte +28 -0
- package/src/icons/Copy.svelte +28 -0
- package/src/icons/EditOff.svelte +28 -0
- package/src/icons/ErrorFilled.svelte +33 -0
- package/src/icons/IconSearch.svelte +28 -0
- package/src/icons/Incomplete.svelte +28 -0
- package/src/icons/Information.svelte +30 -0
- package/src/icons/InformationFilled.svelte +32 -0
- package/src/icons/InformationSquareFilled.svelte +32 -0
- package/src/icons/Launch.svelte +30 -0
- package/src/icons/Menu.svelte +26 -0
- package/src/icons/OverflowMenuHorizontal.svelte +27 -0
- package/src/icons/OverflowMenuVertical.svelte +27 -0
- package/src/icons/Settings.svelte +30 -0
- package/src/icons/Subtract.svelte +26 -0
- package/src/icons/Switcher.svelte +28 -0
- package/src/icons/View.svelte +30 -0
- package/src/icons/ViewOff.svelte +30 -0
- package/src/icons/Warning.svelte +29 -0
- package/src/icons/WarningAltFilled.svelte +34 -0
- package/src/icons/WarningFilled.svelte +33 -0
- package/src/index.js +155 -0
- package/src/utils/toHierarchy.d.ts +21 -0
- package/src/utils/toHierarchy.js +49 -0
- package/tokens/maxcraft.css +84 -0
- package/types/Accordion/Accordion.svelte.d.ts +39 -0
- package/types/Accordion/AccordionItem.svelte.d.ts +48 -0
- package/types/Accordion/AccordionSkeleton.svelte.d.ts +45 -0
- package/types/AspectRatio/AspectRatio.svelte.d.ts +31 -0
- package/types/Breadcrumb/Breadcrumb.svelte.d.ts +27 -0
- package/types/Breadcrumb/BreadcrumbItem.svelte.d.ts +33 -0
- package/types/Breadcrumb/BreadcrumbSkeleton.svelte.d.ts +33 -0
- package/types/Breakpoint/Breakpoint.svelte.d.ts +30 -0
- package/types/Breakpoint/breakpointObserver.d.ts +28 -0
- package/types/Breakpoint/breakpoints.d.ts +11 -0
- package/types/Breakpoint/index.d.ts +4 -0
- package/types/Button/Button.svelte.d.ts +140 -0
- package/types/Button/ButtonSet.svelte.d.ts +22 -0
- package/types/Button/ButtonSkeleton.svelte.d.ts +35 -0
- package/types/Checkbox/Checkbox.svelte.d.ts +109 -0
- package/types/Checkbox/CheckboxSkeleton.svelte.d.ts +21 -0
- package/types/CodeSnippet/CodeSnippet.svelte.d.ts +140 -0
- package/types/CodeSnippet/CodeSnippetSkeleton.svelte.d.ts +27 -0
- package/types/ComboBox/ComboBox.svelte.d.ts +189 -0
- package/types/ComposedModal/ComposedModal.svelte.d.ts +69 -0
- package/types/ComposedModal/ModalBody.svelte.d.ts +28 -0
- package/types/ComposedModal/ModalFooter.svelte.d.ts +65 -0
- package/types/ComposedModal/ModalHeader.svelte.d.ts +58 -0
- package/types/ContentSwitcher/ContentSwitcher.svelte.d.ts +34 -0
- package/types/ContentSwitcher/Switch.svelte.d.ts +53 -0
- package/types/ContextMenu/ContextMenu.svelte.d.ts +53 -0
- package/types/ContextMenu/ContextMenuDivider.svelte.d.ts +9 -0
- package/types/ContextMenu/ContextMenuGroup.svelte.d.ts +20 -0
- package/types/ContextMenu/ContextMenuOption.svelte.d.ts +86 -0
- package/types/ContextMenu/ContextMenuRadioGroup.svelte.d.ts +21 -0
- package/types/CopyButton/CopyButton.svelte.d.ts +50 -0
- package/types/DataTable/DataTable.svelte.d.ts +238 -0
- package/types/DataTable/DataTableSkeleton.svelte.d.ts +67 -0
- package/types/DataTable/DataTableTypes.d.ts +18 -0
- package/types/DataTable/Table.svelte.d.ts +52 -0
- package/types/DataTable/TableBody.svelte.d.ts +16 -0
- package/types/DataTable/TableCell.svelte.d.ts +21 -0
- package/types/DataTable/TableContainer.svelte.d.ts +40 -0
- package/types/DataTable/TableHead.svelte.d.ts +21 -0
- package/types/DataTable/TableHeader.svelte.d.ts +57 -0
- package/types/DataTable/TableRow.svelte.d.ts +21 -0
- package/types/DataTable/Toolbar.svelte.d.ts +22 -0
- package/types/DataTable/ToolbarBatchActions.svelte.d.ts +28 -0
- package/types/DataTable/ToolbarContent.svelte.d.ts +9 -0
- package/types/DataTable/ToolbarMenu.svelte.d.ts +10 -0
- package/types/DataTable/ToolbarMenuItem.svelte.d.ts +10 -0
- package/types/DataTable/ToolbarSearch.svelte.d.ts +84 -0
- package/types/DatePicker/DatePicker.svelte.d.ts +105 -0
- package/types/DatePicker/DatePickerInput.svelte.d.ts +118 -0
- package/types/DatePicker/DatePickerSkeleton.svelte.d.ts +33 -0
- package/types/Dropdown/Dropdown.svelte.d.ts +160 -0
- package/types/Dropdown/DropdownSkeleton.svelte.d.ts +27 -0
- package/types/FileUploader/FileUploader.svelte.d.ts +104 -0
- package/types/FileUploader/FileUploaderButton.svelte.d.ts +98 -0
- package/types/FileUploader/FileUploaderDropContainer.svelte.d.ts +92 -0
- package/types/FileUploader/FileUploaderItem.svelte.d.ts +69 -0
- package/types/FileUploader/FileUploaderSkeleton.svelte.d.ts +21 -0
- package/types/FileUploader/Filename.svelte.d.ts +36 -0
- package/types/FluidForm/FluidForm.svelte.d.ts +23 -0
- package/types/Form/Form.svelte.d.ts +29 -0
- package/types/FormGroup/FormGroup.svelte.d.ts +57 -0
- package/types/FormItem/FormItem.svelte.d.ts +21 -0
- package/types/FormLabel/FormLabel.svelte.d.ts +27 -0
- package/types/Grid/Column.svelte.d.ts +92 -0
- package/types/Grid/Grid.svelte.d.ts +65 -0
- package/types/Grid/Row.svelte.d.ts +59 -0
- package/types/ImageLoader/ImageLoader.svelte.d.ts +64 -0
- package/types/InlineLoading/InlineLoading.svelte.d.ts +47 -0
- package/types/Link/Link.svelte.d.ts +64 -0
- package/types/Link/OutboundLink.svelte.d.ts +15 -0
- package/types/ListBox/ListBox.svelte.d.ts +70 -0
- package/types/ListBox/ListBoxField.svelte.d.ts +67 -0
- package/types/ListBox/ListBoxMenu.svelte.d.ts +28 -0
- package/types/ListBox/ListBoxMenuIcon.svelte.d.ts +35 -0
- package/types/ListBox/ListBoxMenuItem.svelte.d.ts +38 -0
- package/types/ListBox/ListBoxSelection.svelte.d.ts +47 -0
- package/types/ListItem/ListItem.svelte.d.ts +21 -0
- package/types/Loading/Loading.svelte.d.ts +40 -0
- package/types/LocalStorage/LocalStorage.svelte.d.ts +34 -0
- package/types/Modal/Modal.svelte.d.ts +156 -0
- package/types/MultiSelect/MultiSelect.svelte.d.ts +264 -0
- package/types/Notification/InlineNotification.svelte.d.ts +82 -0
- package/types/Notification/NotificationActionButton.svelte.d.ts +15 -0
- package/types/Notification/NotificationButton.svelte.d.ts +45 -0
- package/types/Notification/NotificationIcon.svelte.d.ts +33 -0
- package/types/Notification/ToastNotification.svelte.d.ts +95 -0
- package/types/NumberInput/NumberInput.svelte.d.ts +168 -0
- package/types/NumberInput/NumberInputSkeleton.svelte.d.ts +27 -0
- package/types/OrderedList/OrderedList.svelte.d.ts +39 -0
- package/types/OverflowMenu/OverflowMenu.svelte.d.ts +96 -0
- package/types/OverflowMenu/OverflowMenuItem.svelte.d.ts +71 -0
- package/types/Pagination/Pagination.svelte.d.ts +129 -0
- package/types/Pagination/PaginationSkeleton.svelte.d.ts +21 -0
- package/types/PaginationNav/PaginationNav.svelte.d.ts +63 -0
- package/types/Popover/Popover.svelte.d.ts +70 -0
- package/types/ProgressBar/ProgressBar.svelte.d.ts +70 -0
- package/types/ProgressIndicator/ProgressIndicator.svelte.d.ts +46 -0
- package/types/ProgressIndicator/ProgressIndicatorSkeleton.svelte.d.ts +34 -0
- package/types/ProgressIndicator/ProgressStep.svelte.d.ts +70 -0
- package/types/RadioButton/RadioButton.svelte.d.ts +80 -0
- package/types/RadioButton/RadioButtonSkeleton.svelte.d.ts +21 -0
- package/types/RadioButtonGroup/RadioButtonGroup.svelte.d.ts +76 -0
- package/types/RecursiveList/RecursiveList.svelte.d.ts +34 -0
- package/types/Search/Search.svelte.d.ts +128 -0
- package/types/Search/SearchSkeleton.svelte.d.ts +27 -0
- package/types/Select/Select.svelte.d.ts +124 -0
- package/types/Select/SelectItem.svelte.d.ts +46 -0
- package/types/Select/SelectItemGroup.svelte.d.ts +28 -0
- package/types/Select/SelectSkeleton.svelte.d.ts +27 -0
- package/types/SkeletonPlaceholder/SkeletonPlaceholder.svelte.d.ts +21 -0
- package/types/SkeletonText/SkeletonText.svelte.d.ts +45 -0
- package/types/Slider/Slider.svelte.d.ts +139 -0
- package/types/Slider/SliderSkeleton.svelte.d.ts +27 -0
- package/types/StructuredList/StructuredList.svelte.d.ts +46 -0
- package/types/StructuredList/StructuredListBody.svelte.d.ts +21 -0
- package/types/StructuredList/StructuredListCell.svelte.d.ts +33 -0
- package/types/StructuredList/StructuredListHead.svelte.d.ts +21 -0
- package/types/StructuredList/StructuredListInput.svelte.d.ts +52 -0
- package/types/StructuredList/StructuredListRow.svelte.d.ts +40 -0
- package/types/StructuredList/StructuredListSkeleton.svelte.d.ts +28 -0
- package/types/Tabs/Tab.svelte.d.ts +58 -0
- package/types/Tabs/TabContent.svelte.d.ts +22 -0
- package/types/Tabs/Tabs.svelte.d.ts +50 -0
- package/types/Tabs/TabsSkeleton.svelte.d.ts +33 -0
- package/types/Tag/Tag.svelte.d.ts +87 -0
- package/types/Tag/TagSkeleton.svelte.d.ts +26 -0
- package/types/TextArea/TextArea.svelte.d.ts +124 -0
- package/types/TextArea/TextAreaSkeleton.svelte.d.ts +27 -0
- package/types/TextInput/PasswordInput.svelte.d.ts +154 -0
- package/types/TextInput/TextInput.svelte.d.ts +139 -0
- package/types/TextInput/TextInputSkeleton.svelte.d.ts +27 -0
- package/types/Theme/Theme.svelte.d.ts +58 -0
- package/types/Tile/ClickableTile.svelte.d.ts +46 -0
- package/types/Tile/ExpandableTile.svelte.d.ts +88 -0
- package/types/Tile/RadioTile.svelte.d.ts +77 -0
- package/types/Tile/SelectableTile.svelte.d.ts +84 -0
- package/types/Tile/Tile.svelte.d.ts +27 -0
- package/types/Tile/TileGroup.svelte.d.ts +46 -0
- package/types/TimePicker/TimePicker.svelte.d.ts +112 -0
- package/types/TimePicker/TimePickerSelect.svelte.d.ts +63 -0
- package/types/Toggle/Toggle.svelte.d.ts +80 -0
- package/types/Toggle/ToggleSkeleton.svelte.d.ts +39 -0
- package/types/Tooltip/Tooltip.svelte.d.ts +106 -0
- package/types/Tooltip/TooltipFooter.svelte.d.ts +15 -0
- package/types/TooltipDefinition/TooltipDefinition.svelte.d.ts +60 -0
- package/types/TooltipIcon/TooltipIcon.svelte.d.ts +65 -0
- package/types/TreeView/TreeView.svelte.d.ts +114 -0
- package/types/TreeView/index.d.ts +1 -0
- package/types/Truncate/Truncate.svelte.d.ts +21 -0
- package/types/Truncate/truncate.d.ts +12 -0
- package/types/UIShell/Content.svelte.d.ts +22 -0
- package/types/UIShell/Header.svelte.d.ts +93 -0
- package/types/UIShell/HeaderAction.svelte.d.ts +80 -0
- package/types/UIShell/HeaderActionLink.svelte.d.ts +40 -0
- package/types/UIShell/HeaderGlobalAction.svelte.d.ts +28 -0
- package/types/UIShell/HeaderNav.svelte.d.ts +16 -0
- package/types/UIShell/HeaderNavItem.svelte.d.ts +49 -0
- package/types/UIShell/HeaderNavMenu.svelte.d.ts +49 -0
- package/types/UIShell/HeaderPanelDivider.svelte.d.ts +9 -0
- package/types/UIShell/HeaderPanelLink.svelte.d.ts +28 -0
- package/types/UIShell/HeaderPanelLinks.svelte.d.ts +9 -0
- package/types/UIShell/HeaderSearch.svelte.d.ts +67 -0
- package/types/UIShell/HeaderUtilities.svelte.d.ts +9 -0
- package/types/UIShell/SideNav.svelte.d.ts +56 -0
- package/types/UIShell/SideNavDivider.svelte.d.ts +16 -0
- package/types/UIShell/SideNavItems.svelte.d.ts +9 -0
- package/types/UIShell/SideNavLink.svelte.d.ts +46 -0
- package/types/UIShell/SideNavMenu.svelte.d.ts +40 -0
- package/types/UIShell/SideNavMenuItem.svelte.d.ts +40 -0
- package/types/UIShell/SkipToContent.svelte.d.ts +28 -0
- package/types/UnorderedList/UnorderedList.svelte.d.ts +33 -0
- package/types/index.d.ts +169 -0
- package/types/utils/toHierarchy.d.ts +21 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.0
|
|
4
|
+
|
|
5
|
+
Initial MaxCraft compatibility package.
|
|
6
|
+
|
|
7
|
+
- Added full `carbon-components-svelte@0.89.4` component, type, and CSS
|
|
8
|
+
compatibility surface.
|
|
9
|
+
- Added `css/maxcraft.css` and `tokens/maxcraft.css`.
|
|
10
|
+
- Added API, CSS entrypoint, and docs checks.
|
|
11
|
+
- Added Svelte and Hugo usage examples.
|
|
12
|
+
- Added documentation for installation, migration, Hugo integration, tokens,
|
|
13
|
+
compatibility, contribution, and publishing.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2019 IBM
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/NOTICE
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
@ifloppy/maxcraftmc-ui-svelte
|
|
2
|
+
|
|
3
|
+
This product includes software derived from carbon-components-svelte 0.89.4.
|
|
4
|
+
|
|
5
|
+
carbon-components-svelte
|
|
6
|
+
Copyright IBM Corp. and carbon-components-svelte contributors.
|
|
7
|
+
Licensed under the Apache License, Version 2.0.
|
|
8
|
+
|
|
9
|
+
MaxCraft theme tokens and CSS customizations
|
|
10
|
+
Copyright MaxCraftMC contributors.
|
|
11
|
+
Licensed under the Apache License, Version 2.0.
|
package/README.md
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# @ifloppy/maxcraftmc-ui-svelte
|
|
2
|
+
|
|
3
|
+
MaxCraft themed compatibility build of `carbon-components-svelte@0.89.4`.
|
|
4
|
+
|
|
5
|
+
This package intentionally preserves the Carbon Svelte 0.89.4 component names,
|
|
6
|
+
exports, CSS entrypoints, types, props, events, and slot surface so existing
|
|
7
|
+
Svelte apps can migrate with minimal source changes.
|
|
8
|
+
|
|
9
|
+
## What This Package Is
|
|
10
|
+
|
|
11
|
+
`@ifloppy/maxcraftmc-ui-svelte` is the shared UI foundation for MaxCraft web
|
|
12
|
+
projects:
|
|
13
|
+
|
|
14
|
+
- Svelte component library compatible with `carbon-components-svelte@0.89.4`
|
|
15
|
+
- MaxCraft Minecraft-styled theme layer for Carbon class names
|
|
16
|
+
- CSS/token entrypoints that Hugo themes can reuse without Svelte
|
|
17
|
+
- Public package intended for MPCenter, MaxCraft Wiki, and future sites
|
|
18
|
+
|
|
19
|
+
The implementation is derived from Carbon Svelte 0.89.4 under Apache-2.0. The
|
|
20
|
+
theme tokens and visual overrides are MaxCraft-specific.
|
|
21
|
+
|
|
22
|
+
## Install
|
|
23
|
+
|
|
24
|
+
```sh
|
|
25
|
+
npm install @ifloppy/maxcraftmc-ui-svelte carbon-icons-svelte
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
For applications that already import `carbon-components-svelte`, use an npm
|
|
29
|
+
alias after the package is published:
|
|
30
|
+
|
|
31
|
+
```json
|
|
32
|
+
{
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"carbon-components-svelte": "npm:@ifloppy/maxcraftmc-ui-svelte@0.1.0",
|
|
35
|
+
"carbon-icons-svelte": "^13.5.0"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
During local development inside `mpc-solution`, use a file dependency:
|
|
41
|
+
|
|
42
|
+
```json
|
|
43
|
+
{
|
|
44
|
+
"dependencies": {
|
|
45
|
+
"carbon-components-svelte": "file:../maxcraft-ui",
|
|
46
|
+
"carbon-icons-svelte": "^13.5.0"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## CSS
|
|
52
|
+
|
|
53
|
+
Svelte applications can keep the original Carbon CSS import and add the
|
|
54
|
+
MaxCraft theme layer:
|
|
55
|
+
|
|
56
|
+
```js
|
|
57
|
+
import "carbon-components-svelte/css/all.css";
|
|
58
|
+
import "carbon-components-svelte/css/maxcraft.css";
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Hugo themes can mount this package's `css/` directory and include
|
|
62
|
+
`maxcraft.css` through Hugo Pipes.
|
|
63
|
+
|
|
64
|
+
## Docs
|
|
65
|
+
|
|
66
|
+
- [Installation](docs/installation.md)
|
|
67
|
+
- [Svelte migration guide](docs/svelte-migration.md)
|
|
68
|
+
- [Hugo integration guide](docs/hugo-integration.md)
|
|
69
|
+
- [Theme tokens](docs/theme-tokens.md)
|
|
70
|
+
- [Component catalog](docs/component-catalog.md)
|
|
71
|
+
- [Consumer migration checklist](docs/consumer-checklist.md)
|
|
72
|
+
- [Compatibility policy](docs/compatibility.md)
|
|
73
|
+
- [Contributing](docs/contributing.md)
|
|
74
|
+
- [Publishing and maintenance](docs/publishing.md)
|
|
75
|
+
- [Changelog](CHANGELOG.md)
|
|
76
|
+
|
|
77
|
+
## Quick Example
|
|
78
|
+
|
|
79
|
+
```svelte
|
|
80
|
+
<script>
|
|
81
|
+
import { Theme, Button, ClickableTile } from "carbon-components-svelte";
|
|
82
|
+
import "carbon-components-svelte/css/all.css";
|
|
83
|
+
import "carbon-components-svelte/css/maxcraft.css";
|
|
84
|
+
</script>
|
|
85
|
+
|
|
86
|
+
<Theme theme="white">
|
|
87
|
+
<ClickableTile href="/posts/address/">
|
|
88
|
+
<h3>服务器地址</h3>
|
|
89
|
+
<p>查看 Java / Bedrock 连接信息。</p>
|
|
90
|
+
</ClickableTile>
|
|
91
|
+
<Button href="/login">进入个人中心</Button>
|
|
92
|
+
</Theme>
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
More examples live in [examples](examples/).
|
|
96
|
+
|
|
97
|
+
## Verification
|
|
98
|
+
|
|
99
|
+
```sh
|
|
100
|
+
npm run check
|
|
101
|
+
npm run build
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
`npm run check` verifies that the public API exports and required CSS entrypoints
|
|
105
|
+
exist. `npm run build` also runs `npm pack --dry-run` to prove the package can be
|
|
106
|
+
published.
|
|
107
|
+
|
|
108
|
+
## Consumer Status
|
|
109
|
+
|
|
110
|
+
Current local consumers in `mpc-solution`:
|
|
111
|
+
|
|
112
|
+
- `mpc-web`: SvelteKit app using the component package through a local file alias.
|
|
113
|
+
- `maxcraftmc-wiki`: Hugo site using `css/maxcraft.css` through Hugo module mounts.
|
|
114
|
+
|
|
115
|
+
Use [Consumer migration checklist](docs/consumer-checklist.md) when adding new
|
|
116
|
+
apps or moving consumers from local file aliases to the published npm package.
|
|
117
|
+
|
|
118
|
+
## Attribution
|
|
119
|
+
|
|
120
|
+
The component source and type surface are derived from
|
|
121
|
+
`carbon-components-svelte@0.89.4`, licensed under Apache-2.0. MaxCraft theme
|
|
122
|
+
tokens and CSS customizations are maintained by MaxCraftMC.
|
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
// This file is inlined from `carbon-components@10.47` as
|
|
2
|
+
// Popover styles were removed since version 10.48.
|
|
3
|
+
|
|
4
|
+
//
|
|
5
|
+
// Copyright IBM Corp. 2016, 2018
|
|
6
|
+
//
|
|
7
|
+
// This source code is licensed under the Apache-2.0 license found in the
|
|
8
|
+
// LICENSE file in the root directory of this source tree.
|
|
9
|
+
//
|
|
10
|
+
|
|
11
|
+
@import 'carbon-components/scss/globals/scss/vars';
|
|
12
|
+
@import 'carbon-components/scss/globals/scss/helper-mixins';
|
|
13
|
+
@import 'carbon-components/scss/globals/scss/vendor/@carbon/elements/scss/import-once/import-once';
|
|
14
|
+
|
|
15
|
+
/// Popover component
|
|
16
|
+
/// @access private
|
|
17
|
+
/// @group components
|
|
18
|
+
@mixin popover {
|
|
19
|
+
$popover-text-color: $text-01;
|
|
20
|
+
$popover-caret-offset: 1rem;
|
|
21
|
+
$popover-offset: 8px;
|
|
22
|
+
|
|
23
|
+
.#{$prefix}--popover {
|
|
24
|
+
// Specify the distance between the popover and the trigger. This value must
|
|
25
|
+
// have a unit otherwise the `calc()` expression will not work
|
|
26
|
+
// stylelint-disable-next-line length-zero-no-unit
|
|
27
|
+
--cds-popover-offset: 0rem;
|
|
28
|
+
|
|
29
|
+
// Specify the distance that the caret should be offset from the side of the
|
|
30
|
+
// popover when not centered
|
|
31
|
+
--cds-popover-caret-offset: 1rem;
|
|
32
|
+
|
|
33
|
+
position: absolute;
|
|
34
|
+
z-index: z('floating');
|
|
35
|
+
display: none;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// We use a pseudo element inside of the popover to create a space between the
|
|
39
|
+
// target and the popover. This helps in situations like tooltips where you do
|
|
40
|
+
// not want the tooltip to disappear when the user moves from the target to
|
|
41
|
+
// the popover.
|
|
42
|
+
.#{$prefix}--popover::before {
|
|
43
|
+
position: absolute;
|
|
44
|
+
display: block;
|
|
45
|
+
content: '';
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.#{$prefix}--popover--open {
|
|
49
|
+
display: block;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.#{$prefix}--popover-contents {
|
|
53
|
+
@include box-shadow;
|
|
54
|
+
|
|
55
|
+
position: relative;
|
|
56
|
+
width: max-content;
|
|
57
|
+
max-width: rem(368px);
|
|
58
|
+
background-color: $ui-01;
|
|
59
|
+
border-radius: 2px;
|
|
60
|
+
color: $popover-text-color;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.#{$prefix}--popover--light .#{$prefix}--popover-contents {
|
|
64
|
+
background-color: $ui-background;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.#{$prefix}--popover--high-contrast .#{$prefix}--popover-contents {
|
|
68
|
+
background-color: $inverse-02;
|
|
69
|
+
color: $inverse-01;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.#{$prefix}--popover--caret {
|
|
73
|
+
--cds-popover-offset: 0.5rem;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.#{$prefix}--popover--caret .#{$prefix}--popover-contents::before,
|
|
77
|
+
.#{$prefix}--popover--caret .#{$prefix}--popover-contents::after {
|
|
78
|
+
position: absolute;
|
|
79
|
+
display: inline-block;
|
|
80
|
+
width: rem(8px);
|
|
81
|
+
height: rem(8px);
|
|
82
|
+
background-color: inherit;
|
|
83
|
+
content: '';
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.#{$prefix}--popover--caret .#{$prefix}--popover-contents::before {
|
|
87
|
+
z-index: -1;
|
|
88
|
+
box-shadow: 2px 2px 6px 0 rgba(0, 0, 0, 0.2);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// The popover's tooltip is created by drawing two 8px x 8px boxes, one for
|
|
92
|
+
// rendering the box-shadow that the popover content uses and another for
|
|
93
|
+
// layering on top of this box to create an effect of a popover caret with a
|
|
94
|
+
// box-shadow. The layer with the box-shadow is rendered behind the popover
|
|
95
|
+
// content, while the other is rendered above of the popover content.
|
|
96
|
+
|
|
97
|
+
//-----------------------------------------------------------------------------
|
|
98
|
+
// Bottom
|
|
99
|
+
//-----------------------------------------------------------------------------
|
|
100
|
+
.#{$prefix}--popover--bottom {
|
|
101
|
+
bottom: 0;
|
|
102
|
+
left: 50%;
|
|
103
|
+
transform: translate(-50%, calc(100% + var(--cds-popover-offset)));
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
@include place-caret(bottom) {
|
|
107
|
+
top: 0;
|
|
108
|
+
left: 50%;
|
|
109
|
+
transform: translate(-50%, -50%) rotate(45deg);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// Bottom left
|
|
113
|
+
.#{$prefix}--popover--bottom-left {
|
|
114
|
+
bottom: 0;
|
|
115
|
+
left: 0;
|
|
116
|
+
transform: translateY(calc(100% + var(--cds-popover-offset)));
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
@include place-caret(bottom-left) {
|
|
120
|
+
top: 0;
|
|
121
|
+
left: 0;
|
|
122
|
+
transform: translate(var(--cds-popover-caret-offset), -50%) rotate(45deg);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// Bottom right
|
|
126
|
+
.#{$prefix}--popover--bottom-right {
|
|
127
|
+
right: 0;
|
|
128
|
+
bottom: 0;
|
|
129
|
+
transform: translateY(calc(100% + var(--cds-popover-offset)));
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
@include place-caret(bottom-right) {
|
|
133
|
+
top: 0;
|
|
134
|
+
right: 0;
|
|
135
|
+
transform: translate(calc(-1 * var(--cds-popover-caret-offset)), -50%)
|
|
136
|
+
rotate(45deg);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// Hover area
|
|
140
|
+
.#{$prefix}--popover--bottom.#{$prefix}--popover::before,
|
|
141
|
+
.#{$prefix}--popover--bottom-left.#{$prefix}--popover::before,
|
|
142
|
+
.#{$prefix}--popover--bottom-right.#{$prefix}--popover::before {
|
|
143
|
+
top: 0;
|
|
144
|
+
right: 0;
|
|
145
|
+
left: 0;
|
|
146
|
+
height: var(--cds-popover-offset);
|
|
147
|
+
transform: translateY(-100%);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
//-----------------------------------------------------------------------------
|
|
151
|
+
// TOP
|
|
152
|
+
//-----------------------------------------------------------------------------
|
|
153
|
+
.#{$prefix}--popover--top {
|
|
154
|
+
bottom: 100%;
|
|
155
|
+
left: 50%;
|
|
156
|
+
transform: translate(-50%, calc(-1 * var(--cds-popover-offset)));
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
@include place-caret(top) {
|
|
160
|
+
bottom: 0;
|
|
161
|
+
left: 50%;
|
|
162
|
+
transform: translate(-50%, 50%) rotate(45deg);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// Top left
|
|
166
|
+
.#{$prefix}--popover--top-left {
|
|
167
|
+
bottom: 100%;
|
|
168
|
+
left: 0;
|
|
169
|
+
transform: translateY(calc(-1 * var(--cds-popover-offset)));
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
@include place-caret(top-left) {
|
|
173
|
+
bottom: 0;
|
|
174
|
+
left: 0;
|
|
175
|
+
transform: translate(var(--cds-popover-caret-offset), 50%) rotate(45deg);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// Top right
|
|
179
|
+
.#{$prefix}--popover--top-right {
|
|
180
|
+
right: 0;
|
|
181
|
+
bottom: 100%;
|
|
182
|
+
transform: translateY(calc(-1 * var(--cds-popover-offset)));
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
@include place-caret(top-right) {
|
|
186
|
+
right: 0;
|
|
187
|
+
bottom: 0;
|
|
188
|
+
transform: translate(calc(-1 * var(--cds-popover-caret-offset)), 50%)
|
|
189
|
+
rotate(45deg);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
// Hover area
|
|
193
|
+
.#{$prefix}--popover--top.#{$prefix}--popover::before,
|
|
194
|
+
.#{$prefix}--popover--top-left.#{$prefix}--popover::before,
|
|
195
|
+
.#{$prefix}--popover--top-right.#{$prefix}--popover::before {
|
|
196
|
+
right: 0;
|
|
197
|
+
bottom: 0;
|
|
198
|
+
left: 0;
|
|
199
|
+
height: var(--cds-popover-offset);
|
|
200
|
+
transform: translateY(100%);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
//-----------------------------------------------------------------------------
|
|
204
|
+
// Right
|
|
205
|
+
//-----------------------------------------------------------------------------
|
|
206
|
+
.#{$prefix}--popover--right {
|
|
207
|
+
top: 50%;
|
|
208
|
+
left: 100%;
|
|
209
|
+
transform: translate(var(--cds-popover-offset), -50%);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
@include place-caret(right) {
|
|
213
|
+
top: 50%;
|
|
214
|
+
left: 0;
|
|
215
|
+
transform: translate(-50%, -50%) rotate(45deg);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
// Right top
|
|
219
|
+
.#{$prefix}--popover--right-top {
|
|
220
|
+
top: 0;
|
|
221
|
+
left: 100%;
|
|
222
|
+
transform: translateX($popover-offset);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
@include place-caret(right-top) {
|
|
226
|
+
top: 0;
|
|
227
|
+
left: 0;
|
|
228
|
+
transform: translate(-50%, var(--cds-popover-caret-offset)) rotate(45deg);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
// Right bottom
|
|
232
|
+
.#{$prefix}--popover--right-bottom {
|
|
233
|
+
bottom: 0;
|
|
234
|
+
left: 100%;
|
|
235
|
+
transform: translateX(var(--cds-popover-offset));
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
@include place-caret(right-bottom) {
|
|
239
|
+
bottom: 0;
|
|
240
|
+
left: 0;
|
|
241
|
+
transform: translate(-50%, calc(-1 * var(--cds-popover-caret-offset)))
|
|
242
|
+
rotate(45deg);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
// Hover area
|
|
246
|
+
.#{$prefix}--popover--right.#{$prefix}--popover::before,
|
|
247
|
+
.#{$prefix}--popover--right-top.#{$prefix}--popover::before,
|
|
248
|
+
.#{$prefix}--popover--right-bottom.#{$prefix}--popover::before {
|
|
249
|
+
top: 0;
|
|
250
|
+
bottom: 0;
|
|
251
|
+
left: 0;
|
|
252
|
+
width: var(--cds-popover-offset);
|
|
253
|
+
transform: translateX(-100%);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
//-----------------------------------------------------------------------------
|
|
257
|
+
// Left
|
|
258
|
+
//-----------------------------------------------------------------------------
|
|
259
|
+
.#{$prefix}--popover--left {
|
|
260
|
+
top: 50%;
|
|
261
|
+
right: 100%;
|
|
262
|
+
transform: translate(calc(-1 * var(--cds-popover-offset)), -50%);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
@include place-caret(left) {
|
|
266
|
+
top: 50%;
|
|
267
|
+
right: 0;
|
|
268
|
+
transform: translate(50%, -50%) rotate(45deg);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
// Left top
|
|
272
|
+
.#{$prefix}--popover--left-top {
|
|
273
|
+
top: 0;
|
|
274
|
+
right: 100%;
|
|
275
|
+
transform: translateX(calc(-1 * var(--cds-popover-offset)));
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
@include place-caret(left-top) {
|
|
279
|
+
top: 0;
|
|
280
|
+
right: 0;
|
|
281
|
+
transform: translate(50%, var(--cds-popover-caret-offset)) rotate(45deg);
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
// Left bottom
|
|
285
|
+
.#{$prefix}--popover--left-bottom {
|
|
286
|
+
right: 100%;
|
|
287
|
+
bottom: 0;
|
|
288
|
+
transform: translateX(calc(-1 * var(--cds-popover-offset)));
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
@include place-caret(left-bottom) {
|
|
292
|
+
right: 0;
|
|
293
|
+
bottom: 0;
|
|
294
|
+
transform: translate(50%, calc(-1 * var(--cds-popover-caret-offset)))
|
|
295
|
+
rotate(45deg);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
// Hover area
|
|
299
|
+
.#{$prefix}--popover--left.#{$prefix}--popover::before,
|
|
300
|
+
.#{$prefix}--popover--left-top.#{$prefix}--popover::before,
|
|
301
|
+
.#{$prefix}--popover--left-bottom.#{$prefix}--popover::before {
|
|
302
|
+
top: 0;
|
|
303
|
+
right: 0;
|
|
304
|
+
bottom: 0;
|
|
305
|
+
width: var(--cds-popover-offset);
|
|
306
|
+
transform: translateX(100%);
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
/// Helper for placing the caret inside a popover. The selectors here can get
|
|
311
|
+
/// distracting in the main stylesheet, but ultimately they target the ::before
|
|
312
|
+
/// and ::after pseudo-elements for the given direction. The @content block
|
|
313
|
+
/// passed in should appropriately position the caret for the given direction.
|
|
314
|
+
@mixin place-caret($direction) {
|
|
315
|
+
.#{$prefix}--popover--caret.#{$prefix}--popover--#{$direction}
|
|
316
|
+
.#{$prefix}--popover-contents::before,
|
|
317
|
+
.#{$prefix}--popover--caret.#{$prefix}--popover--#{$direction}
|
|
318
|
+
.#{$prefix}--popover-contents::after {
|
|
319
|
+
@content;
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
@include exports('popover') {
|
|
324
|
+
@include popover;
|
|
325
|
+
}
|