xmlui 0.7.14 → 0.7.16
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/dist/{apiInterceptorWorker-FBzCR_-x.mjs → apiInterceptorWorker-21XItUaB.mjs} +1 -1
- package/dist/{grammar.tmLanguage-D3zpG8BQ.mjs → grammar.tmLanguage-Qpdanc5_.mjs} +6 -6
- package/dist/{index-rxu3P0l4.mjs → index-CFCUmuUo.mjs} +10368 -10074
- package/dist/index.css +1 -1
- package/dist/scripts/bin/build.js +17 -7
- package/dist/scripts/bin/vite-ueml-plugin.js +17 -7
- package/dist/scripts/bin/viteConfig.js +17 -7
- package/dist/scripts/package.json +209 -0
- package/dist/scripts/src/abstractions/scripting/ScriptingSourceTreeExp.js +51 -0
- package/dist/scripts/src/components/APICall/APICall.js +74 -0
- package/dist/scripts/src/components/APICall/APICallNative.js +31 -0
- package/dist/scripts/src/components/Accordion/Accordion.js +78 -0
- package/dist/scripts/src/components/Accordion/AccordionContext.js +20 -0
- package/dist/scripts/src/components/Accordion/AccordionItem.js +28 -0
- package/dist/scripts/src/components/Accordion/AccordionItemNative.js +79 -0
- package/dist/scripts/src/components/Accordion/AccordionNative.js +122 -0
- package/dist/scripts/src/components/Alert/Alert.js +42 -0
- package/dist/scripts/src/components/Alert/AlertNative.js +8 -0
- package/dist/scripts/src/components/Animation/Animation.js +59 -0
- package/dist/scripts/src/components/Animation/AnimationNative.js +75 -0
- package/dist/scripts/src/components/App/App.js +76 -0
- package/dist/scripts/src/components/App/AppLayoutContext.js +49 -0
- package/dist/scripts/src/components/App/AppNative.js +204 -0
- package/dist/scripts/src/components/App/AppStateContext.js +9 -0
- package/dist/scripts/src/components/App/Sheet.js +99 -0
- package/dist/scripts/src/components/AppHeader/AppHeader.js +59 -0
- package/dist/scripts/src/components/AppHeader/AppHeaderNative.js +58 -0
- package/dist/scripts/src/components/AppState/AppState.js +26 -0
- package/dist/scripts/src/components/AppState/AppStateNative.js +24 -0
- package/dist/scripts/src/components/AutoComplete/AutoComplete.js +83 -0
- package/dist/scripts/src/components/AutoComplete/AutoCompleteContext.js +16 -0
- package/dist/scripts/src/components/AutoComplete/AutoCompleteNative.js +225 -0
- package/dist/scripts/src/components/Avatar/Avatar.js +47 -0
- package/dist/scripts/src/components/Avatar/AvatarNative.js +40 -0
- package/dist/scripts/src/components/Backdrop/Backdrop.js +31 -0
- package/dist/scripts/src/components/Backdrop/BackdropNative.js +14 -0
- package/dist/scripts/src/components/Badge/Badge.js +58 -0
- package/dist/scripts/src/components/Badge/BadgeNative.js +22 -0
- package/dist/scripts/src/components/BarChart/BarChart.js +49 -0
- package/dist/scripts/src/components/BarChart/BarChartNative.js +176 -0
- package/dist/scripts/src/components/Bookmark/Bookmark.js +23 -0
- package/dist/scripts/src/components/Bookmark/BookmarkNative.js +24 -0
- package/dist/scripts/src/components/Breakout/Breakout.js +16 -0
- package/dist/scripts/src/components/Breakout/BreakoutNative.js +12 -0
- package/dist/scripts/src/components/Button/Button.js +142 -0
- package/dist/scripts/src/components/Button/ButtonNative.js +88 -0
- package/dist/scripts/src/components/ButtonGroup/ButtonGroup.js +41 -0
- package/dist/scripts/src/components/ButtonGroup/ButtonGroupNative.js +8 -0
- package/dist/scripts/src/components/Card/Card.js +57 -0
- package/dist/scripts/src/components/Card/CardNative.js +26 -0
- package/dist/scripts/src/components/Carousel/Carousel.js +68 -0
- package/dist/scripts/src/components/Carousel/CarouselItem.js +16 -0
- package/dist/scripts/src/components/Carousel/CarouselItemNative.js +13 -0
- package/dist/scripts/src/components/Carousel/CarouselNative.js +163 -0
- package/dist/scripts/src/components/ChangeListener/ChangeListener.js +24 -0
- package/dist/scripts/src/components/ChangeListener/ChangeListenerNative.js +26 -0
- package/dist/scripts/src/components/Chart/Chart.js +24 -0
- package/dist/scripts/src/components/Chart/ChartNative.js +165 -0
- package/dist/scripts/src/components/Checkbox/Checkbox.js +68 -0
- package/dist/scripts/src/components/Column/Column.js +34 -0
- package/dist/scripts/src/components/Column/ColumnNative.js +38 -0
- package/dist/scripts/src/components/Column/TableContext.js +12 -0
- package/dist/scripts/src/components/ComponentProvider.js +503 -0
- package/dist/scripts/src/components/ComponentRegistryContext.js +44 -0
- package/dist/scripts/src/components/ContentSeparator/ContentSeparator.js +38 -0
- package/dist/scripts/src/components/ContentSeparator/ContentSeparatorNative.js +16 -0
- package/dist/scripts/src/components/DatePicker/DatePicker.js +62 -0
- package/dist/scripts/src/components/DatePicker/DatePickerNative.js +196 -0
- package/dist/scripts/src/components/DropdownMenu/DropdownMenu.js +125 -0
- package/dist/scripts/src/components/DropdownMenu/DropdownMenuNative.js +95 -0
- package/dist/scripts/src/components/EmojiSelector/EmojiSelector.js +26 -0
- package/dist/scripts/src/components/EmojiSelector/EmojiSelectorNative.js +52 -0
- package/dist/scripts/src/components/FileInput/FileInput.js +64 -0
- package/dist/scripts/src/components/FileInput/FileInputNative.js +128 -0
- package/dist/scripts/src/components/FileUploadDropZone/FileUploadDropZone.js +46 -0
- package/dist/scripts/src/components/FileUploadDropZone/FileUploadDropZoneNative.js +112 -0
- package/dist/scripts/src/components/FlowLayout/FlowLayout.js +53 -0
- package/dist/scripts/src/components/FlowLayout/FlowLayoutNative.js +108 -0
- package/dist/scripts/src/components/Footer/Footer.js +35 -0
- package/dist/scripts/src/components/Footer/FooterNative.js +20 -0
- package/dist/scripts/src/components/Form/Form.js +89 -0
- package/dist/scripts/src/components/Form/FormContext.js +9 -0
- package/dist/scripts/src/components/Form/FormNative.js +317 -0
- package/dist/scripts/src/components/Form/formActions.js +114 -0
- package/dist/scripts/src/components/FormItem/FormItem.js +125 -0
- package/dist/scripts/src/components/FormItem/FormItemNative.js +157 -0
- package/dist/scripts/src/components/FormItem/HelperText.js +27 -0
- package/dist/scripts/src/components/FormItem/ItemWithLabel.js +40 -0
- package/dist/scripts/src/components/FormItem/Validations.js +351 -0
- package/dist/scripts/src/components/FormSection/FormSection.js +41 -0
- package/dist/scripts/src/components/Heading/Heading.js +258 -0
- package/dist/scripts/src/components/Heading/HeadingNative.js +47 -0
- package/dist/scripts/src/components/HoverCard/HoverCard.js +19 -0
- package/dist/scripts/src/components/HoverCard/HovercardNative.js +44 -0
- package/dist/scripts/src/components/Icon/ApiIcon.js +10 -0
- package/dist/scripts/src/components/Icon/Attach.js +10 -0
- package/dist/scripts/src/components/Icon/Binding.js +11 -0
- package/dist/scripts/src/components/Icon/BoardIcon.js +7 -0
- package/dist/scripts/src/components/Icon/BoxIcon.js +10 -0
- package/dist/scripts/src/components/Icon/CheckIcon.js +7 -0
- package/dist/scripts/src/components/Icon/ChevronLeft.js +7 -0
- package/dist/scripts/src/components/Icon/ChevronRight.js +7 -0
- package/dist/scripts/src/components/Icon/CodeFileIcon.js +10 -0
- package/dist/scripts/src/components/Icon/CodeSandbox.js +10 -0
- package/dist/scripts/src/components/Icon/CompactListIcon.js +7 -0
- package/dist/scripts/src/components/Icon/ContentCopyIcon.js +7 -0
- package/dist/scripts/src/components/Icon/DatabaseIcon.js +11 -0
- package/dist/scripts/src/components/Icon/DocFileIcon.js +10 -0
- package/dist/scripts/src/components/Icon/DocIcon.js +10 -0
- package/dist/scripts/src/components/Icon/DotMenuHorizontalIcon.js +7 -0
- package/dist/scripts/src/components/Icon/DotMenuIcon.js +7 -0
- package/dist/scripts/src/components/Icon/EmailIcon.js +7 -0
- package/dist/scripts/src/components/Icon/EmptyFolderIcon.js +10 -0
- package/dist/scripts/src/components/Icon/ErrorIcon.js +7 -0
- package/dist/scripts/src/components/Icon/ExpressionIcon.js +10 -0
- package/dist/scripts/src/components/Icon/FillPlusCricleIcon.js +7 -0
- package/dist/scripts/src/components/Icon/FilterIcon.js +10 -0
- package/dist/scripts/src/components/Icon/FolderIcon.js +10 -0
- package/dist/scripts/src/components/Icon/GlobeIcon.js +7 -0
- package/dist/scripts/src/components/Icon/HomeIcon.js +7 -0
- package/dist/scripts/src/components/Icon/HyperLinkIcon.js +7 -0
- package/dist/scripts/src/components/Icon/Icon.js +32 -0
- package/dist/scripts/src/components/Icon/IconNative.js +102 -0
- package/dist/scripts/src/components/Icon/ImageFileIcon.js +10 -0
- package/dist/scripts/src/components/Icon/LinkIcon.js +7 -0
- package/dist/scripts/src/components/Icon/ListIcon.js +7 -0
- package/dist/scripts/src/components/Icon/LooseListIcon.js +7 -0
- package/dist/scripts/src/components/Icon/MoonIcon.js +10 -0
- package/dist/scripts/src/components/Icon/MoreOptionsIcon.js +7 -0
- package/dist/scripts/src/components/Icon/NoSortIcon.js +8 -0
- package/dist/scripts/src/components/Icon/PDFIcon.js +10 -0
- package/dist/scripts/src/components/Icon/PenIcon.js +7 -0
- package/dist/scripts/src/components/Icon/PhoneIcon.js +7 -0
- package/dist/scripts/src/components/Icon/PhotoIcon.js +10 -0
- package/dist/scripts/src/components/Icon/PlusIcon.js +7 -0
- package/dist/scripts/src/components/Icon/SearchIcon.js +7 -0
- package/dist/scripts/src/components/Icon/ShareIcon.js +10 -0
- package/dist/scripts/src/components/Icon/SortAscendingIcon.js +8 -0
- package/dist/scripts/src/components/Icon/SortDescendingIcon.js +8 -0
- package/dist/scripts/src/components/Icon/SunIcon.js +10 -0
- package/dist/scripts/src/components/Icon/TrashIcon.js +7 -0
- package/dist/scripts/src/components/Icon/TrendingDownIcon.js +10 -0
- package/dist/scripts/src/components/Icon/TrendingLevelIcon.js +10 -0
- package/dist/scripts/src/components/Icon/TrendingUpIcon.js +10 -0
- package/dist/scripts/src/components/Icon/TxtIcon.js +10 -0
- package/dist/scripts/src/components/Icon/UnknownFileIcon.js +10 -0
- package/dist/scripts/src/components/Icon/UnlinkIcon.js +10 -0
- package/dist/scripts/src/components/Icon/UserIcon.js +7 -0
- package/dist/scripts/src/components/Icon/WarningIcon.js +7 -0
- package/dist/scripts/src/components/Icon/XlsIcon.js +10 -0
- package/dist/scripts/src/components/IconInfoCard/IconInfoCard.js +39 -0
- package/dist/scripts/src/components/IconProvider.js +264 -0
- package/dist/scripts/src/components/IconRegistryContext.js +317 -0
- package/dist/scripts/src/components/Image/Image.js +35 -0
- package/dist/scripts/src/components/Image/ImageNative.js +15 -0
- package/dist/scripts/src/components/Input/InputAdornment.js +14 -0
- package/dist/scripts/src/components/Items/Items.js +33 -0
- package/dist/scripts/src/components/Items/ItemsNative.js +29 -0
- package/dist/scripts/src/components/Link/Link.js +64 -0
- package/dist/scripts/src/components/Link/LinkNative.js +26 -0
- package/dist/scripts/src/components/List/List.js +81 -0
- package/dist/scripts/src/components/List/ListNative.js +425 -0
- package/dist/scripts/src/components/Logo/Logo.js +16 -0
- package/dist/scripts/src/components/Logo/LogoNative.js +15 -0
- package/dist/scripts/src/components/Map/Map.js +75 -0
- package/dist/scripts/src/components/Map/world_countries.json +45307 -0
- package/dist/scripts/src/components/Markdown/Markdown.js +45 -0
- package/dist/scripts/src/components/Markdown/MarkdownNative.js +107 -0
- package/dist/scripts/src/components/ModalDialog/ConfirmationModalContextProvider.js +116 -0
- package/dist/scripts/src/components/ModalDialog/Dialog.js +20 -0
- package/dist/scripts/src/components/ModalDialog/ModalDialog.js +64 -0
- package/dist/scripts/src/components/ModalDialog/ModalDialogNative.js +167 -0
- package/dist/scripts/src/components/ModalDialog/ModalVisibilityContext.js +60 -0
- package/dist/scripts/src/components/NavGroup/NavGroup.js +34 -0
- package/dist/scripts/src/components/NavGroup/NavGroupNative.js +91 -0
- package/dist/scripts/src/components/NavLink/NavLink.js +71 -0
- package/dist/scripts/src/components/NavLink/NavLinkNative.js +61 -0
- package/dist/scripts/src/components/NavPanel/NavPanel.js +31 -0
- package/dist/scripts/src/components/NavPanel/NavPanelNative.js +74 -0
- package/dist/scripts/src/components/NoResult/NoResult.js +38 -0
- package/dist/scripts/src/components/NoResult/NoResultNative.js +13 -0
- package/dist/scripts/src/components/NumberBox/NumberBox.js +61 -0
- package/dist/scripts/src/components/NumberBox/NumberBoxNative.js +336 -0
- package/dist/scripts/src/components/NumberBox/numberbox-abstractions.js +74 -0
- package/dist/scripts/src/components/OffCanvas/OffCanvas.js +57 -0
- package/dist/scripts/src/components/OffCanvas/OffCanvasNative.js +48 -0
- package/dist/scripts/src/components/Option/Option.js +33 -0
- package/dist/scripts/src/components/Option/OptionTypeProvider.js +16 -0
- package/dist/scripts/src/components/PageHeader/PageHeader.js +36 -0
- package/dist/scripts/src/components/PageMetaTitle/PageMetaTilteNative.js +9 -0
- package/dist/scripts/src/components/PageMetaTitle/PageMetaTitle.js +18 -0
- package/dist/scripts/src/components/Pages/Pages.js +33 -0
- package/dist/scripts/src/components/Pages/PagesNative.js +69 -0
- package/dist/scripts/src/components/PieChart/PieChart.js +45 -0
- package/dist/scripts/src/components/PieChart/PieChartNative.js +165 -0
- package/dist/scripts/src/components/PositionedContainer/PositionedContainer.js +24 -0
- package/dist/scripts/src/components/PositionedContainer/PositionedContainerNative.js +14 -0
- package/dist/scripts/src/components/ProgressBar/ProgressBar.js +36 -0
- package/dist/scripts/src/components/ProgressBar/ProgressBarNative.js +12 -0
- package/dist/scripts/src/components/Queue/Queue.js +71 -0
- package/dist/scripts/src/components/Queue/QueueNative.js +278 -0
- package/dist/scripts/src/components/Queue/queueActions.js +87 -0
- package/dist/scripts/src/components/RadioGroup/RadioGroup.js +68 -0
- package/dist/scripts/src/components/RadioGroup/RadioGroupNative.js +103 -0
- package/dist/scripts/src/components/Range/Range.js +56 -0
- package/dist/scripts/src/components/Range/RangeNative.js +8 -0
- package/dist/scripts/src/components/RealTimeAdapter/RealTimeAdapter.js +21 -0
- package/dist/scripts/src/components/RealTimeAdapter/RealTimeAdapterNative.js +131 -0
- package/dist/scripts/src/components/Redirect/Redirect.js +20 -0
- package/dist/scripts/src/components/Select/OptionContext.js +12 -0
- package/dist/scripts/src/components/Select/Select.js +98 -0
- package/dist/scripts/src/components/Select/SelectContext.js +9 -0
- package/dist/scripts/src/components/Select/SelectNative.js +213 -0
- package/dist/scripts/src/components/SelectionStore/SelectionStore.js +22 -0
- package/dist/scripts/src/components/SelectionStore/SelectionStoreNative.js +94 -0
- package/dist/scripts/src/components/Slider/Slider.js +54 -0
- package/dist/scripts/src/components/Slider/SliderNative.js +8 -0
- package/dist/scripts/src/components/SpaceFiller/SpaceFiller.js +19 -0
- package/dist/scripts/src/components/SpaceFiller/SpaceFillerNative.js +10 -0
- package/dist/scripts/src/components/Spinner/Spinner.js +42 -0
- package/dist/scripts/src/components/Spinner/SpinnerNative.js +32 -0
- package/dist/scripts/src/components/Splitter/Splitter.js +89 -0
- package/dist/scripts/src/components/Splitter/SplitterNative.js +159 -0
- package/dist/scripts/src/components/Splitter/utils.js +17 -0
- package/dist/scripts/src/components/Stack/Stack.js +110 -0
- package/dist/scripts/src/components/Stack/StackNative.js +39 -0
- package/dist/scripts/src/components/StateViewer/StateViewerNative.js +19 -0
- package/dist/scripts/src/components/StickyBox/StickyBox.js +30 -0
- package/dist/scripts/src/components/StickyBox/StickyBoxNative.js +15 -0
- package/dist/scripts/src/components/Switch/Switch.js +72 -0
- package/dist/scripts/src/components/Table/Table.js +184 -0
- package/dist/scripts/src/components/Table/TableNative.js +470 -0
- package/dist/scripts/src/components/Table/useRowSelection.js +245 -0
- package/dist/scripts/src/components/TableHeader/TableHeader.js +34 -0
- package/dist/scripts/src/components/TableOfContents/TableOfContents.js +74 -0
- package/dist/scripts/src/components/TableOfContents/TableOfContentsNative.js +56 -0
- package/dist/scripts/src/components/Tabs/TabContext.js +45 -0
- package/dist/scripts/src/components/Tabs/TabItem.js +20 -0
- package/dist/scripts/src/components/Tabs/TabItemNative.js +24 -0
- package/dist/scripts/src/components/Tabs/Tabs.js +55 -0
- package/dist/scripts/src/components/Tabs/TabsNative.js +72 -0
- package/dist/scripts/src/components/Text/Text.js +122 -0
- package/dist/scripts/src/components/Text/TextNative.js +124 -0
- package/dist/scripts/src/components/TextArea/TextArea.js +65 -0
- package/dist/scripts/src/components/TextArea/TextAreaNative.js +176 -0
- package/dist/scripts/src/components/TextArea/TextAreaResizable.js +73 -0
- package/dist/scripts/src/components/TextArea/useComposedRef.js +60 -0
- package/dist/scripts/src/components/TextBox/TextBox.js +85 -0
- package/dist/scripts/src/components/TextBox/TextBoxNative.js +109 -0
- package/dist/scripts/src/components/Theme/NotificationToast.js +50 -0
- package/dist/scripts/src/components/Theme/Theme.js +43 -0
- package/dist/scripts/src/components/Theme/ThemeNative.js +126 -0
- package/dist/scripts/src/components/ThemeChanger/ThemeChanger.js +115 -0
- package/dist/scripts/src/components/ThemeChanger/ToneChangerButton.js +28 -0
- package/dist/scripts/src/components/Toggle/Toggle.js +98 -0
- package/dist/scripts/src/components/Toolbar/Toolbar.js +32 -0
- package/dist/scripts/src/components/ToolbarButton/ToolbarButton.js +38 -0
- package/dist/scripts/src/components/Tree/TreeComponent.js +32 -0
- package/dist/scripts/src/components/Tree/TreeNative.js +69 -0
- package/dist/scripts/src/components/TrendLabel/TrendLabel.js +37 -0
- package/dist/scripts/src/components/ValidationSummary/ValidationSummary.js +59 -0
- package/dist/scripts/src/components/abstractions.js +151 -0
- package/dist/scripts/src/components/chart-color-schemes.js +43 -0
- package/dist/scripts/src/components/component-utils.js +17 -0
- package/dist/scripts/src/components/container-helpers.js +25 -0
- package/dist/scripts/src/components/metadata-helpers.js +245 -0
- package/dist/scripts/src/components/slot-helpers.js +22 -0
- package/dist/scripts/src/components-core/ApiBoundComponent.js +194 -0
- package/dist/scripts/src/components-core/AppContext.js +16 -0
- package/dist/scripts/src/components-core/AppRoot.js +424 -0
- package/dist/scripts/src/components-core/ComponentBed.js +325 -0
- package/dist/scripts/src/components-core/ComponentDecorator.js +90 -0
- package/dist/scripts/src/components-core/CompoundComponent.js +144 -0
- package/dist/scripts/src/components-core/DebugViewProvider.js +43 -0
- package/dist/scripts/src/components-core/EngineError.js +91 -0
- package/dist/scripts/src/components-core/ErrorBoundary.js +59 -0
- package/dist/scripts/src/components-core/Fragment.js +15 -0
- package/dist/scripts/src/components-core/InspectorContext.js +176 -0
- package/dist/scripts/src/components-core/InvalidComponent.js +17 -0
- package/dist/scripts/src/components-core/LoaderComponent.js +92 -0
- package/dist/scripts/src/components-core/RestApiProxy.js +354 -0
- package/dist/scripts/src/components-core/ScrollContext.js +11 -0
- package/dist/scripts/src/components-core/Slot.js +17 -0
- package/dist/scripts/src/components-core/StandaloneApp.js +589 -0
- package/dist/scripts/src/components-core/StandaloneComponentManager.js +51 -0
- package/dist/scripts/src/components-core/TableOfContentsContext.js +110 -0
- package/dist/scripts/src/components-core/UnknownComponent.js +15 -0
- package/dist/scripts/src/components-core/XmluiCodeHighlighter.js +110 -0
- package/dist/scripts/src/components-core/abstractions/ComponentRenderer.js +2 -0
- package/dist/scripts/src/components-core/abstractions/LoaderRenderer.js +2 -0
- package/dist/scripts/src/components-core/abstractions/containers.js +18 -0
- package/dist/scripts/src/components-core/abstractions/standalone.js +2 -0
- package/dist/scripts/src/components-core/abstractions/treeAbstractions.js +2 -0
- package/dist/scripts/src/components-core/action/APICall.js +283 -0
- package/dist/scripts/src/components-core/action/FileDownloadAction.js +80 -0
- package/dist/scripts/src/components-core/action/FileUploadAction.js +88 -0
- package/dist/scripts/src/components-core/action/NavigateAction.js +20 -0
- package/dist/scripts/src/components-core/action/TimedAction.js +21 -0
- package/dist/scripts/src/components-core/action/actions.js +15 -0
- package/dist/scripts/src/components-core/appContext/date-functions.js +19 -0
- package/dist/scripts/src/components-core/appContext/math-function.js +27 -0
- package/dist/scripts/src/components-core/appContext/misc-utils.js +12 -0
- package/dist/scripts/src/components-core/component-hooks.js +25 -0
- package/dist/scripts/src/components-core/constants.js +18 -0
- package/dist/scripts/src/components-core/container/Container.js +1241 -0
- package/dist/scripts/src/components-core/container/buildProxy.js +54 -0
- package/dist/scripts/src/components-core/container/collectFnVarDeps.js +49 -0
- package/dist/scripts/src/components-core/container/valueExtractor.js +205 -0
- package/dist/scripts/src/components-core/descriptorHelper.js +72 -0
- package/dist/scripts/src/components-core/interception/ApiInterceptor.js +198 -0
- package/dist/scripts/src/components-core/interception/ApiInterceptorProvider.js +94 -0
- package/dist/scripts/src/components-core/interception/Backend.js +129 -0
- package/dist/scripts/src/components-core/interception/Errors.js +129 -0
- package/dist/scripts/src/components-core/interception/InMemoryDb.js +41 -0
- package/dist/scripts/src/components-core/interception/IndexedDb.js +205 -0
- package/dist/scripts/src/components-core/interception/ReadonlyCollection.js +145 -0
- package/dist/scripts/src/components-core/interception/abstractions.js +2 -0
- package/dist/scripts/src/components-core/interception/apiInterceptorWorker.js +46 -0
- package/dist/scripts/src/components-core/interception/useApiInterceptorContext.js +9 -0
- package/dist/scripts/src/components-core/loader/ApiLoader.js +54 -0
- package/dist/scripts/src/components-core/loader/DataLoader.js +149 -0
- package/dist/scripts/src/components-core/loader/ExternalDataLoader.js +62 -0
- package/dist/scripts/src/components-core/loader/Loader.js +126 -0
- package/dist/scripts/src/components-core/loader/MockLoaderRenderer.js +40 -0
- package/dist/scripts/src/components-core/loader/PageableLoader.js +262 -0
- package/dist/scripts/src/components-core/markup-check.js +279 -0
- package/dist/scripts/src/components-core/renderers.js +45 -0
- package/dist/scripts/src/components-core/reportEngineError.js +62 -0
- package/dist/scripts/src/components-core/script-runner/BindingTreeEvaluationContext.js +35 -0
- package/dist/scripts/src/components-core/script-runner/ICustomOperations.js +34 -0
- package/dist/scripts/src/components-core/script-runner/ParameterParser.js +117 -0
- package/dist/scripts/src/components-core/script-runner/asyncProxy.js +149 -0
- package/dist/scripts/src/components-core/script-runner/bannedFunctions.js +34 -0
- package/dist/scripts/src/components-core/script-runner/custom-operations-registry.js +40 -0
- package/dist/scripts/src/components-core/script-runner/custom-ui-data.js +40 -0
- package/dist/scripts/src/components-core/script-runner/eval-tree-async.js +593 -0
- package/dist/scripts/src/components-core/script-runner/eval-tree-common.js +497 -0
- package/dist/scripts/src/components-core/script-runner/eval-tree-sync.js +482 -0
- package/dist/scripts/src/components-core/script-runner/process-statement-async.js +766 -0
- package/dist/scripts/src/components-core/script-runner/process-statement-common.js +193 -0
- package/dist/scripts/src/components-core/script-runner/process-statement-sync.js +752 -0
- package/dist/scripts/src/components-core/script-runner/statement-queue.js +62 -0
- package/dist/scripts/src/components-core/script-runner/syncProxy.js +31 -0
- package/dist/scripts/src/components-core/script-runner/visitors.js +361 -0
- package/dist/scripts/src/components-core/theming/ThemeContext.js +53 -0
- package/dist/scripts/src/components-core/theming/ThemeProvider.js +335 -0
- package/dist/scripts/src/components-core/theming/abstractions.js +11 -0
- package/dist/scripts/src/components-core/theming/extendThemeUtils.js +114 -0
- package/dist/scripts/src/components-core/theming/hvar.js +105 -0
- package/dist/scripts/src/components-core/theming/themeVars.js +62 -0
- package/dist/scripts/src/components-core/theming/themes/base-utils.js +31 -0
- package/dist/scripts/src/components-core/theming/themes/palette.js +55 -0
- package/dist/scripts/src/components-core/theming/themes/root.js +287 -0
- package/dist/scripts/src/components-core/theming/themes/solid.js +16 -0
- package/dist/scripts/src/components-core/theming/themes/theme-colors.js +561 -0
- package/dist/scripts/src/components-core/theming/themes/xmlui.js +58 -0
- package/dist/scripts/src/components-core/theming/transformThemeVars.js +300 -0
- package/dist/scripts/src/components-core/utils/DataLoaderQueryKeyGenerator.js +35 -0
- package/dist/scripts/src/components-core/utils/LruCache.js +184 -0
- package/dist/scripts/src/components-core/utils/actionUtils.js +32 -0
- package/dist/scripts/src/components-core/utils/classnames.js +58 -0
- package/dist/scripts/src/components-core/utils/compound-utils.js +11 -0
- package/dist/scripts/src/components-core/utils/css-utils.js +163 -0
- package/dist/scripts/src/components-core/utils/date-utils.js +78 -0
- package/dist/scripts/src/components-core/utils/extractParam.js +148 -0
- package/dist/scripts/src/components-core/utils/hooks.js +249 -0
- package/dist/scripts/src/components-core/utils/mergeProps.js +45 -0
- package/dist/scripts/src/components-core/utils/misc.js +472 -0
- package/dist/scripts/src/components-core/utils/request-params.js +70 -0
- package/dist/scripts/src/components-core/utils/statementUtils.js +221 -0
- package/dist/scripts/src/components-core/utils/treeUtils.js +48 -0
- package/dist/scripts/src/index.js +69 -0
- package/dist/scripts/src/parsers/common/GenericToken.js +2 -0
- package/dist/scripts/src/parsers/scripting-exp/TokenType.js +112 -0
- package/dist/scripts/src/parsers/style-parser/StyleInputStream.js +39 -0
- package/dist/scripts/src/parsers/style-parser/StyleLexer.js +623 -0
- package/dist/scripts/src/parsers/style-parser/StyleParser.js +1036 -0
- package/dist/scripts/src/parsers/style-parser/errors.js +37 -0
- package/dist/scripts/src/parsers/style-parser/source-tree.js +2 -0
- package/dist/scripts/src/parsers/style-parser/style-compiler.js +558 -0
- package/dist/scripts/src/parsers/style-parser/tokens.js +43 -0
- package/dist/scripts/src/parsers/xmlui-parser/ParserError.js +7 -0
- package/dist/scripts/src/parsers/xmlui-parser/transform.js +80 -32
- package/dist/scripts/src/syntax/grammar.tmLanguage.json +348 -0
- package/dist/scripts/src/syntax/textMate/xmlui.json +630 -0
- package/dist/style.css +1 -1
- package/dist/xmlui-metadata.mjs +2636 -2563
- package/dist/xmlui-metadata.umd.js +16 -16
- package/dist/xmlui-standalone.umd.js +186 -186
- package/dist/xmlui.d.ts +1868 -13
- package/dist/xmlui.mjs +1 -1
- package/package.json +5 -5
- package/dist/xmlui.umd.js +0 -293
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.BarChart = void 0;
|
|
40
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
41
|
+
const react_1 = __importStar(require("react"));
|
|
42
|
+
const ThemeContext_1 = require("@components-core/theming/ThemeContext");
|
|
43
|
+
const chart_color_schemes_1 = __importDefault(require("@components/chart-color-schemes"));
|
|
44
|
+
const hooks_1 = require("@components-core/utils/hooks");
|
|
45
|
+
const ResponsiveBar = react_1.default.lazy(() => Promise.resolve().then(() => __importStar(require("@nivo/bar"))).then((module) => ({ default: module.ResponsiveBar })));
|
|
46
|
+
const BarChart = ({ data, keys = [], groupMode = "grouped", layout = "vertical", indexBy = "id", style, }) => {
|
|
47
|
+
console.log(keys, data);
|
|
48
|
+
const { getThemeVar } = (0, ThemeContext_1.useTheme)();
|
|
49
|
+
const colors = (0, hooks_1.useColors)({
|
|
50
|
+
name: "color-text-BarChart",
|
|
51
|
+
format: "hex",
|
|
52
|
+
}, {
|
|
53
|
+
name: "color-ticks-BarChart",
|
|
54
|
+
format: "hex",
|
|
55
|
+
}, {
|
|
56
|
+
name: "color-bg-tooltip-BarChart",
|
|
57
|
+
format: "hex",
|
|
58
|
+
}, {
|
|
59
|
+
name: "color-text-tooltip-BarChart",
|
|
60
|
+
format: "hex",
|
|
61
|
+
}, {
|
|
62
|
+
name: "color-axis-BarChart",
|
|
63
|
+
format: "hex",
|
|
64
|
+
});
|
|
65
|
+
return ((0, jsx_runtime_1.jsx)("div", { style: style, children: (0, jsx_runtime_1.jsx)(react_1.Suspense, { children: (0, jsx_runtime_1.jsx)(ResponsiveBar, { data: data, keys: keys, layout: layout, groupMode: groupMode, theme: {
|
|
66
|
+
background: "transparent",
|
|
67
|
+
text: {
|
|
68
|
+
fontSize: 11,
|
|
69
|
+
fill: colors["color-text-BarChart"],
|
|
70
|
+
outlineWidth: 0,
|
|
71
|
+
outlineColor: "transparent",
|
|
72
|
+
},
|
|
73
|
+
axis: {
|
|
74
|
+
domain: {
|
|
75
|
+
line: {
|
|
76
|
+
stroke: colors["color-axis-BarChart"],
|
|
77
|
+
strokeWidth: 1,
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
legend: {
|
|
81
|
+
text: {
|
|
82
|
+
fontSize: 12,
|
|
83
|
+
fill: colors["border-color-BarChart"],
|
|
84
|
+
outlineWidth: 0,
|
|
85
|
+
outlineColor: "transparent",
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
ticks: {
|
|
89
|
+
line: {
|
|
90
|
+
stroke: "#777777",
|
|
91
|
+
strokeWidth: 1,
|
|
92
|
+
},
|
|
93
|
+
text: {
|
|
94
|
+
fontSize: 11,
|
|
95
|
+
fill: colors["color-ticks-BarChart"],
|
|
96
|
+
outlineWidth: 0,
|
|
97
|
+
outlineColor: "transparent",
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
grid: {
|
|
102
|
+
line: {
|
|
103
|
+
stroke: "#dddddd",
|
|
104
|
+
strokeWidth: 1,
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
legends: {
|
|
108
|
+
title: {
|
|
109
|
+
text: {
|
|
110
|
+
fontSize: 11,
|
|
111
|
+
fill: "#333333",
|
|
112
|
+
outlineWidth: 0,
|
|
113
|
+
outlineColor: "transparent",
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
text: {
|
|
117
|
+
fontSize: 11,
|
|
118
|
+
fill: "#333333",
|
|
119
|
+
outlineWidth: 0,
|
|
120
|
+
outlineColor: "transparent",
|
|
121
|
+
},
|
|
122
|
+
ticks: {
|
|
123
|
+
line: {},
|
|
124
|
+
text: {
|
|
125
|
+
fontSize: 10,
|
|
126
|
+
fill: "#333333",
|
|
127
|
+
outlineWidth: 0,
|
|
128
|
+
outlineColor: "transparent",
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
annotations: {
|
|
133
|
+
text: {
|
|
134
|
+
fontSize: 13,
|
|
135
|
+
fill: "#333333",
|
|
136
|
+
outlineWidth: 2,
|
|
137
|
+
outlineColor: "#ffffff",
|
|
138
|
+
outlineOpacity: 1,
|
|
139
|
+
},
|
|
140
|
+
link: {
|
|
141
|
+
stroke: "#000000",
|
|
142
|
+
strokeWidth: 1,
|
|
143
|
+
outlineWidth: 2,
|
|
144
|
+
outlineColor: "#ffffff",
|
|
145
|
+
outlineOpacity: 1,
|
|
146
|
+
},
|
|
147
|
+
outline: {
|
|
148
|
+
stroke: "#000000",
|
|
149
|
+
strokeWidth: 2,
|
|
150
|
+
outlineWidth: 2,
|
|
151
|
+
outlineColor: "#ffffff",
|
|
152
|
+
outlineOpacity: 1,
|
|
153
|
+
},
|
|
154
|
+
symbol: {
|
|
155
|
+
fill: "#000000",
|
|
156
|
+
outlineWidth: 2,
|
|
157
|
+
outlineColor: "#ffffff",
|
|
158
|
+
outlineOpacity: 1,
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
tooltip: {
|
|
162
|
+
wrapper: {},
|
|
163
|
+
container: {
|
|
164
|
+
background: colors["color-bg-tooltip-BarChart"],
|
|
165
|
+
color: colors["color-text-tooltip-BarChart"],
|
|
166
|
+
fontSize: 12,
|
|
167
|
+
},
|
|
168
|
+
basic: {},
|
|
169
|
+
chip: {},
|
|
170
|
+
table: {},
|
|
171
|
+
tableCell: {},
|
|
172
|
+
tableCellValue: {},
|
|
173
|
+
},
|
|
174
|
+
}, borderWidth: 1, borderColor: { from: "color", modifiers: [["darker", 0.2]] }, indexBy: indexBy, margin: { top: 10, bottom: 40, left: 60 }, padding: 0.3, valueScale: { type: "linear" }, indexScale: { type: "band", round: true }, colors: { scheme: chart_color_schemes_1.default[getThemeVar("scheme-BarChart") || "nivo"] }, axisTop: null, axisRight: null, labelSkipWidth: 12, labelSkipHeight: 12, role: "application" }) }) }));
|
|
175
|
+
};
|
|
176
|
+
exports.BarChart = BarChart;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.bookmarkComponentRenderer = exports.BookmarkMd = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const renderers_1 = require("@components-core/renderers");
|
|
6
|
+
const ComponentDefs_1 = require("@abstractions/ComponentDefs");
|
|
7
|
+
const BookmarkNative_1 = require("./BookmarkNative");
|
|
8
|
+
const COMP = "Bookmark";
|
|
9
|
+
exports.BookmarkMd = (0, ComponentDefs_1.createMetadata)({
|
|
10
|
+
description: `As its name suggests, this component places a bookmark into its parent component's view. The ` +
|
|
11
|
+
`component has an \`id\` that you can use in links to navigate (scroll to) the bookmark's location.`,
|
|
12
|
+
opaque: true,
|
|
13
|
+
props: {
|
|
14
|
+
id: (0, ComponentDefs_1.d)(`The unique identifier of the bookmark. You can use this identifier in links to navigate ` +
|
|
15
|
+
`to this component's location.`),
|
|
16
|
+
level: (0, ComponentDefs_1.d)(`The level of the bookmark. The level is used to determine the bookmark's ` +
|
|
17
|
+
`position in the table of contents.`),
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
exports.bookmarkComponentRenderer = (0, renderers_1.createComponentRenderer)(COMP, exports.BookmarkMd, (rendererContext) => {
|
|
21
|
+
const { node, renderChild, extractValue, layoutContext } = rendererContext;
|
|
22
|
+
return ((0, jsx_runtime_1.jsx)(BookmarkNative_1.Bookmark, { uid: extractValue(node.uid), level: extractValue(node.props.level), children: renderChild(node.children, layoutContext) }));
|
|
23
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Bookmark = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const TableOfContentsContext_1 = require("@components-core/TableOfContentsContext");
|
|
7
|
+
const Bookmark = ({ uid, level, children }) => {
|
|
8
|
+
const elementRef = (0, react_1.useRef)(null);
|
|
9
|
+
const tableOfContentsContext = (0, react_1.useContext)(TableOfContentsContext_1.TableOfContentsContext);
|
|
10
|
+
const registerHeading = tableOfContentsContext === null || tableOfContentsContext === void 0 ? void 0 : tableOfContentsContext.registerHeading;
|
|
11
|
+
const observeIntersection = tableOfContentsContext === null || tableOfContentsContext === void 0 ? void 0 : tableOfContentsContext.observeIntersection;
|
|
12
|
+
(0, react_1.useEffect)(() => {
|
|
13
|
+
if (observeIntersection && elementRef.current && uid) {
|
|
14
|
+
return registerHeading === null || registerHeading === void 0 ? void 0 : registerHeading({
|
|
15
|
+
id: uid,
|
|
16
|
+
level,
|
|
17
|
+
text: uid,
|
|
18
|
+
anchor: elementRef.current,
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
}, [uid, observeIntersection, registerHeading, level]);
|
|
22
|
+
return ((0, jsx_runtime_1.jsx)("span", { ref: elementRef, id: uid, children: children }));
|
|
23
|
+
};
|
|
24
|
+
exports.Bookmark = Bookmark;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.breakoutComponentRenderer = exports.BreakoutMd = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const BreakoutNative_1 = require("./BreakoutNative");
|
|
6
|
+
const ComponentDefs_1 = require("@abstractions/ComponentDefs");
|
|
7
|
+
const renderers_1 = require("@components-core/renderers");
|
|
8
|
+
const COMP = "Breakout";
|
|
9
|
+
exports.BreakoutMd = (0, ComponentDefs_1.createMetadata)({
|
|
10
|
+
description: `The \`${COMP}\` component creates a breakout section. It allows its child to ` +
|
|
11
|
+
`occupy the entire width of the UI even if the app or the parent container constrains ` +
|
|
12
|
+
`the maximum content width.`,
|
|
13
|
+
});
|
|
14
|
+
exports.breakoutComponentRenderer = (0, renderers_1.createComponentRenderer)(COMP, exports.BreakoutMd, ({ node, renderChild }) => {
|
|
15
|
+
return (0, jsx_runtime_1.jsx)(BreakoutNative_1.Breakout, { children: renderChild(node.children) });
|
|
16
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Breakout = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const Breakout_module_scss_1 = __importDefault(require("./Breakout.module.scss"));
|
|
9
|
+
const Breakout = ({ children }) => {
|
|
10
|
+
return (0, jsx_runtime_1.jsx)("div", { className: Breakout_module_scss_1.default.breakout, children: children });
|
|
11
|
+
};
|
|
12
|
+
exports.Breakout = Breakout;
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.buttonComponentRenderer = exports.ButtonMd = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const Button_module_scss_1 = __importDefault(require("./Button.module.scss"));
|
|
9
|
+
const ComponentDefs_1 = require("@abstractions/ComponentDefs");
|
|
10
|
+
const abstractions_1 = require("@components/abstractions");
|
|
11
|
+
const IconNative_1 = require("@components/Icon/IconNative");
|
|
12
|
+
const renderers_1 = require("@components-core/renderers");
|
|
13
|
+
const themeVars_1 = require("@components-core/theming/themeVars");
|
|
14
|
+
const ButtonNative_1 = require("./ButtonNative");
|
|
15
|
+
const metadata_helpers_1 = require("@components/metadata-helpers");
|
|
16
|
+
const COMP = "Button";
|
|
17
|
+
exports.ButtonMd = (0, ComponentDefs_1.createMetadata)({
|
|
18
|
+
description: `Button is an interactive element that triggers an action when clicked.`,
|
|
19
|
+
status: "stable",
|
|
20
|
+
props: {
|
|
21
|
+
autoFocus: (0, ComponentDefs_1.d)("Indicates if the button should receive focus when the page loads.", null, "boolean", false),
|
|
22
|
+
variant: (0, ComponentDefs_1.d)("The button variant determines the level of emphasis the button should possess.", abstractions_1.buttonVariantMd, "string", "solid"),
|
|
23
|
+
themeColor: (0, ComponentDefs_1.d)("Sets the button color scheme defined in the application theme.", abstractions_1.buttonThemeMd, "string", "primary"),
|
|
24
|
+
size: (0, ComponentDefs_1.d)("The size of the button.", abstractions_1.sizeMd, "string", "sm"),
|
|
25
|
+
label: (0, ComponentDefs_1.d)(`This property is an optional string to set a label for the ${COMP}. If no label is ` +
|
|
26
|
+
`specified and an icon is set, the ${COMP} will modify its styling to look like a ` +
|
|
27
|
+
`small icon button. When the ${COMP} has nested children, it will display them and ` +
|
|
28
|
+
`ignore the value of the \`label\` prop.`),
|
|
29
|
+
type: (0, ComponentDefs_1.d)(`This optional string describes how the ${COMP} appears in an HTML context. You ` +
|
|
30
|
+
`rarely need to set this property explicitly.`, abstractions_1.buttonTypesMd, "string", abstractions_1.defaultButtonType),
|
|
31
|
+
enabled: (0, ComponentDefs_1.d)(`The value of this property indicates whether the button accepts actions (\`true\`) ` +
|
|
32
|
+
`or does not react to them (\`false\`).`, null, null, true),
|
|
33
|
+
icon: (0, ComponentDefs_1.d)(`This string value denotes an icon name. The framework will render an icon if XMLUI ` +
|
|
34
|
+
`recognizes the icon by its name. If no label is specified and an icon is set, the ${COMP} ` +
|
|
35
|
+
`displays only that icon.`),
|
|
36
|
+
iconPosition: (0, ComponentDefs_1.d)(`This optional string determines the location of the icon in the ${COMP}.`, abstractions_1.iconPositionMd, "string", "start"),
|
|
37
|
+
contentPosition: (0, ComponentDefs_1.d)(`This optional value determines how the label and icon (or nested children) should be placed` +
|
|
38
|
+
`inside the ${COMP} component.`, abstractions_1.alignmentOptionMd, "string", "center"),
|
|
39
|
+
},
|
|
40
|
+
events: {
|
|
41
|
+
click: (0, metadata_helpers_1.dClick)(COMP),
|
|
42
|
+
gotFocus: (0, metadata_helpers_1.dGotFocus)(COMP),
|
|
43
|
+
lostFocus: (0, metadata_helpers_1.dLostFocus)(COMP),
|
|
44
|
+
},
|
|
45
|
+
themeVars: (0, themeVars_1.parseScssVar)(Button_module_scss_1.default.themeVars),
|
|
46
|
+
defaultThemeVars: {
|
|
47
|
+
[`width-${COMP}`]: "fit-content",
|
|
48
|
+
[`height-${COMP}`]: "fit-content",
|
|
49
|
+
[`radius-${COMP}`]: "$radius",
|
|
50
|
+
[`font-size-${COMP}`]: "$font-size-small",
|
|
51
|
+
[`font-weight-${COMP}`]: "$font-weight-medium",
|
|
52
|
+
[`color-bg-${COMP}-primary`]: "$color-primary-500",
|
|
53
|
+
[`color-bg-${COMP}-attention`]: "$color-bg-attention",
|
|
54
|
+
[`color-border-${COMP}-attention`]: "$color-attention",
|
|
55
|
+
[`color-bg-${COMP}--disabled`]: "$color-bg--disabled",
|
|
56
|
+
[`color-border-${COMP}--disabled`]: "$color-border--disabled",
|
|
57
|
+
[`style-border-${COMP}`]: "solid",
|
|
58
|
+
[`color-text-${COMP}--disabled`]: "$color-text--disabled",
|
|
59
|
+
[`color-outline-${COMP}--focus`]: "$color-outline--focus",
|
|
60
|
+
[`thickness-border-${COMP}`]: "1px",
|
|
61
|
+
[`thickness-outline-${COMP}--focus`]: "$thickness-outline--focus",
|
|
62
|
+
[`style-outline-${COMP}--focus`]: "$style-outline--focus",
|
|
63
|
+
[`offset-outline-${COMP}--focus`]: "$offset-outline--focus",
|
|
64
|
+
[`padding-horizontal-${COMP}-xs`]: "$space-1",
|
|
65
|
+
[`padding-vertical-${COMP}-xs`]: "$space-0_5",
|
|
66
|
+
[`padding-horizontal-${COMP}-sm`]: "$space-4",
|
|
67
|
+
[`padding-vertical-${COMP}-sm`]: "$space-2",
|
|
68
|
+
[`padding-horizontal-${COMP}-md`]: "$space-4",
|
|
69
|
+
[`padding-vertical-${COMP}-md`]: "$space-3",
|
|
70
|
+
[`padding-horizontal-${COMP}-lg`]: "$space-5",
|
|
71
|
+
[`padding-vertical-${COMP}-lg`]: "$space-4",
|
|
72
|
+
light: {
|
|
73
|
+
[`color-text-${COMP}`]: "$color-surface-950",
|
|
74
|
+
[`color-text-${COMP}-solid`]: "$color-surface-50",
|
|
75
|
+
[`color-border-${COMP}-primary`]: "$color-primary-500",
|
|
76
|
+
[`color-bg-${COMP}-primary--hover`]: "$color-primary-400",
|
|
77
|
+
[`color-bg-${COMP}-primary--active`]: "$color-primary-500",
|
|
78
|
+
[`color-bg-${COMP}-primary-outlined--hover`]: "$color-primary-50",
|
|
79
|
+
[`color-bg-${COMP}-primary-outlined--active`]: "$color-primary-100",
|
|
80
|
+
[`color-border-${COMP}-primary-outlined`]: "$color-primary-600",
|
|
81
|
+
[`color-border-${COMP}-primary-outlined--hover`]: "$color-primary-500",
|
|
82
|
+
[`color-text-${COMP}-primary-outlined`]: "$color-primary-900",
|
|
83
|
+
[`color-text-${COMP}-primary-outlined--hover`]: "$color-primary-950",
|
|
84
|
+
[`color-text-${COMP}-primary-outlined--active`]: "$color-primary-900",
|
|
85
|
+
[`color-bg-${COMP}-primary-ghost--hover`]: "$color-primary-50",
|
|
86
|
+
[`color-bg-${COMP}-primary-ghost--active`]: "$color-primary-100",
|
|
87
|
+
[`color-border-${COMP}-secondary`]: "$color-secondary-100",
|
|
88
|
+
[`color-bg-${COMP}-secondary`]: "$color-secondary-500",
|
|
89
|
+
[`color-bg-${COMP}-secondary--hover`]: "$color-secondary-400",
|
|
90
|
+
[`color-bg-${COMP}-secondary--active`]: "$color-secondary-500",
|
|
91
|
+
[`color-bg-${COMP}-secondary-outlined--hover`]: "$color-secondary-50",
|
|
92
|
+
[`color-bg-${COMP}-secondary-outlined--active`]: "$color-secondary-100",
|
|
93
|
+
[`color-bg-${COMP}-secondary-ghost--hover`]: "$color-secondary-100",
|
|
94
|
+
[`color-bg-${COMP}-secondary-ghost--active`]: "$color-secondary-100",
|
|
95
|
+
[`color-bg-${COMP}-attention--hover`]: "$color-danger-400",
|
|
96
|
+
[`color-bg-${COMP}-attention--active`]: "$color-danger-500",
|
|
97
|
+
[`color-bg-${COMP}-attention-outlined--hover`]: "$color-danger-50",
|
|
98
|
+
[`color-bg-${COMP}-attention-outlined--active`]: "$color-danger-100",
|
|
99
|
+
[`color-bg-${COMP}-attention-ghost--hover`]: "$color-danger-50",
|
|
100
|
+
[`color-bg-${COMP}-attention-ghost--active`]: "$color-danger-100",
|
|
101
|
+
},
|
|
102
|
+
dark: {
|
|
103
|
+
[`color-text-${COMP}`]: "$color-surface-50",
|
|
104
|
+
[`color-text-${COMP}-solid`]: "$color-surface-50",
|
|
105
|
+
[`color-border-${COMP}-primary`]: "$color-primary-500",
|
|
106
|
+
[`color-bg-${COMP}-primary--hover`]: "$color-primary-600",
|
|
107
|
+
[`color-bg-${COMP}-primary--active`]: "$color-primary-500",
|
|
108
|
+
[`color-bg-${COMP}-primary-outlined--hover`]: "$color-primary-900",
|
|
109
|
+
[`color-bg-${COMP}-primary-outlined--active`]: "$color-primary-950",
|
|
110
|
+
[`color-border-${COMP}-primary-outlined`]: "$color-primary-600",
|
|
111
|
+
[`color-border-${COMP}-primary-outlined--hover`]: "$color-primary-500",
|
|
112
|
+
[`color-text-${COMP}-primary-outlined`]: "$color-primary-100",
|
|
113
|
+
[`color-text-${COMP}-primary-outlined--hover`]: "$color-primary-50",
|
|
114
|
+
[`color-text-${COMP}-primary-outlined--active`]: "$color-primary-100",
|
|
115
|
+
[`color-bg-${COMP}-primary-ghost--hover`]: "$color-primary-900",
|
|
116
|
+
[`color-bg-${COMP}-primary-ghost--active`]: "$color-primary-950",
|
|
117
|
+
[`color-border-${COMP}-secondary`]: "$color-secondary-500",
|
|
118
|
+
[`color-bg-${COMP}-secondary`]: "$color-secondary-500",
|
|
119
|
+
[`color-bg-${COMP}-secondary--hover`]: "$color-secondary-400",
|
|
120
|
+
[`color-bg-${COMP}-secondary--active`]: "$color-secondary-500",
|
|
121
|
+
[`color-bg-${COMP}-secondary-outlined--hover`]: "$color-secondary-600",
|
|
122
|
+
[`color-bg-${COMP}-secondary-outlined--active`]: "$color-secondary-500",
|
|
123
|
+
[`color-bg-${COMP}-secondary-ghost--hover`]: "$color-secondary-900",
|
|
124
|
+
[`color-bg-${COMP}-secondary-ghost--active`]: "$color-secondary-950",
|
|
125
|
+
[`color-bg-${COMP}-attention--hover`]: "$color-danger-400",
|
|
126
|
+
[`color-bg-${COMP}-attention--active`]: "$color-danger-500",
|
|
127
|
+
[`color-bg-${COMP}-attention-outlined--hover`]: "$color-danger-900",
|
|
128
|
+
[`color-bg-${COMP}-attention-outlined--active`]: "$color-danger-950",
|
|
129
|
+
[`color-bg-${COMP}-attention-ghost--hover`]: "$color-danger-900",
|
|
130
|
+
[`color-bg-${COMP}-attention-ghost--active`]: "$color-danger-950",
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
});
|
|
134
|
+
exports.buttonComponentRenderer = (0, renderers_1.createComponentRenderer)("Button", exports.ButtonMd, ({ node, extractValue, renderChild, lookupEventHandler, layoutCss }) => {
|
|
135
|
+
var _a;
|
|
136
|
+
const iconName = extractValue.asString(node.props.icon);
|
|
137
|
+
const label = extractValue.asDisplayText(node.props.label);
|
|
138
|
+
return ((0, jsx_runtime_1.jsx)(ButtonNative_1.Button, { type: node.props.type, variant: extractValue(node.props.variant), themeColor: extractValue(node.props.themeColor), autoFocus: extractValue.asOptionalBoolean(node.props.autoFocus), size: extractValue(node.props.size), icon: iconName && (0, jsx_runtime_1.jsx)(IconNative_1.Icon, { name: iconName }), iconPosition: extractValue(node.props.iconPosition), contentPosition: extractValue(node.props.contentPosition), disabled: !extractValue.asOptionalBoolean((_a = node.props.enabled) !== null && _a !== void 0 ? _a : true), onClick: lookupEventHandler("click"), onFocus: lookupEventHandler("gotFocus"), onBlur: lookupEventHandler("lostFocus"), style: layoutCss, children: renderChild(node.children, {
|
|
139
|
+
type: "Stack",
|
|
140
|
+
orientation: "horizontal"
|
|
141
|
+
}) || label }));
|
|
142
|
+
});
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
36
|
+
var t = {};
|
|
37
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
38
|
+
t[p] = s[p];
|
|
39
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
40
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
41
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
42
|
+
t[p[i]] = s[p[i]];
|
|
43
|
+
}
|
|
44
|
+
return t;
|
|
45
|
+
};
|
|
46
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
47
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
48
|
+
};
|
|
49
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
|
+
exports.Button = void 0;
|
|
51
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
52
|
+
const Button_module_scss_1 = __importDefault(require("./Button.module.scss"));
|
|
53
|
+
const classnames_1 = __importDefault(require("@components-core/utils/classnames"));
|
|
54
|
+
const abstractions_1 = require("@components/abstractions");
|
|
55
|
+
const react_1 = __importStar(require("react"));
|
|
56
|
+
exports.Button = react_1.default.forwardRef(function Button(_a, ref) {
|
|
57
|
+
var { id, type = abstractions_1.defaultButtonType, icon, iconPosition = "start", contentPosition = "center", orientation = "horizontal", variant = "solid", themeColor = "primary", size = "sm", disabled, children, formId, onClick, onFocus, onBlur, style, gap, className, autoFocus } = _a, rest = __rest(_a, ["id", "type", "icon", "iconPosition", "contentPosition", "orientation", "variant", "themeColor", "size", "disabled", "children", "formId", "onClick", "onFocus", "onBlur", "style", "gap", "className", "autoFocus"]);
|
|
58
|
+
const innerRef = (0, react_1.useRef)(null);
|
|
59
|
+
(0, react_1.useImperativeHandle)(ref, () => innerRef.current);
|
|
60
|
+
(0, react_1.useEffect)(() => {
|
|
61
|
+
if (autoFocus) {
|
|
62
|
+
setTimeout(() => {
|
|
63
|
+
var _a;
|
|
64
|
+
(_a = innerRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
65
|
+
}, 0);
|
|
66
|
+
}
|
|
67
|
+
}, [autoFocus]);
|
|
68
|
+
const iconToLeft = iconPosition === "start";
|
|
69
|
+
return ((0, jsx_runtime_1.jsxs)("button", Object.assign({}, rest, { id: id, type: type, ref: innerRef, className: (0, classnames_1.default)(className, Button_module_scss_1.default.button, {
|
|
70
|
+
[Button_module_scss_1.default.buttonHorizontal]: orientation === "horizontal",
|
|
71
|
+
[Button_module_scss_1.default.buttonVertical]: orientation === "vertical",
|
|
72
|
+
[Button_module_scss_1.default.xs]: size === "xs",
|
|
73
|
+
[Button_module_scss_1.default.sm]: size === "sm",
|
|
74
|
+
[Button_module_scss_1.default.md]: size === "md",
|
|
75
|
+
[Button_module_scss_1.default.lg]: size === "lg",
|
|
76
|
+
[Button_module_scss_1.default.solidPrimary]: variant === "solid" && themeColor === "primary",
|
|
77
|
+
[Button_module_scss_1.default.solidSecondary]: variant === "solid" && themeColor === "secondary",
|
|
78
|
+
[Button_module_scss_1.default.solidAttention]: variant === "solid" && themeColor === "attention",
|
|
79
|
+
[Button_module_scss_1.default.outlinedPrimary]: variant === "outlined" && themeColor === "primary",
|
|
80
|
+
[Button_module_scss_1.default.outlinedSecondary]: variant === "outlined" && themeColor === "secondary",
|
|
81
|
+
[Button_module_scss_1.default.outlinedAttention]: variant === "outlined" && themeColor === "attention",
|
|
82
|
+
[Button_module_scss_1.default.ghostPrimary]: variant === "ghost" && themeColor === "primary",
|
|
83
|
+
[Button_module_scss_1.default.ghostSecondary]: variant === "ghost" && themeColor === "secondary",
|
|
84
|
+
[Button_module_scss_1.default.ghostAttention]: variant === "ghost" && themeColor === "attention",
|
|
85
|
+
[Button_module_scss_1.default.alignStart]: contentPosition === "start",
|
|
86
|
+
[Button_module_scss_1.default.alignEnd]: contentPosition === "end",
|
|
87
|
+
}), autoFocus: autoFocus, disabled: disabled, form: formId, style: style, onClick: onClick, onFocus: onFocus, onBlur: onBlur, children: [iconToLeft && icon, children, !iconToLeft && icon] })));
|
|
88
|
+
});
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.buttonGroupComponentRenderer = exports.ButtonGroupMd = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const ComponentDefs_1 = require("@abstractions/ComponentDefs");
|
|
9
|
+
const ButtonGroup_module_scss_1 = __importDefault(require("./ButtonGroup.module.scss"));
|
|
10
|
+
const renderers_1 = require("@components-core/renderers");
|
|
11
|
+
const themeVars_1 = require("@components-core/theming/themeVars");
|
|
12
|
+
const ButtonGroupNative_1 = require("./ButtonGroupNative");
|
|
13
|
+
const abstractions_1 = require("@components/abstractions");
|
|
14
|
+
const metadata_helpers_1 = require("@components/metadata-helpers");
|
|
15
|
+
const COMP = "ButtonGroup";
|
|
16
|
+
// See reference implementation here: https://getbootstrap.com/docs/5.3/components/button-group/
|
|
17
|
+
// Use the same techinque for borders and radius as the Accordion component.
|
|
18
|
+
exports.ButtonGroupMd = (0, ComponentDefs_1.createMetadata)({
|
|
19
|
+
status: "in progress",
|
|
20
|
+
description: `(**NOT IMPLEMENTED YET**) The \`${COMP}\` component is a container that embeds buttons used ` +
|
|
21
|
+
`together for a particular reason. It provides a view that emphasizes this coherency.`,
|
|
22
|
+
props: {
|
|
23
|
+
themeColor: (0, ComponentDefs_1.d)(`This optional property specifies the default theme color for the buttons in the group. ` +
|
|
24
|
+
`Individual buttons may override this setting with their \`themeColor\` property.`, abstractions_1.buttonThemeMd, "string", "primary"),
|
|
25
|
+
variant: (0, ComponentDefs_1.d)(`This optional property specifies the default variant for the buttons in the group. ` +
|
|
26
|
+
`Individual buttons may override this setting with their \`variant\` property.`, abstractions_1.buttonVariantMd, "string", "solid"),
|
|
27
|
+
orientation: (0, metadata_helpers_1.dOrientation)("horizontal"),
|
|
28
|
+
buttonWidth: (0, ComponentDefs_1.d)(`When this optional property is set, all buttons within the group will have the ` +
|
|
29
|
+
`specified width. If it is empty, each button's width accommodates its content.`),
|
|
30
|
+
gap: (0, ComponentDefs_1.d)(`When this optional property is set, adjacent buttons will have the specified gap ` +
|
|
31
|
+
`between them. If this property is not set, the buttons will be merged into one group.`),
|
|
32
|
+
},
|
|
33
|
+
themeVars: (0, themeVars_1.parseScssVar)(ButtonGroup_module_scss_1.default.themeVars),
|
|
34
|
+
defaultThemeVars: {
|
|
35
|
+
light: {},
|
|
36
|
+
dark: {},
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
exports.buttonGroupComponentRenderer = (0, renderers_1.createComponentRenderer)(COMP, exports.ButtonGroupMd, ({}) => {
|
|
40
|
+
return (0, jsx_runtime_1.jsx)(ButtonGroupNative_1.ButtonGroup, {});
|
|
41
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ButtonGroup = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
exports.ButtonGroup = (0, react_1.forwardRef)(function ButtonGroup({}, forwardedRef) {
|
|
7
|
+
return ((0, jsx_runtime_1.jsx)("div", { ref: forwardedRef, style: { backgroundColor: "orangered", color: "white", padding: 2 }, children: "ButtonGroup component is not implemented yet" }));
|
|
8
|
+
});
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.cardComponentRenderer = exports.CardMd = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const Card_module_scss_1 = __importDefault(require("./Card.module.scss"));
|
|
9
|
+
const ComponentDefs_1 = require("@abstractions/ComponentDefs");
|
|
10
|
+
const renderers_1 = require("@components-core/renderers");
|
|
11
|
+
const themeVars_1 = require("@components-core/theming/themeVars");
|
|
12
|
+
const CardNative_1 = require("./CardNative");
|
|
13
|
+
const metadata_helpers_1 = require("@components/metadata-helpers");
|
|
14
|
+
const abstractions_1 = require("@components/abstractions");
|
|
15
|
+
const COMP = "Card";
|
|
16
|
+
exports.CardMd = (0, ComponentDefs_1.createMetadata)({
|
|
17
|
+
description: `The \`${COMP}\` component is a container for cohesive elements, often rendered visually as a card.`,
|
|
18
|
+
props: {
|
|
19
|
+
avatarUrl: (0, ComponentDefs_1.d)(`Show the avatar (\`true\`) or not (\`false\`). If not specified, the ${COMP} will show the ` +
|
|
20
|
+
`first letters of the [\`title\`](#title).`),
|
|
21
|
+
showAvatar: (0, ComponentDefs_1.d)(`Indicates whether the ${COMP} should be displayed`, null, "boolean"),
|
|
22
|
+
title: (0, ComponentDefs_1.d)(`This prop sets the prestyled title.`),
|
|
23
|
+
subtitle: (0, ComponentDefs_1.d)(`This prop sets the prestyled subtitle.`),
|
|
24
|
+
linkTo: (0, ComponentDefs_1.d)(`This property wraps the title in a \`Link\` component that is clickable to navigate.`),
|
|
25
|
+
orientation: (0, ComponentDefs_1.d)(`An optional property that governs the ${COMP}'s orientation ` +
|
|
26
|
+
`(whether the ${COMP} lays out its children in a row or a column). ` +
|
|
27
|
+
`If the orientation is set to \`horizontal\`, the ${COMP} will display ` +
|
|
28
|
+
`its children in a row, except for its [\`title\`](#title) and [\`subtitle\`](#subtitle).`, abstractions_1.orientationOptionMd, "string", CardNative_1.DEFAULT_ORIENTATION),
|
|
29
|
+
},
|
|
30
|
+
events: {
|
|
31
|
+
click: (0, metadata_helpers_1.dClick)(COMP),
|
|
32
|
+
},
|
|
33
|
+
themeVars: (0, themeVars_1.parseScssVar)(Card_module_scss_1.default.themeVars),
|
|
34
|
+
defaultThemeVars: {
|
|
35
|
+
[`padding-horizontal-${COMP}`]: "$space-4",
|
|
36
|
+
[`padding-vertical-${COMP}`]: "$space-4",
|
|
37
|
+
[`padding-${COMP}`]: `$padding-vertical-${COMP} $padding-horizontal-${COMP}`,
|
|
38
|
+
[`color-border-${COMP}`]: "$color-border",
|
|
39
|
+
[`thickness-border-${COMP}`]: "1px",
|
|
40
|
+
[`style-border-${COMP}`]: "solid",
|
|
41
|
+
[`border-${COMP}`]: `$thickness-border-${COMP} $style-border-${COMP} $color-border-${COMP}`,
|
|
42
|
+
[`radius-${COMP}`]: "$radius",
|
|
43
|
+
[`shadow-${COMP}`]: "none",
|
|
44
|
+
light: {
|
|
45
|
+
[`color-bg-${COMP}`]: "white",
|
|
46
|
+
},
|
|
47
|
+
dark: {
|
|
48
|
+
[`color-bg-${COMP}`]: "$color-surface-900",
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
});
|
|
52
|
+
exports.cardComponentRenderer = (0, renderers_1.createComponentRenderer)("Card", exports.CardMd, ({ node, extractValue, renderChild, layoutCss }) => {
|
|
53
|
+
return ((0, jsx_runtime_1.jsx)(CardNative_1.Card, { style: layoutCss, title: extractValue.asOptionalString(node.props.title), linkTo: extractValue.asOptionalString(node.props.linkTo), subtitle: extractValue.asOptionalString(node.props.subtitle), avatarUrl: extractValue.asOptionalString(node.props.avatarUrl), showAvatar: extractValue.asOptionalBoolean(node.props.showAvatar), orientation: extractValue.asOptionalString(node.props.orientation), children: renderChild(node.children, {
|
|
54
|
+
type: "Stack",
|
|
55
|
+
orientation: "vertical",
|
|
56
|
+
}) }));
|
|
57
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Card = exports.DEFAULT_ORIENTATION = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const Card_module_scss_1 = __importDefault(require("./Card.module.scss"));
|
|
9
|
+
const classnames_1 = __importDefault(require("@components-core/utils/classnames"));
|
|
10
|
+
const react_1 = require("react");
|
|
11
|
+
const AvatarNative_1 = require("@components/Avatar/AvatarNative");
|
|
12
|
+
const LinkNative_1 = require("@components/Link/LinkNative");
|
|
13
|
+
const HeadingNative_1 = require("@components/Heading/HeadingNative");
|
|
14
|
+
const StackNative_1 = require("@components/Stack/StackNative");
|
|
15
|
+
const TextNative_1 = require("@components/Text/TextNative");
|
|
16
|
+
exports.DEFAULT_ORIENTATION = "vertical";
|
|
17
|
+
exports.Card = (0, react_1.forwardRef)(function Card({ children, orientation = exports.DEFAULT_ORIENTATION, style, title, subtitle, linkTo, avatarUrl, showAvatar = !!avatarUrl || false, onClick, }, forwardedRef) {
|
|
18
|
+
const titleProps = {
|
|
19
|
+
level: "h2",
|
|
20
|
+
};
|
|
21
|
+
return ((0, jsx_runtime_1.jsxs)("div", { ref: forwardedRef, className: (0, classnames_1.default)(Card_module_scss_1.default.wrapper, {
|
|
22
|
+
[Card_module_scss_1.default.isClickable]: !!onClick,
|
|
23
|
+
[Card_module_scss_1.default.vertical]: orientation === "vertical",
|
|
24
|
+
[Card_module_scss_1.default.horizontal]: orientation === "horizontal",
|
|
25
|
+
}), style: style, onClick: onClick, children: [[title, subtitle, avatarUrl, showAvatar].some(Boolean) && ((0, jsx_runtime_1.jsxs)(StackNative_1.Stack, { orientation: "horizontal", verticalAlignment: "center", style: { gap: "1rem" }, children: [showAvatar && (0, jsx_runtime_1.jsx)(AvatarNative_1.Avatar, { url: avatarUrl, name: title }), (0, jsx_runtime_1.jsxs)(StackNative_1.Stack, { orientation: "vertical", children: [linkTo ? (title ? ((0, jsx_runtime_1.jsx)(LinkNative_1.LocalLink, { to: linkTo + "", children: (0, jsx_runtime_1.jsx)(HeadingNative_1.Heading, Object.assign({}, titleProps, { children: title })) })) : null) : title ? ((0, jsx_runtime_1.jsx)(HeadingNative_1.Heading, Object.assign({}, titleProps, { children: title }))) : null, subtitle !== undefined && (0, jsx_runtime_1.jsx)(TextNative_1.Text, { variant: "small", children: subtitle })] })] })), children] }));
|
|
26
|
+
});
|