@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/css/white.scss
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// Use the "white" (White) Carbon theme
|
|
2
|
+
@import "carbon-components/scss/globals/scss/vendor/@carbon/themes/scss";
|
|
3
|
+
|
|
4
|
+
$carbon--theme: $carbon--theme--white;
|
|
5
|
+
@include carbon--theme();
|
|
6
|
+
|
|
7
|
+
$feature-flags: (
|
|
8
|
+
ui-shell: true,
|
|
9
|
+
grid-columns-16: true
|
|
10
|
+
);
|
|
11
|
+
|
|
12
|
+
$css--font-face: true;
|
|
13
|
+
$css--helpers: true;
|
|
14
|
+
$css--body: true;
|
|
15
|
+
$css--use-layer: true;
|
|
16
|
+
$css--reset: true;
|
|
17
|
+
$css--default-type: true;
|
|
18
|
+
$css--plex: true;
|
|
19
|
+
|
|
20
|
+
@import "carbon-components/scss/globals/scss/component-tokens";
|
|
21
|
+
@import "carbon-components/src/components/tag/tag";
|
|
22
|
+
@import "carbon-components/src/components/notification/inline-notification";
|
|
23
|
+
@import "carbon-components/src/components/notification/toast-notification";
|
|
24
|
+
@import "./popover";
|
|
25
|
+
|
|
26
|
+
@import "carbon-components/scss/globals/scss/_css--reset";
|
|
27
|
+
@import "carbon-components/scss/globals/scss/_css--font-face";
|
|
28
|
+
@import "carbon-components/scss/globals/scss/_css--helpers";
|
|
29
|
+
@import "carbon-components/scss/globals/scss/_css--body";
|
|
30
|
+
@import "carbon-components/scss/globals/grid/grid";
|
|
31
|
+
|
|
32
|
+
// Import all component styles
|
|
33
|
+
@import "carbon-components/scss/globals/scss/styles";
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Compatibility Policy
|
|
2
|
+
|
|
3
|
+
The compatibility target is fixed to `carbon-components-svelte@0.89.4`.
|
|
4
|
+
|
|
5
|
+
## Guaranteed Surface
|
|
6
|
+
|
|
7
|
+
This package preserves:
|
|
8
|
+
|
|
9
|
+
- `src/index.js` named exports
|
|
10
|
+
- `types/index.d.ts` named exports
|
|
11
|
+
- component directory names
|
|
12
|
+
- component file names
|
|
13
|
+
- CSS entrypoints under `css/`
|
|
14
|
+
- common props, events, slots, and rest-prop behavior inherited from Carbon
|
|
15
|
+
Svelte 0.89.4
|
|
16
|
+
|
|
17
|
+
The API check script compares the package exports against the type export list:
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
npm run check
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
The same command also builds a temporary Svelte/Vite app that imports
|
|
24
|
+
representative components and CSS from this package. This catches missing
|
|
25
|
+
runtime dependencies and broken Svelte entrypoints that text-only export checks
|
|
26
|
+
cannot see.
|
|
27
|
+
|
|
28
|
+
## Non-Goals
|
|
29
|
+
|
|
30
|
+
- This package does not track newer Carbon packages such as `@carbon/*`.
|
|
31
|
+
- This package does not replace `carbon-icons-svelte`.
|
|
32
|
+
- This package does not guarantee visual parity with IBM Carbon; MaxCraft visual
|
|
33
|
+
language is the intended output.
|
|
34
|
+
|
|
35
|
+
## Adding Or Changing Components
|
|
36
|
+
|
|
37
|
+
Before changing a component API:
|
|
38
|
+
|
|
39
|
+
1. Compare against `carbon-components-svelte@0.89.4`.
|
|
40
|
+
2. Preserve existing prop/event/slot names unless a breaking release is planned.
|
|
41
|
+
3. Run `npm run check`.
|
|
42
|
+
4. Verify `mpc-web` with `npm run check` and `npm run build`.
|
|
43
|
+
|
|
44
|
+
If a component needs MaxCraft-specific behavior, prefer CSS/token customization
|
|
45
|
+
first. Add new props only when CSS cannot express the requirement.
|
|
46
|
+
|
|
47
|
+
## Versioning
|
|
48
|
+
|
|
49
|
+
Use semantic versioning:
|
|
50
|
+
|
|
51
|
+
- Patch: style fixes, docs, compatibility bug fixes
|
|
52
|
+
- Minor: new MaxCraft styling hooks or non-breaking helper exports
|
|
53
|
+
- Major: breaking API changes against Carbon Svelte 0.89.4
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# Component Catalog
|
|
2
|
+
|
|
3
|
+
This catalog mirrors the public exports in `src/index.js`. The compatibility
|
|
4
|
+
target is `carbon-components-svelte@0.89.4`.
|
|
5
|
+
|
|
6
|
+
## Inputs And Forms
|
|
7
|
+
|
|
8
|
+
- `Button`, `ButtonSkeleton`, `ButtonSet`
|
|
9
|
+
- `Checkbox`, `CheckboxSkeleton`
|
|
10
|
+
- `ComboBox`
|
|
11
|
+
- `Dropdown`, `DropdownSkeleton`
|
|
12
|
+
- `Form`, `FluidForm`, `FormGroup`, `FormItem`, `FormLabel`
|
|
13
|
+
- `MultiSelect`
|
|
14
|
+
- `NumberInput`, `NumberInputSkeleton`
|
|
15
|
+
- `RadioButton`, `RadioButtonSkeleton`, `RadioButtonGroup`
|
|
16
|
+
- `Search`, `SearchSkeleton`
|
|
17
|
+
- `Select`, `SelectSkeleton`, `SelectItem`, `SelectItemGroup`
|
|
18
|
+
- `Slider`, `SliderSkeleton`
|
|
19
|
+
- `TextArea`, `TextAreaSkeleton`
|
|
20
|
+
- `TextInput`, `TextInputSkeleton`, `PasswordInput`
|
|
21
|
+
- `TimePicker`, `TimePickerSelect`
|
|
22
|
+
- `Toggle`, `ToggleSkeleton`
|
|
23
|
+
|
|
24
|
+
## Layout And Navigation
|
|
25
|
+
|
|
26
|
+
- `Accordion`, `AccordionItem`, `AccordionSkeleton`
|
|
27
|
+
- `AspectRatio`
|
|
28
|
+
- `Breadcrumb`, `BreadcrumbItem`, `BreadcrumbSkeleton`
|
|
29
|
+
- `ContentSwitcher`, `Switch`
|
|
30
|
+
- `Grid`, `Row`, `Column`
|
|
31
|
+
- `Header`, `HeaderAction`, `HeaderActionLink`, `HeaderNav`, `HeaderNavItem`, `HeaderNavMenu`
|
|
32
|
+
- `HeaderPanelDivider`, `HeaderPanelLink`, `HeaderPanelLinks`
|
|
33
|
+
- `HeaderUtilities`, `HeaderGlobalAction`, `HeaderSearch`
|
|
34
|
+
- `SideNav`, `SideNavItems`, `SideNavLink`, `SideNavMenu`, `SideNavMenuItem`, `SideNavDivider`
|
|
35
|
+
- `Content`, `SkipToContent`
|
|
36
|
+
- `Tabs`, `Tab`, `TabContent`, `TabsSkeleton`
|
|
37
|
+
- `TreeView`
|
|
38
|
+
|
|
39
|
+
## Data Display
|
|
40
|
+
|
|
41
|
+
- `CodeSnippet`, `CodeSnippetSkeleton`
|
|
42
|
+
- `DataTable`, `DataTableSkeleton`
|
|
43
|
+
- `Table`, `TableBody`, `TableCell`, `TableContainer`, `TableHead`, `TableHeader`, `TableRow`
|
|
44
|
+
- `Toolbar`, `ToolbarContent`, `ToolbarSearch`, `ToolbarBatchActions`, `ToolbarMenu`, `ToolbarMenuItem`
|
|
45
|
+
- `Link`, `OutboundLink`
|
|
46
|
+
- `ListBox`, `ListBoxField`, `ListBoxMenu`, `ListBoxMenuIcon`, `ListBoxMenuItem`, `ListBoxSelection`
|
|
47
|
+
- `ListItem`
|
|
48
|
+
- `OrderedList`, `UnorderedList`
|
|
49
|
+
- `Pagination`, `PaginationSkeleton`, `PaginationNav`
|
|
50
|
+
- `StructuredList`, `StructuredListSkeleton`, `StructuredListBody`, `StructuredListHead`
|
|
51
|
+
- `StructuredListCell`, `StructuredListRow`, `StructuredListInput`
|
|
52
|
+
- `Tag`, `TagSkeleton`
|
|
53
|
+
- `Tile`, `ClickableTile`, `ExpandableTile`, `SelectableTile`, `RadioTile`, `TileGroup`
|
|
54
|
+
- `Truncate`
|
|
55
|
+
|
|
56
|
+
## Feedback And Overlays
|
|
57
|
+
|
|
58
|
+
- `ComposedModal`, `ModalHeader`, `ModalBody`, `ModalFooter`
|
|
59
|
+
- `Modal`
|
|
60
|
+
- `InlineLoading`
|
|
61
|
+
- `Loading`
|
|
62
|
+
- `InlineNotification`, `ToastNotification`
|
|
63
|
+
- `NotificationActionButton`, `NotificationButton`, `NotificationIcon`
|
|
64
|
+
- `Popover`
|
|
65
|
+
- `ProgressBar`
|
|
66
|
+
- `ProgressIndicator`, `ProgressIndicatorSkeleton`, `ProgressStep`
|
|
67
|
+
- `Tooltip`, `TooltipFooter`
|
|
68
|
+
- `TooltipDefinition`
|
|
69
|
+
- `TooltipIcon`
|
|
70
|
+
|
|
71
|
+
## Utilities And Helpers
|
|
72
|
+
|
|
73
|
+
- `Breakpoint`
|
|
74
|
+
- `breakpointObserver`
|
|
75
|
+
- `breakpoints`
|
|
76
|
+
- `ContextMenu`, `ContextMenuDivider`, `ContextMenuGroup`, `ContextMenuOption`, `ContextMenuRadioGroup`
|
|
77
|
+
- `CopyButton`
|
|
78
|
+
- `DatePicker`, `DatePickerInput`, `DatePickerSkeleton`
|
|
79
|
+
- `FileUploader`, `FileUploaderButton`, `FileUploaderItem`, `FileUploaderDropContainer`
|
|
80
|
+
- `Filename`, `FileUploaderSkeleton`
|
|
81
|
+
- `ImageLoader`
|
|
82
|
+
- `LocalStorage`
|
|
83
|
+
- `RecursiveList`
|
|
84
|
+
- `SkeletonPlaceholder`
|
|
85
|
+
- `SkeletonText`
|
|
86
|
+
- `Theme`
|
|
87
|
+
- `truncate`
|
|
88
|
+
- `toHierarchy`
|
|
89
|
+
|
|
90
|
+
## Styling Status
|
|
91
|
+
|
|
92
|
+
All components keep the Carbon Svelte 0.89.4 API surface. MaxCraft visual
|
|
93
|
+
styling is currently applied through `css/maxcraft.css` as a shared override
|
|
94
|
+
layer. Components not explicitly targeted by the override layer still inherit
|
|
95
|
+
Carbon-compatible layout and MaxCraft token colors where they use Carbon custom
|
|
96
|
+
properties.
|
|
97
|
+
|
|
98
|
+
For new MaxCraft-specific visual work, prefer adding token-backed CSS overrides
|
|
99
|
+
instead of changing component props.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Consumer Migration Checklist
|
|
2
|
+
|
|
3
|
+
Use this checklist when connecting a Svelte or Hugo consumer to
|
|
4
|
+
`@ifloppy/maxcraftmc-ui-svelte`.
|
|
5
|
+
|
|
6
|
+
## Svelte Consumer
|
|
7
|
+
|
|
8
|
+
- Replace `carbon-components-svelte` with a local file alias during development:
|
|
9
|
+
`file:../maxcraft-ui`.
|
|
10
|
+
- Replace the local alias with `npm:@ifloppy/maxcraftmc-ui-svelte@<version>` after
|
|
11
|
+
publishing.
|
|
12
|
+
- Keep `carbon-icons-svelte` installed.
|
|
13
|
+
- Remove `carbon-components` unless the app imports it directly.
|
|
14
|
+
- Import `carbon-components-svelte/css/all.css` once in the root layout.
|
|
15
|
+
- Import `carbon-components-svelte/css/maxcraft.css` once after `all.css`.
|
|
16
|
+
- Keep existing component imports unchanged when using the alias.
|
|
17
|
+
- Run `npm install --ignore-scripts`.
|
|
18
|
+
- During local file-link development, also run `npm install --ignore-scripts`
|
|
19
|
+
inside `maxcraft-ui`.
|
|
20
|
+
- Run `npm run check`.
|
|
21
|
+
- Run `npm run build`.
|
|
22
|
+
- Manually verify navigation, form controls, modals, notifications, tiles, tags,
|
|
23
|
+
and dark mode.
|
|
24
|
+
|
|
25
|
+
## Hugo Consumer
|
|
26
|
+
|
|
27
|
+
- Import `github.com/FloppyBetaStudio/maxcraft-ui` as a Hugo module and mount
|
|
28
|
+
its `css` directory to `assets/maxcraft-ui`.
|
|
29
|
+
- If adding project-level mounts, explicitly restore default mounts for
|
|
30
|
+
`assets`, `content`, `layouts`, `static`, and any other site folders in use.
|
|
31
|
+
- Include `maxcraft-ui/maxcraft.css` before site-specific CSS.
|
|
32
|
+
- Keep page-specific layout and animation CSS in the consumer site.
|
|
33
|
+
- Prefer shared `--mc-*` tokens for new theme styles.
|
|
34
|
+
- Run `hugo --gc --minify`.
|
|
35
|
+
- Confirm generated HTML links a fingerprinted `maxcraft` stylesheet.
|
|
36
|
+
|
|
37
|
+
## Release Consumer
|
|
38
|
+
|
|
39
|
+
- Update the consumer lockfile after changing from `file:` to `npm:`.
|
|
40
|
+
- Run consumer checks after every package version bump.
|
|
41
|
+
- Check for accidental duplicate CSS imports.
|
|
42
|
+
- Keep `carbon-icons-svelte` version compatible with the consuming app.
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
This package is both a compatibility layer and a MaxCraft design system. Treat
|
|
4
|
+
compatibility as the default constraint.
|
|
5
|
+
|
|
6
|
+
## Development Setup
|
|
7
|
+
|
|
8
|
+
```sh
|
|
9
|
+
npm install --ignore-scripts
|
|
10
|
+
npm run check
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
When developing against `mpc-web`:
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
cd ../mpc-web
|
|
17
|
+
npm install --ignore-scripts
|
|
18
|
+
npm run check
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## What To Change First
|
|
22
|
+
|
|
23
|
+
- For visual work, prefer `tokens/maxcraft.css` and `css/maxcraft.css`.
|
|
24
|
+
- For API fixes, compare against `carbon-components-svelte@0.89.4`.
|
|
25
|
+
- For docs, update README links and run `npm run check`.
|
|
26
|
+
- For consumer integration, update the relevant consumer docs and checklist.
|
|
27
|
+
|
|
28
|
+
## Compatibility Rules
|
|
29
|
+
|
|
30
|
+
- Do not rename exported components.
|
|
31
|
+
- Do not remove props, events, slots, or CSS entrypoints that exist in Carbon
|
|
32
|
+
Svelte 0.89.4.
|
|
33
|
+
- Do not replace `carbon-icons-svelte`.
|
|
34
|
+
- Do not introduce framework support beyond Svelte unless the package scope is
|
|
35
|
+
explicitly changed.
|
|
36
|
+
- Keep Hugo CSS reusable without requiring Svelte.
|
|
37
|
+
|
|
38
|
+
## CSS Rules
|
|
39
|
+
|
|
40
|
+
- Keep `css/maxcraft.css` self-contained.
|
|
41
|
+
- Keep `tokens/maxcraft.css` focused on reusable design tokens.
|
|
42
|
+
- Prefer `--mc-*` tokens over hard-coded colors.
|
|
43
|
+
- Prefer CSS overrides over component API changes.
|
|
44
|
+
- Preserve square, block-like UI affordances for shared controls.
|
|
45
|
+
|
|
46
|
+
## Verification
|
|
47
|
+
|
|
48
|
+
Run from `maxcraft-ui`:
|
|
49
|
+
|
|
50
|
+
```sh
|
|
51
|
+
npm run check
|
|
52
|
+
npm run build
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
The local checks cover:
|
|
56
|
+
|
|
57
|
+
- exact export parity with `carbon-components-svelte@0.89.4`
|
|
58
|
+
- export target existence
|
|
59
|
+
- a Vite/Svelte smoke build with representative components
|
|
60
|
+
- placeholder/stub marker scanning
|
|
61
|
+
- CSS entrypoint existence
|
|
62
|
+
- documentation and README link integrity
|
|
63
|
+
|
|
64
|
+
Run consumers when shared CSS or package metadata changes:
|
|
65
|
+
|
|
66
|
+
```sh
|
|
67
|
+
cd ../mpc-web
|
|
68
|
+
npm run check
|
|
69
|
+
npm run build
|
|
70
|
+
|
|
71
|
+
cd ../maxcraftmc-wiki
|
|
72
|
+
hugo --gc --minify
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## GitNexus
|
|
76
|
+
|
|
77
|
+
When editing existing symbols, run impact analysis before changes and
|
|
78
|
+
`gitnexus detect-changes` before committing. Documentation-only changes usually
|
|
79
|
+
do not map to symbols, but still run detect-changes before commit when the root
|
|
80
|
+
repository requires it.
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Hugo Integration Guide
|
|
2
|
+
|
|
3
|
+
Hugo sites do not use Svelte components from this package. They reuse the CSS
|
|
4
|
+
theme layer and design tokens.
|
|
5
|
+
|
|
6
|
+
## 1. Mount The CSS Directory
|
|
7
|
+
|
|
8
|
+
Initialize the Hugo site as a module if it does not already have `go.mod`:
|
|
9
|
+
|
|
10
|
+
```sh
|
|
11
|
+
hugo mod init github.com/YourOrg/your-site
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Then import the public MaxCraft UI module and mount its CSS directory:
|
|
15
|
+
|
|
16
|
+
```toml
|
|
17
|
+
[[module.imports]]
|
|
18
|
+
path = "github.com/FloppyBetaStudio/maxcraft-ui"
|
|
19
|
+
|
|
20
|
+
[[module.imports.mounts]]
|
|
21
|
+
source = "css"
|
|
22
|
+
target = "assets/maxcraft-ui"
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
If the site declares any `module.mounts`, Hugo replaces the default mounts. Add
|
|
26
|
+
all required site mounts explicitly:
|
|
27
|
+
|
|
28
|
+
```toml
|
|
29
|
+
[[module.mounts]]
|
|
30
|
+
source = "assets"
|
|
31
|
+
target = "assets"
|
|
32
|
+
|
|
33
|
+
[[module.mounts]]
|
|
34
|
+
source = "content"
|
|
35
|
+
target = "content"
|
|
36
|
+
|
|
37
|
+
[[module.mounts]]
|
|
38
|
+
source = "layouts"
|
|
39
|
+
target = "layouts"
|
|
40
|
+
|
|
41
|
+
[[module.mounts]]
|
|
42
|
+
source = "static"
|
|
43
|
+
target = "static"
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Add other project mounts such as `archetypes`, `data`, and `i18n` if the site
|
|
47
|
+
uses them.
|
|
48
|
+
|
|
49
|
+
## 2. Include The Stylesheet
|
|
50
|
+
|
|
51
|
+
Include `maxcraft.css` before site-specific overrides:
|
|
52
|
+
|
|
53
|
+
```go-html-template
|
|
54
|
+
{{ with resources.Get "maxcraft-ui/maxcraft.css" }}
|
|
55
|
+
{{ if hugo.IsProduction }}
|
|
56
|
+
{{ $maxcraftUIStyles := . | minify | fingerprint }}
|
|
57
|
+
<link rel="stylesheet" href="{{ $maxcraftUIStyles.RelPermalink }}" integrity="{{ $maxcraftUIStyles.Data.Integrity }}" />
|
|
58
|
+
{{ else }}
|
|
59
|
+
<link rel="stylesheet" href="{{ .RelPermalink }}" />
|
|
60
|
+
{{ end }}
|
|
61
|
+
{{ end }}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
For `maxcraftmc-wiki`, the intended order is:
|
|
65
|
+
|
|
66
|
+
1. Tailbliss/Tailwind base CSS
|
|
67
|
+
2. `maxcraft-ui/maxcraft.css`
|
|
68
|
+
3. Wiki-specific `css/site.css`
|
|
69
|
+
|
|
70
|
+
This order gives the wiki the shared tokens while preserving its custom page
|
|
71
|
+
layouts and animations.
|
|
72
|
+
|
|
73
|
+
## 3. Use Shared Tokens
|
|
74
|
+
|
|
75
|
+
Hugo templates and CSS can use the shared variables directly:
|
|
76
|
+
|
|
77
|
+
```css
|
|
78
|
+
.mc-button-primary {
|
|
79
|
+
background: linear-gradient(#5caf39, var(--mc-grass-dark));
|
|
80
|
+
border-color: var(--mc-border);
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Prefer token names over hard-coded colors for new shared UI styling.
|
|
85
|
+
|
|
86
|
+
## 4. Build
|
|
87
|
+
|
|
88
|
+
```sh
|
|
89
|
+
hugo mod tidy
|
|
90
|
+
hugo --gc --minify
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Confirm the generated HTML contains a `maxcraft` stylesheet and the output
|
|
94
|
+
folder contains a fingerprinted file under `public/maxcraft-ui/`.
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# Installation
|
|
2
|
+
|
|
3
|
+
This package supports two consumption modes:
|
|
4
|
+
|
|
5
|
+
- Svelte apps use the Carbon-compatible component entrypoint.
|
|
6
|
+
- Hugo/static sites use the CSS/token entrypoints.
|
|
7
|
+
|
|
8
|
+
## Published Package
|
|
9
|
+
|
|
10
|
+
Install the package and keep `carbon-icons-svelte` as the icon source:
|
|
11
|
+
|
|
12
|
+
```sh
|
|
13
|
+
npm install @ifloppy/maxcraftmc-ui-svelte carbon-icons-svelte
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
For a new Svelte app, import directly:
|
|
17
|
+
|
|
18
|
+
```js
|
|
19
|
+
import { Button } from "@ifloppy/maxcraftmc-ui-svelte";
|
|
20
|
+
import "@ifloppy/maxcraftmc-ui-svelte/css/all.css";
|
|
21
|
+
import "@ifloppy/maxcraftmc-ui-svelte/css/maxcraft.css";
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
For an existing Carbon Svelte app, use an alias so source imports can stay
|
|
25
|
+
unchanged:
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
{
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"carbon-components-svelte": "npm:@ifloppy/maxcraftmc-ui-svelte@0.1.0",
|
|
31
|
+
"carbon-icons-svelte": "^13.5.0"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Existing imports continue to work:
|
|
37
|
+
|
|
38
|
+
```js
|
|
39
|
+
import { Button, Theme } from "carbon-components-svelte";
|
|
40
|
+
import "carbon-components-svelte/css/all.css";
|
|
41
|
+
import "carbon-components-svelte/css/maxcraft.css";
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Local Development In mpc-solution
|
|
45
|
+
|
|
46
|
+
Use the local file alias while editing the UI package beside consumers:
|
|
47
|
+
|
|
48
|
+
```json
|
|
49
|
+
{
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"carbon-components-svelte": "file:../maxcraft-ui",
|
|
52
|
+
"carbon-icons-svelte": "^13.5.0"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Then install in both projects:
|
|
58
|
+
|
|
59
|
+
```sh
|
|
60
|
+
cd maxcraft-ui
|
|
61
|
+
npm install --ignore-scripts
|
|
62
|
+
|
|
63
|
+
cd ../mpc-web
|
|
64
|
+
npm install --ignore-scripts
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
The `maxcraft-ui` install is needed during local file-link development because
|
|
68
|
+
Vite resolves package source files through the real path and dependencies such
|
|
69
|
+
as `flatpickr` must exist beside that source tree. Published npm installs do not
|
|
70
|
+
need this extra step.
|
|
71
|
+
|
|
72
|
+
## Required CSS Entrypoints
|
|
73
|
+
|
|
74
|
+
The package preserves Carbon's original CSS entrypoints:
|
|
75
|
+
|
|
76
|
+
- `css/all.css`
|
|
77
|
+
- `css/white.css`
|
|
78
|
+
- `css/g10.css`
|
|
79
|
+
- `css/g80.css`
|
|
80
|
+
- `css/g90.css`
|
|
81
|
+
- `css/g100.css`
|
|
82
|
+
|
|
83
|
+
MaxCraft-specific entrypoints:
|
|
84
|
+
|
|
85
|
+
- `css/maxcraft.css`
|
|
86
|
+
- `tokens/maxcraft.css`
|
|
87
|
+
|
|
88
|
+
Use `all.css` plus `maxcraft.css` for Svelte apps. Use only `maxcraft.css` for
|
|
89
|
+
Hugo/static sites that already have their own reset and prose styles.
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Publishing And Maintenance
|
|
2
|
+
|
|
3
|
+
## Repository
|
|
4
|
+
|
|
5
|
+
The intended public repository is:
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
github1:FloppyBetaStudio/maxcraft-ui.git
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
The root `mpc-solution` repository tracks this directory as a Git submodule.
|
|
12
|
+
|
|
13
|
+
## Pre-Publish Checks
|
|
14
|
+
|
|
15
|
+
Run from `maxcraft-ui`:
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
npm install --ignore-scripts
|
|
19
|
+
npm run check
|
|
20
|
+
npm run build
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
`npm run build` performs a dry-run package build with `npm pack --dry-run`.
|
|
24
|
+
The check step verifies API parity, export targets, a Vite/Svelte smoke build,
|
|
25
|
+
placeholder markers, CSS entrypoints, and documentation links.
|
|
26
|
+
|
|
27
|
+
Also verify consumers:
|
|
28
|
+
|
|
29
|
+
```sh
|
|
30
|
+
cd ../mpc-web
|
|
31
|
+
npm install --ignore-scripts
|
|
32
|
+
npm run check
|
|
33
|
+
npm run build
|
|
34
|
+
|
|
35
|
+
cd ../maxcraftmc-wiki
|
|
36
|
+
hugo --gc --minify
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Publish
|
|
40
|
+
|
|
41
|
+
After the package is ready:
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
npm publish --access public
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Then update consumers from local file aliases to npm aliases:
|
|
48
|
+
|
|
49
|
+
```json
|
|
50
|
+
{
|
|
51
|
+
"dependencies": {
|
|
52
|
+
"carbon-components-svelte": "npm:@ifloppy/maxcraftmc-ui-svelte@0.1.0"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Attribution Requirements
|
|
58
|
+
|
|
59
|
+
Keep these files in every published package:
|
|
60
|
+
|
|
61
|
+
- `LICENSE`
|
|
62
|
+
- `NOTICE`
|
|
63
|
+
- `README.md`
|
|
64
|
+
|
|
65
|
+
Do not remove Carbon Svelte attribution. The source and type surface are derived
|
|
66
|
+
from `carbon-components-svelte@0.89.4`, which is Apache-2.0 licensed.
|
|
67
|
+
|
|
68
|
+
## Maintenance Checklist
|
|
69
|
+
|
|
70
|
+
- Keep `css/maxcraft.css` self-contained for Hugo.
|
|
71
|
+
- Keep `tokens/maxcraft.css` as the token source for future tooling.
|
|
72
|
+
- Run API and CSS entrypoint checks before every release.
|
|
73
|
+
- Test `mpc-web` and `maxcraftmc-wiki` before bumping the package version.
|
|
74
|
+
- Avoid introducing a dependency on Carbon icons beyond `carbon-icons-svelte`.
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# Svelte Migration Guide
|
|
2
|
+
|
|
3
|
+
This guide is for apps already using `carbon-components-svelte@0.89.4`, such as
|
|
4
|
+
`mpc-web`.
|
|
5
|
+
|
|
6
|
+
## 1. Replace The Dependency
|
|
7
|
+
|
|
8
|
+
Local development:
|
|
9
|
+
|
|
10
|
+
```json
|
|
11
|
+
{
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"carbon-components-svelte": "file:../maxcraft-ui",
|
|
14
|
+
"carbon-icons-svelte": "^13.5.0"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Published package:
|
|
20
|
+
|
|
21
|
+
```json
|
|
22
|
+
{
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"carbon-components-svelte": "npm:@ifloppy/maxcraftmc-ui-svelte@0.1.0",
|
|
25
|
+
"carbon-icons-svelte": "^13.5.0"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Remove the old `carbon-components` dependency unless the app imports it
|
|
31
|
+
directly. `@ifloppy/maxcraftmc-ui-svelte` includes the CSS entrypoints it needs.
|
|
32
|
+
|
|
33
|
+
## 2. Keep Component Imports
|
|
34
|
+
|
|
35
|
+
No source import rewrite is required when using the alias:
|
|
36
|
+
|
|
37
|
+
```svelte
|
|
38
|
+
<script>
|
|
39
|
+
import { Button, Header, Theme } from "carbon-components-svelte";
|
|
40
|
+
</script>
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Direct imports are also supported for new code:
|
|
44
|
+
|
|
45
|
+
```svelte
|
|
46
|
+
<script>
|
|
47
|
+
import { Button, Header, Theme } from "@ifloppy/maxcraftmc-ui-svelte";
|
|
48
|
+
</script>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## 3. Load CSS Once
|
|
52
|
+
|
|
53
|
+
Load CSS from the app root layout, not inside individual pages:
|
|
54
|
+
|
|
55
|
+
```svelte
|
|
56
|
+
<script>
|
|
57
|
+
import "carbon-components-svelte/css/all.css";
|
|
58
|
+
import "carbon-components-svelte/css/maxcraft.css";
|
|
59
|
+
</script>
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
`all.css` keeps Carbon-compatible structure and base styles. `maxcraft.css`
|
|
63
|
+
maps Carbon variables and common `bx--*` classes to MaxCraft visual language.
|
|
64
|
+
|
|
65
|
+
## 4. Theme Mapping
|
|
66
|
+
|
|
67
|
+
The `Theme` component still accepts Carbon theme names:
|
|
68
|
+
|
|
69
|
+
```svelte
|
|
70
|
+
<Theme theme={isDarkMode ? "g100" : "white"}>
|
|
71
|
+
<slot />
|
|
72
|
+
</Theme>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
MaxCraft maps them as:
|
|
76
|
+
|
|
77
|
+
- `white`, `g10`: light
|
|
78
|
+
- `g80`, `g90`, `g100`: dark
|
|
79
|
+
|
|
80
|
+
## 5. Icons
|
|
81
|
+
|
|
82
|
+
Continue using `carbon-icons-svelte`:
|
|
83
|
+
|
|
84
|
+
```svelte
|
|
85
|
+
<script>
|
|
86
|
+
import Home from "carbon-icons-svelte/lib/Home.svelte";
|
|
87
|
+
import { UserAvatarFilledAlt } from "carbon-icons-svelte";
|
|
88
|
+
</script>
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
This UI package does not replace the Carbon icon package.
|
|
92
|
+
|
|
93
|
+
## 6. Verification Checklist
|
|
94
|
+
|
|
95
|
+
Run:
|
|
96
|
+
|
|
97
|
+
```sh
|
|
98
|
+
npm run check
|
|
99
|
+
npm run build
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Manually inspect:
|
|
103
|
+
|
|
104
|
+
- Header and navigation
|
|
105
|
+
- Buttons and button sets
|
|
106
|
+
- Text inputs and forms
|
|
107
|
+
- Dropdowns and modals
|
|
108
|
+
- Toast/inline notifications
|
|
109
|
+
- Tiles and tags
|
|
110
|
+
- Light/dark theme switching
|
|
111
|
+
- Mobile layout
|
|
112
|
+
|
|
113
|
+
## Known Local Development Detail
|
|
114
|
+
|
|
115
|
+
When using `file:../maxcraft-ui`, install dependencies in `maxcraft-ui` itself:
|
|
116
|
+
|
|
117
|
+
```sh
|
|
118
|
+
cd ../maxcraft-ui
|
|
119
|
+
npm install --ignore-scripts
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
This avoids Vite resolution failures for transitive dependencies such as
|
|
123
|
+
`flatpickr`.
|