@cratis/scene.primereact 3.1.0 → 3.3.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/dist/cjs/button/PrimeButton.js.map +1 -1
- package/dist/cjs/button/PrimeButtonGroup.js.map +1 -1
- package/dist/cjs/button/PrimeSpeedDial.js.map +1 -1
- package/dist/cjs/button/PrimeSplitButton.js.map +1 -1
- package/dist/cjs/button/SplitButton.js.map +1 -1
- package/dist/cjs/data/Column.js.map +1 -1
- package/dist/cjs/data/Pagination.js.map +1 -1
- package/dist/cjs/data/PrimeColumn.js.map +1 -1
- package/dist/cjs/data/PrimeDataTable.js.map +1 -1
- package/dist/cjs/data/PrimeDataView.js.map +1 -1
- package/dist/cjs/data/PrimeOrderList.js.map +1 -1
- package/dist/cjs/data/PrimeOrganizationChart.js.map +1 -1
- package/dist/cjs/data/PrimePaginator.js.map +1 -1
- package/dist/cjs/data/PrimePickList.js.map +1 -1
- package/dist/cjs/data/PrimeTimeline.js.map +1 -1
- package/dist/cjs/data/PrimeTree.js.map +1 -1
- package/dist/cjs/data/columnDefinitions.js.map +1 -1
- package/dist/cjs/data/primeTreeNodes.js.map +1 -1
- package/dist/cjs/data/selectOptions.js.map +1 -1
- package/dist/cjs/form/PrimeAutoComplete.js.map +1 -1
- package/dist/cjs/form/PrimeCalendar.js.map +1 -1
- package/dist/cjs/form/PrimeCheckbox.js.map +1 -1
- package/dist/cjs/form/PrimeChips.js.map +1 -1
- package/dist/cjs/form/PrimeColorPicker.js.map +1 -1
- package/dist/cjs/form/PrimeDropdown.js.map +1 -1
- package/dist/cjs/form/PrimeFloatLabel.js.map +1 -1
- package/dist/cjs/form/PrimeIconField.js.map +1 -1
- package/dist/cjs/form/PrimeInputNumber.js.map +1 -1
- package/dist/cjs/form/PrimeInputText.js.map +1 -1
- package/dist/cjs/form/PrimeInputTextarea.js.map +1 -1
- package/dist/cjs/form/PrimeKnob.js.map +1 -1
- package/dist/cjs/form/PrimeListBox.js.map +1 -1
- package/dist/cjs/form/PrimeMultiSelect.js.map +1 -1
- package/dist/cjs/form/PrimePassword.js.map +1 -1
- package/dist/cjs/form/PrimeRadioButton.js.map +1 -1
- package/dist/cjs/form/PrimeRating.js.map +1 -1
- package/dist/cjs/form/PrimeSelectButton.js.map +1 -1
- package/dist/cjs/form/PrimeSlider.js.map +1 -1
- package/dist/cjs/form/PrimeToggleSwitch.js.map +1 -1
- package/dist/cjs/form/PrimeTreeSelect.js.map +1 -1
- package/dist/cjs/form/TreeSelect.js.map +1 -1
- package/dist/cjs/media/Image.js.map +1 -1
- package/dist/cjs/media/PrimeCarousel.js.map +1 -1
- package/dist/cjs/media/PrimeGalleria.js.map +1 -1
- package/dist/cjs/media/PrimeImage.js.map +1 -1
- package/dist/cjs/menu/Dock.js.map +1 -1
- package/dist/cjs/menu/DockPosition.js.map +1 -1
- package/dist/cjs/menu/MegaMenu.js.map +1 -1
- package/dist/cjs/menu/MenuItemAction.js.map +1 -1
- package/dist/cjs/menu/MenuItemContent.js.map +1 -1
- package/dist/cjs/menu/Menubar.js.map +1 -1
- package/dist/cjs/menu/PanelMenu.js.map +1 -1
- package/dist/cjs/menu/PrimeBreadcrumb.js.map +1 -1
- package/dist/cjs/menu/PrimeContextMenu.js.map +1 -1
- package/dist/cjs/menu/PrimeDock.js.map +1 -1
- package/dist/cjs/menu/PrimeMegaMenu.js.map +1 -1
- package/dist/cjs/menu/PrimeMenu.js.map +1 -1
- package/dist/cjs/menu/PrimeMenubar.js.map +1 -1
- package/dist/cjs/menu/PrimePanelMenu.js.map +1 -1
- package/dist/cjs/menu/PrimeSteps.js.map +1 -1
- package/dist/cjs/menu/PrimeTabMenu.js.map +1 -1
- package/dist/cjs/menu/PrimeTieredMenu.js.map +1 -1
- package/dist/cjs/menu/Steps.js.map +1 -1
- package/dist/cjs/menu/TabMenu.js.map +1 -1
- package/dist/cjs/menu/TieredMenu.js.map +1 -1
- package/dist/cjs/menuItems.js.map +1 -1
- package/dist/cjs/messages/PrimeInlineMessage.js.map +1 -1
- package/dist/cjs/messages/PrimeMessage.js.map +1 -1
- package/dist/cjs/messages/PrimeToast.js.map +1 -1
- package/dist/cjs/misc/BlockUI.js.map +1 -1
- package/dist/cjs/misc/PrimeAvatar.js.map +1 -1
- package/dist/cjs/misc/PrimeBadge.js.map +1 -1
- package/dist/cjs/misc/PrimeBlockUI.js.map +1 -1
- package/dist/cjs/misc/PrimeChip.js.map +1 -1
- package/dist/cjs/misc/PrimeInplace.js.map +1 -1
- package/dist/cjs/misc/PrimeProgressBar.js.map +1 -1
- package/dist/cjs/misc/PrimeProgressSpinner.js.map +1 -1
- package/dist/cjs/misc/PrimeScrollTop.js.map +1 -1
- package/dist/cjs/misc/PrimeSkeleton.js.map +1 -1
- package/dist/cjs/misc/PrimeTag.js.map +1 -1
- package/dist/cjs/misc/PrimeTerminal.js.map +1 -1
- package/dist/cjs/misc/ScrollTop.js.map +1 -1
- package/dist/cjs/overlay/ConfirmDialog.js.map +1 -1
- package/dist/cjs/overlay/PrimeConfirmDialog.js.map +1 -1
- package/dist/cjs/overlay/PrimeDialog.js.map +1 -1
- package/dist/cjs/overlay/PrimeOverlayPanel.js.map +1 -1
- package/dist/cjs/overlay/PrimeSidebar.js.map +1 -1
- package/dist/cjs/overlay/PrimeTooltip.js.map +1 -1
- package/dist/cjs/panel/PrimeAccordion.js.map +1 -1
- package/dist/cjs/panel/PrimeCard.js.map +1 -1
- package/dist/cjs/panel/PrimeDivider.js.map +1 -1
- package/dist/cjs/panel/PrimeFieldset.js.map +1 -1
- package/dist/cjs/panel/PrimePanel.js.map +1 -1
- package/dist/cjs/panel/PrimeScrollPanel.js.map +1 -1
- package/dist/cjs/panel/PrimeSplitter.js.map +1 -1
- package/dist/cjs/panel/PrimeStepper.js.map +1 -1
- package/dist/cjs/panel/PrimeTabView.js.map +1 -1
- package/dist/cjs/panel/PrimeToolbar.js.map +1 -1
- package/dist/cjs/primeReactComponents.js.map +1 -1
- package/dist/cjs/primeReactPackage.js.map +1 -1
- package/dist/cjs/properties.js.map +1 -1
- package/dist/cjs/screen/PrimeAction.js.map +1 -1
- package/dist/cjs/screen/PrimeField.js.map +1 -1
- package/dist/cjs/screen/PrimeSection.js.map +1 -1
- package/dist/cjs/screen/PrimeSummary.js.map +1 -1
- package/dist/cjs/screen/PrimeText.js.map +1 -1
- package/dist/cjs/screen/PrimeTitle.js.map +1 -1
- package/dist/cjs/theme/PrimeReactThemeFamily.js.map +1 -1
- package/dist/cjs/theme/primeReactThemePreset.js.map +1 -1
- package/dist/cjs/theme/primeReactThemes.js.map +1 -1
- package/dist/cjs/theme/themePresets.js.map +1 -1
- package/dist/cjs/theme/usePrimeReactTheme.js.map +1 -1
- package/dist/cjs/treeNodes.js.map +1 -1
- package/dist/esm/button/PrimeButton.js.map +1 -1
- package/dist/esm/button/PrimeButtonGroup.js.map +1 -1
- package/dist/esm/button/PrimeSpeedDial.js.map +1 -1
- package/dist/esm/button/PrimeSplitButton.js.map +1 -1
- package/dist/esm/button/SplitButton.js.map +1 -1
- package/dist/esm/data/Column.js.map +1 -1
- package/dist/esm/data/Pagination.js.map +1 -1
- package/dist/esm/data/PrimeColumn.js.map +1 -1
- package/dist/esm/data/PrimeDataTable.js.map +1 -1
- package/dist/esm/data/PrimeDataView.js.map +1 -1
- package/dist/esm/data/PrimeOrderList.js.map +1 -1
- package/dist/esm/data/PrimeOrganizationChart.js.map +1 -1
- package/dist/esm/data/PrimePaginator.js.map +1 -1
- package/dist/esm/data/PrimePickList.js.map +1 -1
- package/dist/esm/data/PrimeTimeline.js.map +1 -1
- package/dist/esm/data/PrimeTree.js.map +1 -1
- package/dist/esm/data/columnDefinitions.js.map +1 -1
- package/dist/esm/data/primeTreeNodes.js.map +1 -1
- package/dist/esm/data/selectOptions.js.map +1 -1
- package/dist/esm/form/PrimeAutoComplete.js.map +1 -1
- package/dist/esm/form/PrimeCalendar.js.map +1 -1
- package/dist/esm/form/PrimeCheckbox.js.map +1 -1
- package/dist/esm/form/PrimeChips.js.map +1 -1
- package/dist/esm/form/PrimeColorPicker.js.map +1 -1
- package/dist/esm/form/PrimeDropdown.js.map +1 -1
- package/dist/esm/form/PrimeFloatLabel.js.map +1 -1
- package/dist/esm/form/PrimeIconField.js.map +1 -1
- package/dist/esm/form/PrimeInputNumber.js.map +1 -1
- package/dist/esm/form/PrimeInputText.js.map +1 -1
- package/dist/esm/form/PrimeInputTextarea.js.map +1 -1
- package/dist/esm/form/PrimeKnob.js.map +1 -1
- package/dist/esm/form/PrimeListBox.js.map +1 -1
- package/dist/esm/form/PrimeMultiSelect.js.map +1 -1
- package/dist/esm/form/PrimePassword.js.map +1 -1
- package/dist/esm/form/PrimeRadioButton.js.map +1 -1
- package/dist/esm/form/PrimeRating.js.map +1 -1
- package/dist/esm/form/PrimeSelectButton.js.map +1 -1
- package/dist/esm/form/PrimeSlider.js.map +1 -1
- package/dist/esm/form/PrimeToggleSwitch.js.map +1 -1
- package/dist/esm/form/PrimeTreeSelect.js.map +1 -1
- package/dist/esm/form/TreeSelect.js.map +1 -1
- package/dist/esm/media/Image.js.map +1 -1
- package/dist/esm/media/PrimeCarousel.js.map +1 -1
- package/dist/esm/media/PrimeGalleria.js.map +1 -1
- package/dist/esm/media/PrimeImage.js.map +1 -1
- package/dist/esm/menu/Dock.js.map +1 -1
- package/dist/esm/menu/DockPosition.js.map +1 -1
- package/dist/esm/menu/MegaMenu.js.map +1 -1
- package/dist/esm/menu/MenuItemAction.js.map +1 -1
- package/dist/esm/menu/MenuItemContent.js.map +1 -1
- package/dist/esm/menu/Menubar.js.map +1 -1
- package/dist/esm/menu/PanelMenu.js.map +1 -1
- package/dist/esm/menu/PrimeBreadcrumb.js.map +1 -1
- package/dist/esm/menu/PrimeContextMenu.js.map +1 -1
- package/dist/esm/menu/PrimeDock.js.map +1 -1
- package/dist/esm/menu/PrimeMegaMenu.js.map +1 -1
- package/dist/esm/menu/PrimeMenu.js.map +1 -1
- package/dist/esm/menu/PrimeMenubar.js.map +1 -1
- package/dist/esm/menu/PrimePanelMenu.js.map +1 -1
- package/dist/esm/menu/PrimeSteps.js.map +1 -1
- package/dist/esm/menu/PrimeTabMenu.js.map +1 -1
- package/dist/esm/menu/PrimeTieredMenu.js.map +1 -1
- package/dist/esm/menu/Steps.js.map +1 -1
- package/dist/esm/menu/TabMenu.js.map +1 -1
- package/dist/esm/menu/TieredMenu.js.map +1 -1
- package/dist/esm/menuItems.js.map +1 -1
- package/dist/esm/messages/PrimeInlineMessage.js.map +1 -1
- package/dist/esm/messages/PrimeMessage.js.map +1 -1
- package/dist/esm/messages/PrimeToast.js.map +1 -1
- package/dist/esm/misc/BlockUI.js.map +1 -1
- package/dist/esm/misc/PrimeAvatar.js.map +1 -1
- package/dist/esm/misc/PrimeBadge.js.map +1 -1
- package/dist/esm/misc/PrimeBlockUI.js.map +1 -1
- package/dist/esm/misc/PrimeChip.js.map +1 -1
- package/dist/esm/misc/PrimeInplace.js.map +1 -1
- package/dist/esm/misc/PrimeProgressBar.js.map +1 -1
- package/dist/esm/misc/PrimeProgressSpinner.js.map +1 -1
- package/dist/esm/misc/PrimeScrollTop.js.map +1 -1
- package/dist/esm/misc/PrimeSkeleton.js.map +1 -1
- package/dist/esm/misc/PrimeTag.js.map +1 -1
- package/dist/esm/misc/PrimeTerminal.js.map +1 -1
- package/dist/esm/misc/ScrollTop.js.map +1 -1
- package/dist/esm/overlay/ConfirmDialog.js.map +1 -1
- package/dist/esm/overlay/PrimeConfirmDialog.js.map +1 -1
- package/dist/esm/overlay/PrimeDialog.js.map +1 -1
- package/dist/esm/overlay/PrimeOverlayPanel.js.map +1 -1
- package/dist/esm/overlay/PrimeSidebar.js.map +1 -1
- package/dist/esm/overlay/PrimeTooltip.js.map +1 -1
- package/dist/esm/panel/PrimeAccordion.js.map +1 -1
- package/dist/esm/panel/PrimeCard.js.map +1 -1
- package/dist/esm/panel/PrimeDivider.js.map +1 -1
- package/dist/esm/panel/PrimeFieldset.js.map +1 -1
- package/dist/esm/panel/PrimePanel.js.map +1 -1
- package/dist/esm/panel/PrimeScrollPanel.js.map +1 -1
- package/dist/esm/panel/PrimeSplitter.js.map +1 -1
- package/dist/esm/panel/PrimeStepper.js.map +1 -1
- package/dist/esm/panel/PrimeTabView.js.map +1 -1
- package/dist/esm/panel/PrimeToolbar.js.map +1 -1
- package/dist/esm/primeReactComponents.js.map +1 -1
- package/dist/esm/primeReactPackage.js.map +1 -1
- package/dist/esm/properties.js.map +1 -1
- package/dist/esm/screen/PrimeAction.js.map +1 -1
- package/dist/esm/screen/PrimeField.js.map +1 -1
- package/dist/esm/screen/PrimeSection.js.map +1 -1
- package/dist/esm/screen/PrimeSummary.js.map +1 -1
- package/dist/esm/screen/PrimeText.js.map +1 -1
- package/dist/esm/screen/PrimeTitle.js.map +1 -1
- package/dist/esm/theme/PrimeReactThemeFamily.js.map +1 -1
- package/dist/esm/theme/primeReactThemePreset.js.map +1 -1
- package/dist/esm/theme/primeReactThemes.js.map +1 -1
- package/dist/esm/theme/themePresets.js.map +1 -1
- package/dist/esm/theme/usePrimeReactTheme.js.map +1 -1
- package/dist/esm/treeNodes.js.map +1 -1
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/package.json +14 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"primeReactThemes.js","sources":["../../../theme/primeReactThemes.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Theme } from '@cratis/scene.model';\nimport { themePresets } from './themePresets';\n\n/**\n * The packages a PrimeReact theme declares itself compatible with.\n *\n * `PrimeReact` and `Tailwind` are obvious - the preset skins PrimeReact's components, and this package's\n * own wrappers lay themselves out with Tailwind utilities.\n *\n * `core` is the interesting one, and it is listed deliberately rather than by reflex. A theme reaches a\n * screen in two layers: the `--p-*` custom properties `@primeuix/styled` emits for the active preset,\n * which only PrimeReact's own components read, and a set of semantic Scene tokens that\n * `SceneThemeProvider` writes onto the wrapping element. The second layer applies to *everything*\n * underneath it, `core`'s unstyled primitives included - they inherit the theme's type color and can read\n * any token they choose to. So the claim being made is precise: these themes genuinely reach `core`'s\n * components, through tokens rather than through the component skin.\n *\n * This has to be said explicitly because `ThemeCompatibility` has no implicit exemption for `core`. A\n * theme that leaves it out is reported incompatible for every profile that lists `core`, which for a\n * theme that really does apply would be a false alarm on nearly every profile there is.\n */\nexport const primeReactThemeCompatibility: string[] = ['PrimeReact', 'Tailwind', 'core'];\n\n/**\n * The license every theme in this catalog is published under.\n *\n * This is **not** MIT, and the difference matters enough to be a named constant rather than a string\n * repeated twenty-four times. PrimeReact 10 - presets included - was MIT. PrimeReact 11 relicensed the\n * entire stack (`primereact`, `@primereact/core`, `@primereact/headless`, `primeicons`,\n * `@primeuix/themes`, `@primeuix/styled`) under the commercial PrimeUI license, which requires a license\n * key: without one, `PrimeReactProvider` warns on the console and injects an \"Invalid PrimeUI License\"\n * banner, in development and production alike.\n *\n * `Theme`'s `license` field exists so a theme picker, an audit, or a person reading the catalog can see\n * what they are actually taking on. Reporting these as MIT because the *previous* major was MIT is the\n * exact mistake the field is there to prevent.\n *\n * @see https://primeui.dev/licenses/community for the free community tier and its eligibility limits.\n * @see https://primeui.dev/licenses/commercial for the paid tier.\n */\nexport const primeReactThemeLicense = 'PrimeUI Community / Commercial';\n\n/**\n * Where those terms live. A license name alone tells a reader nothing about whether they qualify for the\n * free Community tier or owe a commercial fee, so the catalog carries the link rather than making them\n * search for it.\n */\nexport const primeReactThemeLicenseUrl = 'https://primeui.dev/licenses/community';\n\n/**\n * Every theme this package ships, as Scene {@link Theme}s.\n *\n * None of these themes are ours. They are PrimeTek's `@primeuix/themes` presets - Aura, Lara, Nora and\n * Material - with one of the preset's own primitive color ramps bound to its primary scale. Choosing\n * which accent to bind is the only design decision Scene makes here, and it is not enough to claim\n * authorship over: the surface ramps, the radii, the focus rings, the component styling and the design\n * language are all PrimeTek's work.\n *\n * That is what `Theme`'s `author`, `authorUrl` and `license` fields exist to record, and why the credit\n * is applied here, once, to every preset, rather than written out per theme where it could be forgotten.\n */\nexport const primeReactThemes: Theme[] = themePresets.map((preset) => ({\n ...preset,\n compatibleWith: primeReactThemeCompatibility,\n author: 'PrimeTek',\n authorUrl: 'https://primereact.org',\n license: primeReactThemeLicense,\n licenseUrl: primeReactThemeLicenseUrl,\n}));\n\n/**\n * The names of every theme this package ships, in catalog order - what the manifest declares and what a\n * theme picker lists.\n */\nexport const primeReactThemeNames: string[] = primeReactThemes.map((theme) => theme.name);\n\n/**\n * Finds one of this package's themes by name.\n *\n * @param name The theme name.\n * @returns The theme, or `undefined` when this package does not ship one by that name.\n */\nexport function primeReactTheme(name: string): Theme | undefined {\n return primeReactThemes.find((theme) => theme.name === name);\n}\n"],"names":["primeReactThemeCompatibility","primeReactThemeLicense","primeReactThemeLicenseUrl","primeReactThemes","themePresets","map","preset","compatibleWith","author","authorUrl","license","licenseUrl","primeReactThemeNames","theme","name","primeReactTheme","find"],"mappings":";;;;AAAA;AACA;AAKA;;;;;;;;;;;;;;;;;UAkBaA,4BAAAA,GAAyC;AAAC,IAAA,YAAA;AAAc,IAAA,UAAA;AAAY,IAAA;;AAEjF;;;;;;;;;;;;;;;;IAiBO,MAAMC,sBAAAA,GAAyB;AAEtC;;;;IAKO,MAAMC,yBAAAA,GAA4B;AAEzC;;;;;;;;;;;UAYaC,gBAAAA,GAA4BC,yBAAAA,CAAaC,GAAG,CAAC,CAACC,UAAY;AACnE,QAAA,GAAGA,MAAM;QACTC,cAAAA,EAAgBP,4BAAAA;QAChBQ,MAAAA,EAAQ,UAAA;QACRC,SAAAA,EAAW,wBAAA;QACXC,OAAAA,EAAST,sBAAAA;QACTU,UAAAA,EAAYT;AAChB,KAAA,CAAA;AAEA;;;IAIO,MAAMU,oBAAAA,GAAiCT,gBAAAA,CAAiBE,GAAG,CAAC,CAACQ,KAAAA,GAAUA,KAAAA,CAAMC,IAAI;AAExF;;;;;IAMO,SAASC,eAAAA,CAAgBD,IAAY,EAAA;AACxC,IAAA,OAAOX,iBAAiBa,IAAI,CAAC,CAACH,KAAAA,GAAUA,KAAAA,CAAMC,IAAI,KAAKA,IAAAA,CAAAA;AAC3D
|
|
1
|
+
{"version":3,"file":"primeReactThemes.js","sources":["../../../theme/primeReactThemes.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Theme } from '@cratis/scene.model';\nimport { themePresets } from './themePresets';\n\n/**\n * The packages a PrimeReact theme declares itself compatible with.\n *\n * `PrimeReact` and `Tailwind` are obvious - the preset skins PrimeReact's components, and this package's\n * own wrappers lay themselves out with Tailwind utilities.\n *\n * `core` is the interesting one, and it is listed deliberately rather than by reflex. A theme reaches a\n * screen in two layers: the `--p-*` custom properties `@primeuix/styled` emits for the active preset,\n * which only PrimeReact's own components read, and a set of semantic Scene tokens that\n * `SceneThemeProvider` writes onto the wrapping element. The second layer applies to *everything*\n * underneath it, `core`'s unstyled primitives included - they inherit the theme's type color and can read\n * any token they choose to. So the claim being made is precise: these themes genuinely reach `core`'s\n * components, through tokens rather than through the component skin.\n *\n * This has to be said explicitly because `ThemeCompatibility` has no implicit exemption for `core`. A\n * theme that leaves it out is reported incompatible for every profile that lists `core`, which for a\n * theme that really does apply would be a false alarm on nearly every profile there is.\n */\nexport const primeReactThemeCompatibility: string[] = ['PrimeReact', 'Tailwind', 'core'];\n\n/**\n * The license every theme in this catalog is published under.\n *\n * This is **not** MIT, and the difference matters enough to be a named constant rather than a string\n * repeated twenty-four times. PrimeReact 10 - presets included - was MIT. PrimeReact 11 relicensed the\n * entire stack (`primereact`, `@primereact/core`, `@primereact/headless`, `primeicons`,\n * `@primeuix/themes`, `@primeuix/styled`) under the commercial PrimeUI license, which requires a license\n * key: without one, `PrimeReactProvider` warns on the console and injects an \"Invalid PrimeUI License\"\n * banner, in development and production alike.\n *\n * `Theme`'s `license` field exists so a theme picker, an audit, or a person reading the catalog can see\n * what they are actually taking on. Reporting these as MIT because the *previous* major was MIT is the\n * exact mistake the field is there to prevent.\n *\n * @see https://primeui.dev/licenses/community for the free community tier and its eligibility limits.\n * @see https://primeui.dev/licenses/commercial for the paid tier.\n */\nexport const primeReactThemeLicense = 'PrimeUI Community / Commercial';\n\n/**\n * Where those terms live. A license name alone tells a reader nothing about whether they qualify for the\n * free Community tier or owe a commercial fee, so the catalog carries the link rather than making them\n * search for it.\n */\nexport const primeReactThemeLicenseUrl = 'https://primeui.dev/licenses/community';\n\n/**\n * Every theme this package ships, as Scene {@link Theme}s.\n *\n * None of these themes are ours. They are PrimeTek's `@primeuix/themes` presets - Aura, Lara, Nora and\n * Material - with one of the preset's own primitive color ramps bound to its primary scale. Choosing\n * which accent to bind is the only design decision Scene makes here, and it is not enough to claim\n * authorship over: the surface ramps, the radii, the focus rings, the component styling and the design\n * language are all PrimeTek's work.\n *\n * That is what `Theme`'s `author`, `authorUrl` and `license` fields exist to record, and why the credit\n * is applied here, once, to every preset, rather than written out per theme where it could be forgotten.\n */\nexport const primeReactThemes: Theme[] = themePresets.map((preset) => ({\n ...preset,\n compatibleWith: primeReactThemeCompatibility,\n author: 'PrimeTek',\n authorUrl: 'https://primereact.org',\n license: primeReactThemeLicense,\n licenseUrl: primeReactThemeLicenseUrl,\n}));\n\n/**\n * The names of every theme this package ships, in catalog order - what the manifest declares and what a\n * theme picker lists.\n */\nexport const primeReactThemeNames: string[] = primeReactThemes.map((theme) => theme.name);\n\n/**\n * Finds one of this package's themes by name.\n *\n * @param name The theme name.\n * @returns The theme, or `undefined` when this package does not ship one by that name.\n */\nexport function primeReactTheme(name: string): Theme | undefined {\n return primeReactThemes.find((theme) => theme.name === name);\n}\n"],"names":["primeReactThemeCompatibility","primeReactThemeLicense","primeReactThemeLicenseUrl","primeReactThemes","themePresets","map","preset","compatibleWith","author","authorUrl","license","licenseUrl","primeReactThemeNames","theme","name","primeReactTheme","find"],"mappings":";;;;AAAA;AACA;AAKA;;;;;;;;;;;;;;;;;UAkBaA,4BAAAA,GAAyC;AAAC,IAAA,YAAA;AAAc,IAAA,UAAA;AAAY,IAAA;;AAEjF;;;;;;;;;;;;;;;;IAiBO,MAAMC,sBAAAA,GAAyB;AAEtC;;;;IAKO,MAAMC,yBAAAA,GAA4B;AAEzC;;;;;;;;;;;UAYaC,gBAAAA,GAA4BC,yBAAAA,CAAaC,GAAG,CAAC,CAACC,UAAY;AACnE,QAAA,GAAGA,MAAM;QACTC,cAAAA,EAAgBP,4BAAAA;QAChBQ,MAAAA,EAAQ,UAAA;QACRC,SAAAA,EAAW,wBAAA;QACXC,OAAAA,EAAST,sBAAAA;QACTU,UAAAA,EAAYT;AAChB,KAAA,CAAA;AAEA;;;IAIO,MAAMU,oBAAAA,GAAiCT,gBAAAA,CAAiBE,GAAG,CAAC,CAACQ,KAAAA,GAAUA,KAAAA,CAAMC,IAAI;AAExF;;;;;IAMO,SAASC,eAAAA,CAAgBD,IAAY,EAAA;AACxC,IAAA,OAAOX,iBAAiBa,IAAI,CAAC,CAACH,KAAAA,GAAUA,KAAAA,CAAMC,IAAI,KAAKA,IAAAA,CAAAA;AAC3D;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"themePresets.js","sources":["../../../theme/themePresets.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Theme } from '@cratis/scene.model';\nimport { PrimeReactThemeFamily } from './PrimeReactThemeFamily';\n\n/**\n * One PrimeReact theme, minus everything that is identical for all of them, plus the two facts a v11\n * theme needs that a v10 theme did not: which `@primeuix/themes` preset family it is built on, and which\n * primitive color ramp is bound to the preset's primary scale.\n *\n * Attribution and compatibility are deliberately *not* here: they are added once, for every preset, in\n * `primeReactThemes`. Every one of these themes is PrimeTek's design work and none of them is ours, so\n * crediting them one entry at a time would make it possible to add a twenty-fifth and forget - and a\n * dropped credit is not the kind of mistake a code review reliably catches.\n */\nexport type ThemePreset = Omit<Theme, 'compatibleWith' | 'author' | 'authorUrl' | 'license'> & {\n /**\n * The `@primeuix/themes` preset family this theme applies through `PrimeReactProvider`.\n */\n family: PrimeReactThemeFamily;\n\n /**\n * The name of the primitive color ramp bound to the preset's `primary` scale - the accent the whole\n * theme is tinted by.\n */\n primaryColor: string;\n};\n\n/**\n * Every theme this package ships, and the Scene tokens each one stands for.\n *\n * This is data, not logic, but unlike the PrimeReact 10 catalog it is *derived* data. A v10 theme was a\n * compiled stylesheet whose `:root` block could be read with a text editor, so the token values were\n * transcribed by hand. A v11 theme is a JavaScript preset whose values are token *references* -\n * `{emerald.500}`, `light-dark({surface.0}, {surface.900})` - resolved by `@primeuix/styled` at runtime.\n * Transcribing those by hand would mean re-implementing the resolver in one's head, once per theme.\n *\n * So these values were generated: each preset was loaded, its `primary` scale bound to the chosen color\n * ramp, and the thirteen Scene tokens resolved through the same `light-dark()` and `{path}` rules\n * `@primeuix/styled` applies. What is committed here is the *output* of that resolution, so the catalog\n * stays plain data that a theme picker can read without booting a theme engine - while still agreeing,\n * value for value, with what the preset actually renders.\n *\n * The catalog is not a like-for-like port of the v10 one. PrimeReact 11 ships four preset families -\n * Aura, Lara, Nora and Material - and the v10 themes that had no counterpart among them (`saga`,\n * `vela`, `arya`, `bootstrap4`, `soho`, `viva`, `nano`, `mira`, `fluent-light`, `tailwind-light`) are\n * not carried over. Renaming a Lara onto `soho-dark` would have kept the catalog's length at the cost\n * of its honesty.\n */\nexport const themePresets: ThemePreset[] = [\n {\n name: 'aura-light-blue',\n description: 'Aura, the flagship PrimeReact 11 design language, in light on a blue accent.',\n family: PrimeReactThemeFamily.Aura,\n primaryColor: 'blue',\n isDark: false,\n tokens: {\n 'primary.color': '#3b82f6',\n 'primary.contrastColor': '#ffffff',\n 'surface.background': '#f8fafc',\n 'surface.card': '#ffffff',\n 'surface.border': '#e2e8f0',\n 'surface.hover': '#f1f5f9',\n 'surface.overlay': '#ffffff',\n 'text.color': '#334155',\n 'text.mutedColor': '#64748b',\n 'highlight.background': '#eff6ff',\n 'highlight.color': '#1d4ed8',\n 'content.borderRadius': '6px',\n 'focus.ring': 'none',\n },\n },\n {\n name: 'aura-dark-blue',\n description: 'Aura, the flagship PrimeReact 11 design language, in dark on a blue accent.',\n family: PrimeReactThemeFamily.Aura,\n primaryColor: 'blue',\n isDark: true,\n tokens: {\n 'primary.color': '#60a5fa',\n 'primary.contrastColor': '#18181b',\n 'surface.background': '#09090b',\n 'surface.card': '#18181b',\n 'surface.border': '#3f3f46',\n 'surface.hover': '#27272a',\n 'surface.overlay': '#18181b',\n 'text.color': '#ffffff',\n 'text.mutedColor': '#a1a1aa',\n 'highlight.background': 'color-mix(in srgb, #60a5fa, transparent 84%)',\n 'highlight.color': 'rgba(255,255,255,.87)',\n 'content.borderRadius': '6px',\n 'focus.ring': 'none',\n },\n },\n {\n name: 'aura-light-indigo',\n description: 'Aura, the flagship PrimeReact 11 design language, in light on an indigo accent.',\n family: PrimeReactThemeFamily.Aura,\n primaryColor: 'indigo',\n isDark: false,\n tokens: {\n 'primary.color': '#6366f1',\n 'primary.contrastColor': '#ffffff',\n 'surface.background': '#f8fafc',\n 'surface.card': '#ffffff',\n 'surface.border': '#e2e8f0',\n 'surface.hover': '#f1f5f9',\n 'surface.overlay': '#ffffff',\n 'text.color': '#334155',\n 'text.mutedColor': '#64748b',\n 'highlight.background': '#eef2ff',\n 'highlight.color': '#4338ca',\n 'content.borderRadius': '6px',\n 'focus.ring': 'none',\n },\n },\n {\n name: 'aura-dark-indigo',\n description: 'Aura, the flagship PrimeReact 11 design language, in dark on an indigo accent.',\n family: PrimeReactThemeFamily.Aura,\n primaryColor: 'indigo',\n isDark: true,\n tokens: {\n 'primary.color': '#818cf8',\n 'primary.contrastColor': '#18181b',\n 'surface.background': '#09090b',\n 'surface.card': '#18181b',\n 'surface.border': '#3f3f46',\n 'surface.hover': '#27272a',\n 'surface.overlay': '#18181b',\n 'text.color': '#ffffff',\n 'text.mutedColor': '#a1a1aa',\n 'highlight.background': 'color-mix(in srgb, #818cf8, transparent 84%)',\n 'highlight.color': 'rgba(255,255,255,.87)',\n 'content.borderRadius': '6px',\n 'focus.ring': 'none',\n },\n },\n {\n name: 'aura-light-purple',\n description: 'Aura, the flagship PrimeReact 11 design language, in light on a purple accent.',\n family: PrimeReactThemeFamily.Aura,\n primaryColor: 'purple',\n isDark: false,\n tokens: {\n 'primary.color': '#a855f7',\n 'primary.contrastColor': '#ffffff',\n 'surface.background': '#f8fafc',\n 'surface.card': '#ffffff',\n 'surface.border': '#e2e8f0',\n 'surface.hover': '#f1f5f9',\n 'surface.overlay': '#ffffff',\n 'text.color': '#334155',\n 'text.mutedColor': '#64748b',\n 'highlight.background': '#faf5ff',\n 'highlight.color': '#7e22ce',\n 'content.borderRadius': '6px',\n 'focus.ring': 'none',\n },\n },\n {\n name: 'aura-dark-purple',\n description: 'Aura, the flagship PrimeReact 11 design language, in dark on a purple accent.',\n family: PrimeReactThemeFamily.Aura,\n primaryColor: 'purple',\n isDark: true,\n tokens: {\n 'primary.color': '#c084fc',\n 'primary.contrastColor': '#18181b',\n 'surface.background': '#09090b',\n 'surface.card': '#18181b',\n 'surface.border': '#3f3f46',\n 'surface.hover': '#27272a',\n 'surface.overlay': '#18181b',\n 'text.color': '#ffffff',\n 'text.mutedColor': '#a1a1aa',\n 'highlight.background': 'color-mix(in srgb, #c084fc, transparent 84%)',\n 'highlight.color': 'rgba(255,255,255,.87)',\n 'content.borderRadius': '6px',\n 'focus.ring': 'none',\n },\n },\n {\n name: 'aura-light-teal',\n description: 'Aura, the flagship PrimeReact 11 design language, in light on a teal accent.',\n family: PrimeReactThemeFamily.Aura,\n primaryColor: 'teal',\n isDark: false,\n tokens: {\n 'primary.color': '#14b8a6',\n 'primary.contrastColor': '#ffffff',\n 'surface.background': '#f8fafc',\n 'surface.card': '#ffffff',\n 'surface.border': '#e2e8f0',\n 'surface.hover': '#f1f5f9',\n 'surface.overlay': '#ffffff',\n 'text.color': '#334155',\n 'text.mutedColor': '#64748b',\n 'highlight.background': '#f0fdfa',\n 'highlight.color': '#0f766e',\n 'content.borderRadius': '6px',\n 'focus.ring': 'none',\n },\n },\n {\n name: 'aura-dark-teal',\n description: 'Aura, the flagship PrimeReact 11 design language, in dark on a teal accent.',\n family: PrimeReactThemeFamily.Aura,\n primaryColor: 'teal',\n isDark: true,\n tokens: {\n 'primary.color': '#2dd4bf',\n 'primary.contrastColor': '#18181b',\n 'surface.background': '#09090b',\n 'surface.card': '#18181b',\n 'surface.border': '#3f3f46',\n 'surface.hover': '#27272a',\n 'surface.overlay': '#18181b',\n 'text.color': '#ffffff',\n 'text.mutedColor': '#a1a1aa',\n 'highlight.background': 'color-mix(in srgb, #2dd4bf, transparent 84%)',\n 'highlight.color': 'rgba(255,255,255,.87)',\n 'content.borderRadius': '6px',\n 'focus.ring': 'none',\n },\n },\n {\n name: 'lara-light-blue',\n description: 'Lara, the roomy family Scene shipped on PrimeReact 10, in light on a blue accent.',\n family: PrimeReactThemeFamily.Lara,\n primaryColor: 'blue',\n isDark: false,\n tokens: {\n 'primary.color': '#3b82f6',\n 'primary.contrastColor': '#ffffff',\n 'surface.background': '#f8fafc',\n 'surface.card': '#ffffff',\n 'surface.border': '#e2e8f0',\n 'surface.hover': '#f1f5f9',\n 'surface.overlay': '#ffffff',\n 'text.color': '#334155',\n 'text.mutedColor': '#64748b',\n 'highlight.background': '#eff6ff',\n 'highlight.color': '#1d4ed8',\n 'content.borderRadius': '6px',\n 'focus.ring': '0 0 0 0.2rem #bfdbfe',\n },\n },\n {\n name: 'lara-dark-blue',\n description: 'Lara, the roomy family Scene shipped on PrimeReact 10, in dark on a blue accent.',\n family: PrimeReactThemeFamily.Lara,\n primaryColor: 'blue',\n isDark: true,\n tokens: {\n 'primary.color': '#60a5fa',\n 'primary.contrastColor': '#18181b',\n 'surface.background': '#09090b',\n 'surface.card': '#18181b',\n 'surface.border': '#3f3f46',\n 'surface.hover': '#27272a',\n 'surface.overlay': '#18181b',\n 'text.color': '#ffffff',\n 'text.mutedColor': '#a1a1aa',\n 'highlight.background': 'color-mix(in srgb, #60a5fa, transparent 84%)',\n 'highlight.color': 'rgba(255,255,255,.87)',\n 'content.borderRadius': '6px',\n 'focus.ring': '0 0 0 0.2rem color-mix(in srgb, #60a5fa, transparent 80%)',\n },\n },\n {\n name: 'lara-light-indigo',\n description: 'Lara, the roomy family Scene shipped on PrimeReact 10, in light on an indigo accent.',\n family: PrimeReactThemeFamily.Lara,\n primaryColor: 'indigo',\n isDark: false,\n tokens: {\n 'primary.color': '#6366f1',\n 'primary.contrastColor': '#ffffff',\n 'surface.background': '#f8fafc',\n 'surface.card': '#ffffff',\n 'surface.border': '#e2e8f0',\n 'surface.hover': '#f1f5f9',\n 'surface.overlay': '#ffffff',\n 'text.color': '#334155',\n 'text.mutedColor': '#64748b',\n 'highlight.background': '#eef2ff',\n 'highlight.color': '#4338ca',\n 'content.borderRadius': '6px',\n 'focus.ring': '0 0 0 0.2rem #c7d2fe',\n },\n },\n {\n name: 'lara-dark-indigo',\n description: 'Lara, the roomy family Scene shipped on PrimeReact 10, in dark on an indigo accent.',\n family: PrimeReactThemeFamily.Lara,\n primaryColor: 'indigo',\n isDark: true,\n tokens: {\n 'primary.color': '#818cf8',\n 'primary.contrastColor': '#18181b',\n 'surface.background': '#09090b',\n 'surface.card': '#18181b',\n 'surface.border': '#3f3f46',\n 'surface.hover': '#27272a',\n 'surface.overlay': '#18181b',\n 'text.color': '#ffffff',\n 'text.mutedColor': '#a1a1aa',\n 'highlight.background': 'color-mix(in srgb, #818cf8, transparent 84%)',\n 'highlight.color': 'rgba(255,255,255,.87)',\n 'content.borderRadius': '6px',\n 'focus.ring': '0 0 0 0.2rem color-mix(in srgb, #818cf8, transparent 80%)',\n },\n },\n {\n name: 'lara-light-purple',\n description: 'Lara, the roomy family Scene shipped on PrimeReact 10, in light on a purple accent.',\n family: PrimeReactThemeFamily.Lara,\n primaryColor: 'purple',\n isDark: false,\n tokens: {\n 'primary.color': '#a855f7',\n 'primary.contrastColor': '#ffffff',\n 'surface.background': '#f8fafc',\n 'surface.card': '#ffffff',\n 'surface.border': '#e2e8f0',\n 'surface.hover': '#f1f5f9',\n 'surface.overlay': '#ffffff',\n 'text.color': '#334155',\n 'text.mutedColor': '#64748b',\n 'highlight.background': '#faf5ff',\n 'highlight.color': '#7e22ce',\n 'content.borderRadius': '6px',\n 'focus.ring': '0 0 0 0.2rem #e9d5ff',\n },\n },\n {\n name: 'lara-dark-purple',\n description: 'Lara, the roomy family Scene shipped on PrimeReact 10, in dark on a purple accent.',\n family: PrimeReactThemeFamily.Lara,\n primaryColor: 'purple',\n isDark: true,\n tokens: {\n 'primary.color': '#c084fc',\n 'primary.contrastColor': '#18181b',\n 'surface.background': '#09090b',\n 'surface.card': '#18181b',\n 'surface.border': '#3f3f46',\n 'surface.hover': '#27272a',\n 'surface.overlay': '#18181b',\n 'text.color': '#ffffff',\n 'text.mutedColor': '#a1a1aa',\n 'highlight.background': 'color-mix(in srgb, #c084fc, transparent 84%)',\n 'highlight.color': 'rgba(255,255,255,.87)',\n 'content.borderRadius': '6px',\n 'focus.ring': '0 0 0 0.2rem color-mix(in srgb, #c084fc, transparent 80%)',\n },\n },\n {\n name: 'lara-light-teal',\n description: 'Lara, the roomy family Scene shipped on PrimeReact 10, in light on a teal accent.',\n family: PrimeReactThemeFamily.Lara,\n primaryColor: 'teal',\n isDark: false,\n tokens: {\n 'primary.color': '#14b8a6',\n 'primary.contrastColor': '#ffffff',\n 'surface.background': '#f8fafc',\n 'surface.card': '#ffffff',\n 'surface.border': '#e2e8f0',\n 'surface.hover': '#f1f5f9',\n 'surface.overlay': '#ffffff',\n 'text.color': '#334155',\n 'text.mutedColor': '#64748b',\n 'highlight.background': '#f0fdfa',\n 'highlight.color': '#0f766e',\n 'content.borderRadius': '6px',\n 'focus.ring': '0 0 0 0.2rem #99f6e4',\n },\n },\n {\n name: 'lara-dark-teal',\n description: 'Lara, the roomy family Scene shipped on PrimeReact 10, in dark on a teal accent.',\n family: PrimeReactThemeFamily.Lara,\n primaryColor: 'teal',\n isDark: true,\n tokens: {\n 'primary.color': '#2dd4bf',\n 'primary.contrastColor': '#18181b',\n 'surface.background': '#09090b',\n 'surface.card': '#18181b',\n 'surface.border': '#3f3f46',\n 'surface.hover': '#27272a',\n 'surface.overlay': '#18181b',\n 'text.color': '#ffffff',\n 'text.mutedColor': '#a1a1aa',\n 'highlight.background': 'color-mix(in srgb, #2dd4bf, transparent 84%)',\n 'highlight.color': 'rgba(255,255,255,.87)',\n 'content.borderRadius': '6px',\n 'focus.ring': '0 0 0 0.2rem color-mix(in srgb, #2dd4bf, transparent 80%)',\n },\n },\n {\n name: 'nora-light-blue',\n description: 'Nora, a tighter, squarer, more compact family, in light on a blue accent.',\n family: PrimeReactThemeFamily.Nora,\n primaryColor: 'blue',\n isDark: false,\n tokens: {\n 'primary.color': '#2563eb',\n 'primary.contrastColor': '#ffffff',\n 'surface.background': '#f8fafc',\n 'surface.card': '#ffffff',\n 'surface.border': '#94a3b8',\n 'surface.hover': '#e2e8f0',\n 'surface.overlay': '#ffffff',\n 'text.color': '#0f172a',\n 'text.mutedColor': '#475569',\n 'highlight.background': '#2563eb',\n 'highlight.color': '#ffffff',\n 'content.borderRadius': '2px',\n 'focus.ring': 'none',\n },\n },\n {\n name: 'nora-dark-blue',\n description: 'Nora, a tighter, squarer, more compact family, in dark on a blue accent.',\n family: PrimeReactThemeFamily.Nora,\n primaryColor: 'blue',\n isDark: true,\n tokens: {\n 'primary.color': '#3b82f6',\n 'primary.contrastColor': '#09090b',\n 'surface.background': '#09090b',\n 'surface.card': '#18181b',\n 'surface.border': '#71717a',\n 'surface.hover': '#3f3f46',\n 'surface.overlay': '#18181b',\n 'text.color': '#ffffff',\n 'text.mutedColor': '#a1a1aa',\n 'highlight.background': '#3b82f6',\n 'highlight.color': '#09090b',\n 'content.borderRadius': '2px',\n 'focus.ring': 'none',\n },\n },\n {\n name: 'nora-light-indigo',\n description: 'Nora, a tighter, squarer, more compact family, in light on an indigo accent.',\n family: PrimeReactThemeFamily.Nora,\n primaryColor: 'indigo',\n isDark: false,\n tokens: {\n 'primary.color': '#4f46e5',\n 'primary.contrastColor': '#ffffff',\n 'surface.background': '#f8fafc',\n 'surface.card': '#ffffff',\n 'surface.border': '#94a3b8',\n 'surface.hover': '#e2e8f0',\n 'surface.overlay': '#ffffff',\n 'text.color': '#0f172a',\n 'text.mutedColor': '#475569',\n 'highlight.background': '#4f46e5',\n 'highlight.color': '#ffffff',\n 'content.borderRadius': '2px',\n 'focus.ring': 'none',\n },\n },\n {\n name: 'nora-dark-indigo',\n description: 'Nora, a tighter, squarer, more compact family, in dark on an indigo accent.',\n family: PrimeReactThemeFamily.Nora,\n primaryColor: 'indigo',\n isDark: true,\n tokens: {\n 'primary.color': '#6366f1',\n 'primary.contrastColor': '#09090b',\n 'surface.background': '#09090b',\n 'surface.card': '#18181b',\n 'surface.border': '#71717a',\n 'surface.hover': '#3f3f46',\n 'surface.overlay': '#18181b',\n 'text.color': '#ffffff',\n 'text.mutedColor': '#a1a1aa',\n 'highlight.background': '#6366f1',\n 'highlight.color': '#09090b',\n 'content.borderRadius': '2px',\n 'focus.ring': 'none',\n },\n },\n {\n name: 'material-light-indigo',\n description: 'Material, the PrimeTek reading of Material Design, in light on an indigo accent.',\n family: PrimeReactThemeFamily.Material,\n primaryColor: 'indigo',\n isDark: false,\n tokens: {\n 'primary.color': '#3F51B5',\n 'primary.contrastColor': '#ffffff',\n 'surface.background': '#f8fafc',\n 'surface.card': '#ffffff',\n 'surface.border': '#cbd5e1',\n 'surface.hover': '#f1f5f9',\n 'surface.overlay': '#ffffff',\n 'text.color': '#0f172a',\n 'text.mutedColor': '#475569',\n 'highlight.background': 'color-mix(in srgb, #3F51B5, transparent 88%)',\n 'highlight.color': '#303F9F',\n 'content.borderRadius': '4px',\n 'focus.ring': '0 0 1px 4px #e2e8f0',\n },\n },\n {\n name: 'material-dark-indigo',\n description: 'Material, the PrimeTek reading of Material Design, in dark on an indigo accent.',\n family: PrimeReactThemeFamily.Material,\n primaryColor: 'indigo',\n isDark: true,\n tokens: {\n 'primary.color': '#5C6BC0',\n 'primary.contrastColor': '#18181b',\n 'surface.background': '#09090b',\n 'surface.card': '#18181b',\n 'surface.border': '#3f3f46',\n 'surface.hover': '#27272a',\n 'surface.overlay': '#18181b',\n 'text.color': '#ffffff',\n 'text.mutedColor': '#a1a1aa',\n 'highlight.background': 'color-mix(in srgb, #5C6BC0, transparent 84%)',\n 'highlight.color': 'rgba(255,255,255,.87)',\n 'content.borderRadius': '4px',\n 'focus.ring': '0 0 1px 4px #3f3f46',\n },\n },\n {\n name: 'material-light-purple',\n description: 'Material, the PrimeTek reading of Material Design, in light on a purple accent.',\n family: PrimeReactThemeFamily.Material,\n primaryColor: 'purple',\n isDark: false,\n tokens: {\n 'primary.color': '#9C27B0',\n 'primary.contrastColor': '#ffffff',\n 'surface.background': '#f8fafc',\n 'surface.card': '#ffffff',\n 'surface.border': '#cbd5e1',\n 'surface.hover': '#f1f5f9',\n 'surface.overlay': '#ffffff',\n 'text.color': '#0f172a',\n 'text.mutedColor': '#475569',\n 'highlight.background': 'color-mix(in srgb, #9C27B0, transparent 88%)',\n 'highlight.color': '#7B1FA2',\n 'content.borderRadius': '4px',\n 'focus.ring': '0 0 1px 4px #e2e8f0',\n },\n },\n {\n name: 'material-dark-purple',\n description: 'Material, the PrimeTek reading of Material Design, in dark on a purple accent.',\n family: PrimeReactThemeFamily.Material,\n primaryColor: 'purple',\n isDark: true,\n tokens: {\n 'primary.color': '#AB47BC',\n 'primary.contrastColor': '#18181b',\n 'surface.background': '#09090b',\n 'surface.card': '#18181b',\n 'surface.border': '#3f3f46',\n 'surface.hover': '#27272a',\n 'surface.overlay': '#18181b',\n 'text.color': '#ffffff',\n 'text.mutedColor': '#a1a1aa',\n 'highlight.background': 'color-mix(in srgb, #AB47BC, transparent 84%)',\n 'highlight.color': 'rgba(255,255,255,.87)',\n 'content.borderRadius': '4px',\n 'focus.ring': '0 0 1px 4px #3f3f46',\n },\n },\n];\n"],"names":["themePresets","name","description","family","PrimeReactThemeFamily","Aura","primaryColor","isDark","tokens","Lara","Nora","Material"],"mappings":";;;;AAAA;AACA;AA4BA;;;;;;;;;;;;;;;;;;;;UAqBaA,YAAAA,GAA8B;AACvC,IAAA;QACIC,IAAAA,EAAM,iBAAA;QACNC,WAAAA,EAAa,8EAAA;AACbC,QAAAA,MAAAA,EAAQC,4CAAsBC,IAAI;QAClCC,YAAAA,EAAc,MAAA;QACdC,MAAAA,EAAQ,KAAA;QACRC,MAAAA,EAAQ;YACJ,eAAA,EAAiB,SAAA;YACjB,uBAAA,EAAyB,SAAA;YACzB,oBAAA,EAAsB,SAAA;YACtB,cAAA,EAAgB,SAAA;YAChB,gBAAA,EAAkB,SAAA;YAClB,eAAA,EAAiB,SAAA;YACjB,iBAAA,EAAmB,SAAA;YACnB,YAAA,EAAc,SAAA;YACd,iBAAA,EAAmB,SAAA;YACnB,sBAAA,EAAwB,SAAA;YACxB,iBAAA,EAAmB,SAAA;YACnB,sBAAA,EAAwB,KAAA;YACxB,YAAA,EAAc;AAClB;AACJ,KAAA;AACA,IAAA;QACIP,IAAAA,EAAM,gBAAA;QACNC,WAAAA,EAAa,6EAAA;AACbC,QAAAA,MAAAA,EAAQC,4CAAsBC,IAAI;QAClCC,YAAAA,EAAc,MAAA;QACdC,MAAAA,EAAQ,IAAA;QACRC,MAAAA,EAAQ;YACJ,eAAA,EAAiB,SAAA;YACjB,uBAAA,EAAyB,SAAA;YACzB,oBAAA,EAAsB,SAAA;YACtB,cAAA,EAAgB,SAAA;YAChB,gBAAA,EAAkB,SAAA;YAClB,eAAA,EAAiB,SAAA;YACjB,iBAAA,EAAmB,SAAA;YACnB,YAAA,EAAc,SAAA;YACd,iBAAA,EAAmB,SAAA;YACnB,sBAAA,EAAwB,8CAAA;YACxB,iBAAA,EAAmB,uBAAA;YACnB,sBAAA,EAAwB,KAAA;YACxB,YAAA,EAAc;AAClB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Ac;AAClB;AACJ,KAAA;AACA,IAAA;QACIP,IAAAA,EAAM,sBAAA;QACNC,WAAAA,EAAa,gFAAA;AACbC,QAAAA,MAAAA,EAAQC,4CAAsBO,QAAQ;QACtCL,YAAAA,EAAc,QAAA;QACdC,MAAAA,EAAQ,IAAA;QACRC,MAAAA,EAAQ;YACJ,eAAA,EAAiB,SAAA;YACjB,uBAAA,EAAyB,SAAA;YACzB,oBAAA,EAAsB,SAAA;YACtB,cAAA,EAAgB,SAAA;YAChB,gBAAA,EAAkB,SAAA;YAClB,eAAA,EAAiB,SAAA;YACjB,iBAAA,EAAmB,SAAA;YACnB,YAAA,EAAc,SAAA;YACd,iBAAA,EAAmB,SAAA;YACnB,sBAAA,EAAwB,8CAAA;YACxB,iBAAA,EAAmB,uBAAA;YACnB,sBAAA,EAAwB,KAAA;YACxB,YAAA,EAAc;AAClB;AACJ;;;;;"}
|
|
1
|
+
{"version":3,"file":"themePresets.js","sources":["../../../theme/themePresets.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Theme } from '@cratis/scene.model';\nimport { PrimeReactThemeFamily } from './PrimeReactThemeFamily';\n\n/**\n * One PrimeReact theme, minus everything that is identical for all of them, plus the two facts a v11\n * theme needs that a v10 theme did not: which `@primeuix/themes` preset family it is built on, and which\n * primitive color ramp is bound to the preset's primary scale.\n *\n * Attribution and compatibility are deliberately *not* here: they are added once, for every preset, in\n * `primeReactThemes`. Every one of these themes is PrimeTek's design work and none of them is ours, so\n * crediting them one entry at a time would make it possible to add a twenty-fifth and forget - and a\n * dropped credit is not the kind of mistake a code review reliably catches.\n */\nexport type ThemePreset = Omit<Theme, 'compatibleWith' | 'author' | 'authorUrl' | 'license'> & {\n /**\n * The `@primeuix/themes` preset family this theme applies through `PrimeReactProvider`.\n */\n family: PrimeReactThemeFamily;\n\n /**\n * The name of the primitive color ramp bound to the preset's `primary` scale - the accent the whole\n * theme is tinted by.\n */\n primaryColor: string;\n};\n\n/**\n * Every theme this package ships, and the Scene tokens each one stands for.\n *\n * This is data, not logic, but unlike the PrimeReact 10 catalog it is *derived* data. A v10 theme was a\n * compiled stylesheet whose `:root` block could be read with a text editor, so the token values were\n * transcribed by hand. A v11 theme is a JavaScript preset whose values are token *references* -\n * `{emerald.500}`, `light-dark({surface.0}, {surface.900})` - resolved by `@primeuix/styled` at runtime.\n * Transcribing those by hand would mean re-implementing the resolver in one's head, once per theme.\n *\n * So these values were generated: each preset was loaded, its `primary` scale bound to the chosen color\n * ramp, and the thirteen Scene tokens resolved through the same `light-dark()` and `{path}` rules\n * `@primeuix/styled` applies. What is committed here is the *output* of that resolution, so the catalog\n * stays plain data that a theme picker can read without booting a theme engine - while still agreeing,\n * value for value, with what the preset actually renders.\n *\n * The catalog is not a like-for-like port of the v10 one. PrimeReact 11 ships four preset families -\n * Aura, Lara, Nora and Material - and the v10 themes that had no counterpart among them (`saga`,\n * `vela`, `arya`, `bootstrap4`, `soho`, `viva`, `nano`, `mira`, `fluent-light`, `tailwind-light`) are\n * not carried over. Renaming a Lara onto `soho-dark` would have kept the catalog's length at the cost\n * of its honesty.\n */\nexport const themePresets: ThemePreset[] = [\n {\n name: 'aura-light-blue',\n description: 'Aura, the flagship PrimeReact 11 design language, in light on a blue accent.',\n family: PrimeReactThemeFamily.Aura,\n primaryColor: 'blue',\n isDark: false,\n tokens: {\n 'primary.color': '#3b82f6',\n 'primary.contrastColor': '#ffffff',\n 'surface.background': '#f8fafc',\n 'surface.card': '#ffffff',\n 'surface.border': '#e2e8f0',\n 'surface.hover': '#f1f5f9',\n 'surface.overlay': '#ffffff',\n 'text.color': '#334155',\n 'text.mutedColor': '#64748b',\n 'highlight.background': '#eff6ff',\n 'highlight.color': '#1d4ed8',\n 'content.borderRadius': '6px',\n 'focus.ring': 'none',\n },\n },\n {\n name: 'aura-dark-blue',\n description: 'Aura, the flagship PrimeReact 11 design language, in dark on a blue accent.',\n family: PrimeReactThemeFamily.Aura,\n primaryColor: 'blue',\n isDark: true,\n tokens: {\n 'primary.color': '#60a5fa',\n 'primary.contrastColor': '#18181b',\n 'surface.background': '#09090b',\n 'surface.card': '#18181b',\n 'surface.border': '#3f3f46',\n 'surface.hover': '#27272a',\n 'surface.overlay': '#18181b',\n 'text.color': '#ffffff',\n 'text.mutedColor': '#a1a1aa',\n 'highlight.background': 'color-mix(in srgb, #60a5fa, transparent 84%)',\n 'highlight.color': 'rgba(255,255,255,.87)',\n 'content.borderRadius': '6px',\n 'focus.ring': 'none',\n },\n },\n {\n name: 'aura-light-indigo',\n description: 'Aura, the flagship PrimeReact 11 design language, in light on an indigo accent.',\n family: PrimeReactThemeFamily.Aura,\n primaryColor: 'indigo',\n isDark: false,\n tokens: {\n 'primary.color': '#6366f1',\n 'primary.contrastColor': '#ffffff',\n 'surface.background': '#f8fafc',\n 'surface.card': '#ffffff',\n 'surface.border': '#e2e8f0',\n 'surface.hover': '#f1f5f9',\n 'surface.overlay': '#ffffff',\n 'text.color': '#334155',\n 'text.mutedColor': '#64748b',\n 'highlight.background': '#eef2ff',\n 'highlight.color': '#4338ca',\n 'content.borderRadius': '6px',\n 'focus.ring': 'none',\n },\n },\n {\n name: 'aura-dark-indigo',\n description: 'Aura, the flagship PrimeReact 11 design language, in dark on an indigo accent.',\n family: PrimeReactThemeFamily.Aura,\n primaryColor: 'indigo',\n isDark: true,\n tokens: {\n 'primary.color': '#818cf8',\n 'primary.contrastColor': '#18181b',\n 'surface.background': '#09090b',\n 'surface.card': '#18181b',\n 'surface.border': '#3f3f46',\n 'surface.hover': '#27272a',\n 'surface.overlay': '#18181b',\n 'text.color': '#ffffff',\n 'text.mutedColor': '#a1a1aa',\n 'highlight.background': 'color-mix(in srgb, #818cf8, transparent 84%)',\n 'highlight.color': 'rgba(255,255,255,.87)',\n 'content.borderRadius': '6px',\n 'focus.ring': 'none',\n },\n },\n {\n name: 'aura-light-purple',\n description: 'Aura, the flagship PrimeReact 11 design language, in light on a purple accent.',\n family: PrimeReactThemeFamily.Aura,\n primaryColor: 'purple',\n isDark: false,\n tokens: {\n 'primary.color': '#a855f7',\n 'primary.contrastColor': '#ffffff',\n 'surface.background': '#f8fafc',\n 'surface.card': '#ffffff',\n 'surface.border': '#e2e8f0',\n 'surface.hover': '#f1f5f9',\n 'surface.overlay': '#ffffff',\n 'text.color': '#334155',\n 'text.mutedColor': '#64748b',\n 'highlight.background': '#faf5ff',\n 'highlight.color': '#7e22ce',\n 'content.borderRadius': '6px',\n 'focus.ring': 'none',\n },\n },\n {\n name: 'aura-dark-purple',\n description: 'Aura, the flagship PrimeReact 11 design language, in dark on a purple accent.',\n family: PrimeReactThemeFamily.Aura,\n primaryColor: 'purple',\n isDark: true,\n tokens: {\n 'primary.color': '#c084fc',\n 'primary.contrastColor': '#18181b',\n 'surface.background': '#09090b',\n 'surface.card': '#18181b',\n 'surface.border': '#3f3f46',\n 'surface.hover': '#27272a',\n 'surface.overlay': '#18181b',\n 'text.color': '#ffffff',\n 'text.mutedColor': '#a1a1aa',\n 'highlight.background': 'color-mix(in srgb, #c084fc, transparent 84%)',\n 'highlight.color': 'rgba(255,255,255,.87)',\n 'content.borderRadius': '6px',\n 'focus.ring': 'none',\n },\n },\n {\n name: 'aura-light-teal',\n description: 'Aura, the flagship PrimeReact 11 design language, in light on a teal accent.',\n family: PrimeReactThemeFamily.Aura,\n primaryColor: 'teal',\n isDark: false,\n tokens: {\n 'primary.color': '#14b8a6',\n 'primary.contrastColor': '#ffffff',\n 'surface.background': '#f8fafc',\n 'surface.card': '#ffffff',\n 'surface.border': '#e2e8f0',\n 'surface.hover': '#f1f5f9',\n 'surface.overlay': '#ffffff',\n 'text.color': '#334155',\n 'text.mutedColor': '#64748b',\n 'highlight.background': '#f0fdfa',\n 'highlight.color': '#0f766e',\n 'content.borderRadius': '6px',\n 'focus.ring': 'none',\n },\n },\n {\n name: 'aura-dark-teal',\n description: 'Aura, the flagship PrimeReact 11 design language, in dark on a teal accent.',\n family: PrimeReactThemeFamily.Aura,\n primaryColor: 'teal',\n isDark: true,\n tokens: {\n 'primary.color': '#2dd4bf',\n 'primary.contrastColor': '#18181b',\n 'surface.background': '#09090b',\n 'surface.card': '#18181b',\n 'surface.border': '#3f3f46',\n 'surface.hover': '#27272a',\n 'surface.overlay': '#18181b',\n 'text.color': '#ffffff',\n 'text.mutedColor': '#a1a1aa',\n 'highlight.background': 'color-mix(in srgb, #2dd4bf, transparent 84%)',\n 'highlight.color': 'rgba(255,255,255,.87)',\n 'content.borderRadius': '6px',\n 'focus.ring': 'none',\n },\n },\n {\n name: 'lara-light-blue',\n description: 'Lara, the roomy family Scene shipped on PrimeReact 10, in light on a blue accent.',\n family: PrimeReactThemeFamily.Lara,\n primaryColor: 'blue',\n isDark: false,\n tokens: {\n 'primary.color': '#3b82f6',\n 'primary.contrastColor': '#ffffff',\n 'surface.background': '#f8fafc',\n 'surface.card': '#ffffff',\n 'surface.border': '#e2e8f0',\n 'surface.hover': '#f1f5f9',\n 'surface.overlay': '#ffffff',\n 'text.color': '#334155',\n 'text.mutedColor': '#64748b',\n 'highlight.background': '#eff6ff',\n 'highlight.color': '#1d4ed8',\n 'content.borderRadius': '6px',\n 'focus.ring': '0 0 0 0.2rem #bfdbfe',\n },\n },\n {\n name: 'lara-dark-blue',\n description: 'Lara, the roomy family Scene shipped on PrimeReact 10, in dark on a blue accent.',\n family: PrimeReactThemeFamily.Lara,\n primaryColor: 'blue',\n isDark: true,\n tokens: {\n 'primary.color': '#60a5fa',\n 'primary.contrastColor': '#18181b',\n 'surface.background': '#09090b',\n 'surface.card': '#18181b',\n 'surface.border': '#3f3f46',\n 'surface.hover': '#27272a',\n 'surface.overlay': '#18181b',\n 'text.color': '#ffffff',\n 'text.mutedColor': '#a1a1aa',\n 'highlight.background': 'color-mix(in srgb, #60a5fa, transparent 84%)',\n 'highlight.color': 'rgba(255,255,255,.87)',\n 'content.borderRadius': '6px',\n 'focus.ring': '0 0 0 0.2rem color-mix(in srgb, #60a5fa, transparent 80%)',\n },\n },\n {\n name: 'lara-light-indigo',\n description: 'Lara, the roomy family Scene shipped on PrimeReact 10, in light on an indigo accent.',\n family: PrimeReactThemeFamily.Lara,\n primaryColor: 'indigo',\n isDark: false,\n tokens: {\n 'primary.color': '#6366f1',\n 'primary.contrastColor': '#ffffff',\n 'surface.background': '#f8fafc',\n 'surface.card': '#ffffff',\n 'surface.border': '#e2e8f0',\n 'surface.hover': '#f1f5f9',\n 'surface.overlay': '#ffffff',\n 'text.color': '#334155',\n 'text.mutedColor': '#64748b',\n 'highlight.background': '#eef2ff',\n 'highlight.color': '#4338ca',\n 'content.borderRadius': '6px',\n 'focus.ring': '0 0 0 0.2rem #c7d2fe',\n },\n },\n {\n name: 'lara-dark-indigo',\n description: 'Lara, the roomy family Scene shipped on PrimeReact 10, in dark on an indigo accent.',\n family: PrimeReactThemeFamily.Lara,\n primaryColor: 'indigo',\n isDark: true,\n tokens: {\n 'primary.color': '#818cf8',\n 'primary.contrastColor': '#18181b',\n 'surface.background': '#09090b',\n 'surface.card': '#18181b',\n 'surface.border': '#3f3f46',\n 'surface.hover': '#27272a',\n 'surface.overlay': '#18181b',\n 'text.color': '#ffffff',\n 'text.mutedColor': '#a1a1aa',\n 'highlight.background': 'color-mix(in srgb, #818cf8, transparent 84%)',\n 'highlight.color': 'rgba(255,255,255,.87)',\n 'content.borderRadius': '6px',\n 'focus.ring': '0 0 0 0.2rem color-mix(in srgb, #818cf8, transparent 80%)',\n },\n },\n {\n name: 'lara-light-purple',\n description: 'Lara, the roomy family Scene shipped on PrimeReact 10, in light on a purple accent.',\n family: PrimeReactThemeFamily.Lara,\n primaryColor: 'purple',\n isDark: false,\n tokens: {\n 'primary.color': '#a855f7',\n 'primary.contrastColor': '#ffffff',\n 'surface.background': '#f8fafc',\n 'surface.card': '#ffffff',\n 'surface.border': '#e2e8f0',\n 'surface.hover': '#f1f5f9',\n 'surface.overlay': '#ffffff',\n 'text.color': '#334155',\n 'text.mutedColor': '#64748b',\n 'highlight.background': '#faf5ff',\n 'highlight.color': '#7e22ce',\n 'content.borderRadius': '6px',\n 'focus.ring': '0 0 0 0.2rem #e9d5ff',\n },\n },\n {\n name: 'lara-dark-purple',\n description: 'Lara, the roomy family Scene shipped on PrimeReact 10, in dark on a purple accent.',\n family: PrimeReactThemeFamily.Lara,\n primaryColor: 'purple',\n isDark: true,\n tokens: {\n 'primary.color': '#c084fc',\n 'primary.contrastColor': '#18181b',\n 'surface.background': '#09090b',\n 'surface.card': '#18181b',\n 'surface.border': '#3f3f46',\n 'surface.hover': '#27272a',\n 'surface.overlay': '#18181b',\n 'text.color': '#ffffff',\n 'text.mutedColor': '#a1a1aa',\n 'highlight.background': 'color-mix(in srgb, #c084fc, transparent 84%)',\n 'highlight.color': 'rgba(255,255,255,.87)',\n 'content.borderRadius': '6px',\n 'focus.ring': '0 0 0 0.2rem color-mix(in srgb, #c084fc, transparent 80%)',\n },\n },\n {\n name: 'lara-light-teal',\n description: 'Lara, the roomy family Scene shipped on PrimeReact 10, in light on a teal accent.',\n family: PrimeReactThemeFamily.Lara,\n primaryColor: 'teal',\n isDark: false,\n tokens: {\n 'primary.color': '#14b8a6',\n 'primary.contrastColor': '#ffffff',\n 'surface.background': '#f8fafc',\n 'surface.card': '#ffffff',\n 'surface.border': '#e2e8f0',\n 'surface.hover': '#f1f5f9',\n 'surface.overlay': '#ffffff',\n 'text.color': '#334155',\n 'text.mutedColor': '#64748b',\n 'highlight.background': '#f0fdfa',\n 'highlight.color': '#0f766e',\n 'content.borderRadius': '6px',\n 'focus.ring': '0 0 0 0.2rem #99f6e4',\n },\n },\n {\n name: 'lara-dark-teal',\n description: 'Lara, the roomy family Scene shipped on PrimeReact 10, in dark on a teal accent.',\n family: PrimeReactThemeFamily.Lara,\n primaryColor: 'teal',\n isDark: true,\n tokens: {\n 'primary.color': '#2dd4bf',\n 'primary.contrastColor': '#18181b',\n 'surface.background': '#09090b',\n 'surface.card': '#18181b',\n 'surface.border': '#3f3f46',\n 'surface.hover': '#27272a',\n 'surface.overlay': '#18181b',\n 'text.color': '#ffffff',\n 'text.mutedColor': '#a1a1aa',\n 'highlight.background': 'color-mix(in srgb, #2dd4bf, transparent 84%)',\n 'highlight.color': 'rgba(255,255,255,.87)',\n 'content.borderRadius': '6px',\n 'focus.ring': '0 0 0 0.2rem color-mix(in srgb, #2dd4bf, transparent 80%)',\n },\n },\n {\n name: 'nora-light-blue',\n description: 'Nora, a tighter, squarer, more compact family, in light on a blue accent.',\n family: PrimeReactThemeFamily.Nora,\n primaryColor: 'blue',\n isDark: false,\n tokens: {\n 'primary.color': '#2563eb',\n 'primary.contrastColor': '#ffffff',\n 'surface.background': '#f8fafc',\n 'surface.card': '#ffffff',\n 'surface.border': '#94a3b8',\n 'surface.hover': '#e2e8f0',\n 'surface.overlay': '#ffffff',\n 'text.color': '#0f172a',\n 'text.mutedColor': '#475569',\n 'highlight.background': '#2563eb',\n 'highlight.color': '#ffffff',\n 'content.borderRadius': '2px',\n 'focus.ring': 'none',\n },\n },\n {\n name: 'nora-dark-blue',\n description: 'Nora, a tighter, squarer, more compact family, in dark on a blue accent.',\n family: PrimeReactThemeFamily.Nora,\n primaryColor: 'blue',\n isDark: true,\n tokens: {\n 'primary.color': '#3b82f6',\n 'primary.contrastColor': '#09090b',\n 'surface.background': '#09090b',\n 'surface.card': '#18181b',\n 'surface.border': '#71717a',\n 'surface.hover': '#3f3f46',\n 'surface.overlay': '#18181b',\n 'text.color': '#ffffff',\n 'text.mutedColor': '#a1a1aa',\n 'highlight.background': '#3b82f6',\n 'highlight.color': '#09090b',\n 'content.borderRadius': '2px',\n 'focus.ring': 'none',\n },\n },\n {\n name: 'nora-light-indigo',\n description: 'Nora, a tighter, squarer, more compact family, in light on an indigo accent.',\n family: PrimeReactThemeFamily.Nora,\n primaryColor: 'indigo',\n isDark: false,\n tokens: {\n 'primary.color': '#4f46e5',\n 'primary.contrastColor': '#ffffff',\n 'surface.background': '#f8fafc',\n 'surface.card': '#ffffff',\n 'surface.border': '#94a3b8',\n 'surface.hover': '#e2e8f0',\n 'surface.overlay': '#ffffff',\n 'text.color': '#0f172a',\n 'text.mutedColor': '#475569',\n 'highlight.background': '#4f46e5',\n 'highlight.color': '#ffffff',\n 'content.borderRadius': '2px',\n 'focus.ring': 'none',\n },\n },\n {\n name: 'nora-dark-indigo',\n description: 'Nora, a tighter, squarer, more compact family, in dark on an indigo accent.',\n family: PrimeReactThemeFamily.Nora,\n primaryColor: 'indigo',\n isDark: true,\n tokens: {\n 'primary.color': '#6366f1',\n 'primary.contrastColor': '#09090b',\n 'surface.background': '#09090b',\n 'surface.card': '#18181b',\n 'surface.border': '#71717a',\n 'surface.hover': '#3f3f46',\n 'surface.overlay': '#18181b',\n 'text.color': '#ffffff',\n 'text.mutedColor': '#a1a1aa',\n 'highlight.background': '#6366f1',\n 'highlight.color': '#09090b',\n 'content.borderRadius': '2px',\n 'focus.ring': 'none',\n },\n },\n {\n name: 'material-light-indigo',\n description: 'Material, the PrimeTek reading of Material Design, in light on an indigo accent.',\n family: PrimeReactThemeFamily.Material,\n primaryColor: 'indigo',\n isDark: false,\n tokens: {\n 'primary.color': '#3F51B5',\n 'primary.contrastColor': '#ffffff',\n 'surface.background': '#f8fafc',\n 'surface.card': '#ffffff',\n 'surface.border': '#cbd5e1',\n 'surface.hover': '#f1f5f9',\n 'surface.overlay': '#ffffff',\n 'text.color': '#0f172a',\n 'text.mutedColor': '#475569',\n 'highlight.background': 'color-mix(in srgb, #3F51B5, transparent 88%)',\n 'highlight.color': '#303F9F',\n 'content.borderRadius': '4px',\n 'focus.ring': '0 0 1px 4px #e2e8f0',\n },\n },\n {\n name: 'material-dark-indigo',\n description: 'Material, the PrimeTek reading of Material Design, in dark on an indigo accent.',\n family: PrimeReactThemeFamily.Material,\n primaryColor: 'indigo',\n isDark: true,\n tokens: {\n 'primary.color': '#5C6BC0',\n 'primary.contrastColor': '#18181b',\n 'surface.background': '#09090b',\n 'surface.card': '#18181b',\n 'surface.border': '#3f3f46',\n 'surface.hover': '#27272a',\n 'surface.overlay': '#18181b',\n 'text.color': '#ffffff',\n 'text.mutedColor': '#a1a1aa',\n 'highlight.background': 'color-mix(in srgb, #5C6BC0, transparent 84%)',\n 'highlight.color': 'rgba(255,255,255,.87)',\n 'content.borderRadius': '4px',\n 'focus.ring': '0 0 1px 4px #3f3f46',\n },\n },\n {\n name: 'material-light-purple',\n description: 'Material, the PrimeTek reading of Material Design, in light on a purple accent.',\n family: PrimeReactThemeFamily.Material,\n primaryColor: 'purple',\n isDark: false,\n tokens: {\n 'primary.color': '#9C27B0',\n 'primary.contrastColor': '#ffffff',\n 'surface.background': '#f8fafc',\n 'surface.card': '#ffffff',\n 'surface.border': '#cbd5e1',\n 'surface.hover': '#f1f5f9',\n 'surface.overlay': '#ffffff',\n 'text.color': '#0f172a',\n 'text.mutedColor': '#475569',\n 'highlight.background': 'color-mix(in srgb, #9C27B0, transparent 88%)',\n 'highlight.color': '#7B1FA2',\n 'content.borderRadius': '4px',\n 'focus.ring': '0 0 1px 4px #e2e8f0',\n },\n },\n {\n name: 'material-dark-purple',\n description: 'Material, the PrimeTek reading of Material Design, in dark on a purple accent.',\n family: PrimeReactThemeFamily.Material,\n primaryColor: 'purple',\n isDark: true,\n tokens: {\n 'primary.color': '#AB47BC',\n 'primary.contrastColor': '#18181b',\n 'surface.background': '#09090b',\n 'surface.card': '#18181b',\n 'surface.border': '#3f3f46',\n 'surface.hover': '#27272a',\n 'surface.overlay': '#18181b',\n 'text.color': '#ffffff',\n 'text.mutedColor': '#a1a1aa',\n 'highlight.background': 'color-mix(in srgb, #AB47BC, transparent 84%)',\n 'highlight.color': 'rgba(255,255,255,.87)',\n 'content.borderRadius': '4px',\n 'focus.ring': '0 0 1px 4px #3f3f46',\n },\n },\n];\n"],"names":["themePresets","name","description","family","PrimeReactThemeFamily","Aura","primaryColor","isDark","tokens","Lara","Nora","Material"],"mappings":";;;;AAAA;AACA;AA4BA;;;;;;;;;;;;;;;;;;;;UAqBaA,Y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,IAAA;QACRC,MAAAA,EAAQ;YACJ,eAAA,EAAiB,SAAA;YACjB,uBAAA,EAAyB,SAAA;YACzB,oBAAA,EAAsB,SAAA;YACtB,cAAA,EAAgB,SAAA;YAChB,gBAAA,EAAkB,SAAA;YAClB,eAAA,EAAiB,SAAA;YACjB,iBAAA,EAAmB,SAAA;YACnB,YAAA,EAAc,SAAA;YACd,iBAAA,EAAmB,SAAA;YACnB,sBAAA,EAAwB,8CAAA;YACxB,iBAAA,EAAmB,uBAAA;YACnB,sBAAA,EAAwB,KAAA;YACxB,YAAA,EAAc;AAClB;AACJ;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePrimeReactTheme.js","sources":["../../../theme/usePrimeReactTheme.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useMemo } from 'react';\nimport { Theme } from '@cratis/scene.model';\nimport { PrimeReactPreset, primeReactThemePreset } from './primeReactThemePreset';\n\n/**\n * The class a themed root carries when the active theme is a dark one.\n *\n * `@primeuix/themes` resolves every `light-dark()` token pair against a CSS selector rather than the\n * operating system preference, so *something* has to put that selector on the page. This is Scene's\n * choice of selector, and it is handed to the preset as `darkModeSelector` so the two can never disagree.\n */\nexport const primeReactDarkModeClass = 'scene-dark';\n\n/**\n * The shape `PrimeReactProvider` takes through its `value` prop, narrowed to the part this package sets.\n *\n * Deliberately not imported from `@primereact/core`: the provider's config type is broad and mostly about\n * concerns Scene does not own (locale, ripple, z-index, filter match modes). Naming only the theme slice\n * keeps it obvious that a Scene theme decides the preset and nothing else, and leaves an application free\n * to merge its own configuration around it.\n */\nexport interface PrimeReactThemeConfiguration {\n /**\n * The preset and the options `@primeuix/styled` needs to emit its `--p-*` custom properties.\n */\n theme: {\n /**\n * The `@primeuix/themes` preset for the active Scene theme.\n */\n preset: PrimeReactPreset;\n\n /**\n * How the preset resolves its light/dark token pairs.\n */\n options: {\n /**\n * The selector that means \"dark\" - {@link primeReactDarkModeClass}.\n */\n darkModeSelector: string;\n };\n };\n}\n\n/**\n * Resolves the active Scene {@link Theme} to the configuration `PrimeReactProvider` needs to render it.\n *\n * Theming a Scene screen takes two halves, and this is the half `SceneThemeProvider` cannot do. The\n * provider writes the theme's semantic tokens onto the wrapping element, which reaches anything reading\n * `--scene-*` - this package's own wrappers, `core`'s primitives, a layout's CSS. But PrimeReact's own\n * components read `--p-*`, and those only exist once a preset has been handed to `PrimeReactProvider`. So:\n * `SceneThemeProvider` for the Scene tokens, this hook for the PrimeReact ones.\n *\n * This replaced the PrimeReact 10 hook of the same name, and it is considerably less machinery. v10\n * themes were compiled stylesheets, so switching meant locating a `<link>`, rewriting one path segment of\n * its URL, and swapping in a replacement element because some browsers will not re-fetch a mutated\n * `href`. None of that survives: a v11 preset is a plain object, so switching is re-rendering a provider\n * with a different value. Nothing is fetched, nothing flashes unstyled, and a theme cannot 404.\n *\n * Use them together:\n *\n * ```tsx\n * const [theme, setTheme] = useState(primeReactTheme('lara-light-blue'));\n * const configuration = usePrimeReactTheme(theme);\n *\n * return (\n * <PrimeReactProvider value={configuration}>\n * <SceneThemeProvider theme={theme}>{children}</SceneThemeProvider>\n * </PrimeReactProvider>\n * );\n * ```\n *\n * @param theme The active theme. A theme this package does not ship - or `undefined` - yields `undefined`\n * rather than a default preset, so a profile mixing in a theme from another package leaves PrimeReact's\n * own styling to whoever does own it, instead of quietly overriding it with a Scene preset.\n * @returns The provider configuration, or `undefined` when this package ships no preset for the theme.\n */\nexport function usePrimeReactTheme(theme: Theme | undefined): PrimeReactThemeConfiguration | undefined {\n const themeName = theme?.name;\n\n return useMemo(() => {\n if (themeName === undefined) return undefined;\n\n const preset = primeReactThemePreset(themeName);\n if (preset === undefined) return undefined;\n\n return { theme: { preset, options: { darkModeSelector: `.${primeReactDarkModeClass}` } } };\n }, [themeName]);\n}\n"],"names":["primeReactDarkModeClass","usePrimeReactTheme","theme","themeName","name","useMemo","undefined","preset","primeReactThemePreset","options","darkModeSelector"],"mappings":";;;;;AAAA;AACA;AAMA;;;;;;IAOO,MAAMA,uBAAAA,GAA0B;AAgCvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAiCO,SAASC,kBAAAA,CAAmBC,KAAwB,EAAA;AACvD,IAAA,MAAMC,YAAYD,KAAAA,EAAOE,IAAAA;AAEzB,IAAA,OAAOC,aAAAA,CAAQ,IAAA;QACX,IAAIF,SAAAA,KAAcG,WAAW,OAAOA,SAAAA;AAEpC,QAAA,MAAMC,SAASC,2CAAAA,CAAsBL,SAAAA,CAAAA;QACrC,IAAII,MAAAA,KAAWD,WAAW,OAAOA,SAAAA;QAEjC,OAAO;YAAEJ,KAAAA,EAAO;AAAEK,gBAAAA,MAAAA;gBAAQE,OAAAA,EAAS;oBAAEC,gBAAAA,EAAkB,CAAC,CAAC,EAAEV,uBAAAA,CAAAA;AAA0B;AAAE;AAAE,SAAA;IAC7F,CAAA,EAAG;AAACG,QAAAA;AAAU,KAAA,CAAA;AAClB
|
|
1
|
+
{"version":3,"file":"usePrimeReactTheme.js","sources":["../../../theme/usePrimeReactTheme.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useMemo } from 'react';\nimport { Theme } from '@cratis/scene.model';\nimport { PrimeReactPreset, primeReactThemePreset } from './primeReactThemePreset';\n\n/**\n * The class a themed root carries when the active theme is a dark one.\n *\n * `@primeuix/themes` resolves every `light-dark()` token pair against a CSS selector rather than the\n * operating system preference, so *something* has to put that selector on the page. This is Scene's\n * choice of selector, and it is handed to the preset as `darkModeSelector` so the two can never disagree.\n */\nexport const primeReactDarkModeClass = 'scene-dark';\n\n/**\n * The shape `PrimeReactProvider` takes through its `value` prop, narrowed to the part this package sets.\n *\n * Deliberately not imported from `@primereact/core`: the provider's config type is broad and mostly about\n * concerns Scene does not own (locale, ripple, z-index, filter match modes). Naming only the theme slice\n * keeps it obvious that a Scene theme decides the preset and nothing else, and leaves an application free\n * to merge its own configuration around it.\n */\nexport interface PrimeReactThemeConfiguration {\n /**\n * The preset and the options `@primeuix/styled` needs to emit its `--p-*` custom properties.\n */\n theme: {\n /**\n * The `@primeuix/themes` preset for the active Scene theme.\n */\n preset: PrimeReactPreset;\n\n /**\n * How the preset resolves its light/dark token pairs.\n */\n options: {\n /**\n * The selector that means \"dark\" - {@link primeReactDarkModeClass}.\n */\n darkModeSelector: string;\n };\n };\n}\n\n/**\n * Resolves the active Scene {@link Theme} to the configuration `PrimeReactProvider` needs to render it.\n *\n * Theming a Scene screen takes two halves, and this is the half `SceneThemeProvider` cannot do. The\n * provider writes the theme's semantic tokens onto the wrapping element, which reaches anything reading\n * `--scene-*` - this package's own wrappers, `core`'s primitives, a layout's CSS. But PrimeReact's own\n * components read `--p-*`, and those only exist once a preset has been handed to `PrimeReactProvider`. So:\n * `SceneThemeProvider` for the Scene tokens, this hook for the PrimeReact ones.\n *\n * This replaced the PrimeReact 10 hook of the same name, and it is considerably less machinery. v10\n * themes were compiled stylesheets, so switching meant locating a `<link>`, rewriting one path segment of\n * its URL, and swapping in a replacement element because some browsers will not re-fetch a mutated\n * `href`. None of that survives: a v11 preset is a plain object, so switching is re-rendering a provider\n * with a different value. Nothing is fetched, nothing flashes unstyled, and a theme cannot 404.\n *\n * Use them together:\n *\n * ```tsx\n * const [theme, setTheme] = useState(primeReactTheme('lara-light-blue'));\n * const configuration = usePrimeReactTheme(theme);\n *\n * return (\n * <PrimeReactProvider value={configuration}>\n * <SceneThemeProvider theme={theme}>{children}</SceneThemeProvider>\n * </PrimeReactProvider>\n * );\n * ```\n *\n * @param theme The active theme. A theme this package does not ship - or `undefined` - yields `undefined`\n * rather than a default preset, so a profile mixing in a theme from another package leaves PrimeReact's\n * own styling to whoever does own it, instead of quietly overriding it with a Scene preset.\n * @returns The provider configuration, or `undefined` when this package ships no preset for the theme.\n */\nexport function usePrimeReactTheme(theme: Theme | undefined): PrimeReactThemeConfiguration | undefined {\n const themeName = theme?.name;\n\n return useMemo(() => {\n if (themeName === undefined) return undefined;\n\n const preset = primeReactThemePreset(themeName);\n if (preset === undefined) return undefined;\n\n return { theme: { preset, options: { darkModeSelector: `.${primeReactDarkModeClass}` } } };\n }, [themeName]);\n}\n"],"names":["primeReactDarkModeClass","usePrimeReactTheme","theme","themeName","name","useMemo","undefined","preset","primeReactThemePreset","options","darkModeSelector"],"mappings":";;;;;AAAA;AACA;AAMA;;;;;;IAOO,MAAMA,uBAAAA,GAA0B;AAgCvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAiCO,SAASC,kBAAAA,CAAmBC,KAAwB,EAAA;AACvD,IAAA,MAAMC,YAAYD,KAAAA,EAAOE,IAAAA;AAEzB,IAAA,OAAOC,aAAAA,CAAQ,IAAA;QACX,IAAIF,SAAAA,KAAcG,WAAW,OAAOA,SAAAA;AAEpC,QAAA,MAAMC,SAASC,2CAAAA,CAAsBL,SAAAA,CAAAA;QACrC,IAAII,MAAAA,KAAWD,WAAW,OAAOA,SAAAA;QAEjC,OAAO;YAAEJ,KAAAA,EAAO;AAAEK,gBAAAA,MAAAA;gBAAQE,OAAAA,EAAS;oBAAEC,gBAAAA,EAAkB,CAAC,CAAC,EAAEV,uBAAAA,CAAAA;AAA0B;AAAE;AAAE,SAAA;IAC7F,CAAA,EAAG;AAACG,QAAAA;AAAU,KAAA,CAAA;AAClB;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"treeNodes.js","sources":["../../treeNodes.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { TreeNode } from './TreeNode';\nimport { SceneElement } from '@cratis/scene.model';\nimport { arrayProperty } from './properties';\n\n/**\n * Turns raw authored entries into the `TreeNode` model PrimeReact's tree, tree table, tree select and\n * organization chart all share.\n *\n * A `key` is synthesized from the node's path when an author did not supply one. That is not cosmetic:\n * PrimeReact keys expansion, selection and virtual scrolling off `key`, so a tree of unkeyed nodes\n * expands the wrong rows the moment two siblings share a label. Deriving the key from the path makes it\n * unique and stable across re-renders without asking the author for anything.\n *\n * @param entries The raw entries to convert.\n * @param parentKey The key of the node these entries belong to, used to build stable child keys.\n * @returns The converted nodes, in order.\n */\nexport function toTreeNodes(entries: unknown[], parentKey = ''): TreeNode[] {\n const nodes: TreeNode[] = [];\n entries.forEach((entry, index) => {\n const path = parentKey === '' ? `${index}` : `${parentKey}-${index}`;\n if (typeof entry === 'string') {\n nodes.push({ key: path, label: entry });\n return;\n }\n\n if (typeof entry !== 'object' || entry === undefined || entry === null || Array.isArray(entry)) return;\n\n const record = entry as Record<string, unknown>;\n const node: TreeNode = { key: typeof record.key === 'string' ? record.key : path };\n if (typeof record.label === 'string') node.label = record.label;\n if (typeof record.icon === 'string') node.icon = record.icon;\n if (typeof record.className === 'string') node.className = record.className;\n if (typeof record.leaf === 'boolean') node.leaf = record.leaf;\n if (typeof record.data === 'object' && record.data !== null) node.data = record.data;\n if (Array.isArray(record.children)) node.children = toTreeNodes(record.children, node.key as string);\n nodes.push(node);\n });\n\n return nodes;\n}\n\n/**\n * Reads a tree model off a Scene element's properties.\n *\n * @param element The element whose properties to read.\n * @param name The property name holding the entries.\n * @returns The converted nodes, empty when the property is missing or is not an array.\n */\nexport function treeNodesProperty(element: SceneElement, name: string): TreeNode[] {\n return toTreeNodes(arrayProperty(element, name));\n}\n"],"names":["toTreeNodes","entries","parentKey","nodes","forEach","entry","index","path","push","key","label","undefined","Array","isArray","record","node","icon","className","leaf","data","children","treeNodesProperty","element","name","arrayProperty"],"mappings":";;;;AAAA;AACA;AAMA;;;;;;;;;;;;AAYC,IACM,SAASA,WAAAA,CAAYC,OAAkB,EAAEC,YAAY,EAAE,EAAA;AAC1D,IAAA,MAAMC,QAAoB,EAAE;IAC5BF,OAAAA,CAAQG,OAAO,CAAC,CAACC,KAAAA,EAAOC,KAAAA,GAAAA;QACpB,MAAMC,IAAAA,GAAOL,SAAAA,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GL,IAAAA,CAAKK,QAAQ,GAAGpB,WAAAA,CAAYc,MAAAA,CAAOM,QAAQ,EAAEL,KAAKN,GAAG,CAAA;AACzFN,QAAAA,KAAAA,CAAMK,IAAI,CAACO,IAAAA,CAAAA;AACf,IAAA,CAAA,CAAA;IAEA,OAAOZ,KAAAA;AACX;AAEA;;;;;;AAMC,IACM,SAASkB,iBAAAA,CAAkBC,OAAqB,EAAEC,IAAY,EAAA;IACjE,OAAOvB,WAAAA,CAAYwB,yBAAcF,OAAAA,EAASC,IAAAA,CAAAA,CAAAA;AAC9C
|
|
1
|
+
{"version":3,"file":"treeNodes.js","sources":["../../treeNodes.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { TreeNode } from './TreeNode';\nimport { SceneElement } from '@cratis/scene.model';\nimport { arrayProperty } from './properties';\n\n/**\n * Turns raw authored entries into the `TreeNode` model PrimeReact's tree, tree table, tree select and\n * organization chart all share.\n *\n * A `key` is synthesized from the node's path when an author did not supply one. That is not cosmetic:\n * PrimeReact keys expansion, selection and virtual scrolling off `key`, so a tree of unkeyed nodes\n * expands the wrong rows the moment two siblings share a label. Deriving the key from the path makes it\n * unique and stable across re-renders without asking the author for anything.\n *\n * @param entries The raw entries to convert.\n * @param parentKey The key of the node these entries belong to, used to build stable child keys.\n * @returns The converted nodes, in order.\n */\nexport function toTreeNodes(entries: unknown[], parentKey = ''): TreeNode[] {\n const nodes: TreeNode[] = [];\n entries.forEach((entry, index) => {\n const path = parentKey === '' ? `${index}` : `${parentKey}-${index}`;\n if (typeof entry === 'string') {\n nodes.push({ key: path, label: entry });\n return;\n }\n\n if (typeof entry !== 'object' || entry === undefined || entry === null || Array.isArray(entry)) return;\n\n const record = entry as Record<string, unknown>;\n const node: TreeNode = { key: typeof record.key === 'string' ? record.key : path };\n if (typeof record.label === 'string') node.label = record.label;\n if (typeof record.icon === 'string') node.icon = record.icon;\n if (typeof record.className === 'string') node.className = record.className;\n if (typeof record.leaf === 'boolean') node.leaf = record.leaf;\n if (typeof record.data === 'object' && record.data !== null) node.data = record.data;\n if (Array.isArray(record.children)) node.children = toTreeNodes(record.children, node.key as string);\n nodes.push(node);\n });\n\n return nodes;\n}\n\n/**\n * Reads a tree model off a Scene element's properties.\n *\n * @param element The element whose properties to read.\n * @param name The property name holding the entries.\n * @returns The converted nodes, empty when the property is missing or is not an array.\n */\nexport function treeNodesProperty(element: SceneElement, name: string): TreeNode[] {\n return toTreeNodes(arrayProperty(element, name));\n}\n"],"names":["toTreeNodes","entries","parentKey","nodes","forEach","entry","index","path","push","key","label","undefined","Array","isArray","record","node","icon","className","leaf","data","children","treeNodesProperty","element","name","arrayProperty"],"mappings":";;;;AAAA;AACA;AAMA;;;;;;;;;;;;AAYC,IACM,SAASA,WAAAA,CAAYC,OAAkB,EAAEC,YAAY,EAAE,EAAA;AAC1D,IAAA,MAAMC,QAAoB,EAAE;IAC5BF,OAAAA,CAAQG,OAAO,CAAC,CAACC,KAAAA,EAAOC,KAAAA,GAAAA;QACpB,MAAMC,IAAAA,GAAOL,SAAAA,KAAc,EAAA,GAAK,CAAA,EAAGI,KAAAA,CAAAA,CAAO,GAAG,CAAA,EAAGJ,SAAAA,CAAU,CAAC,EAAEI,KAAAA,CAAAA,CAAO;QACpE,IAAI,OAAOD,UAAU,QAAA,EAAU;AAC3BF,YAAAA,KAAAA,CAAMK,IAAI,CAAC;gBAAEC,GAAAA,EAAKF,IAAAA;gBAAMG,KAAAA,EAAOL;AAAM,aAAA,CAAA;AACrC,YAAA;AACJ,QAAA;QAEA,IAAI,OAAOA,KAAAA,KAAU,QAAA,IAAYA,KAAAA,KAAUM,SAAAA,IAAaN,UAAU,IAAA,IAAQO,KAAAA,CAAMC,OAAO,CAACR,KAAAA,CAAAA,EAAQ;AAEhG,QAAA,MAAMS,MAAAA,GAAST,KAAAA;AACf,QAAA,MAAMU,IAAAA,GAAiB;AAAEN,YAAAA,GAAAA,EAAK,OAAOK,MAAAA,CAAOL,GAAG,KAAK,QAAA,GAAWK,MAAAA,CAAOL,GAAG,GAAGF;AAAK,SAAA;QACjF,IAAI,OAAOO,OAAOJ,KAAK,KAAK,UAAUK,IAAAA,CAAKL,KAAK,GAAGI,MAAAA,CAAOJ,KAAK;QAC/D,IAAI,OAAOI,OAAOE,IAAI,KAAK,UAAUD,IAAAA,CAAKC,IAAI,GAAGF,MAAAA,CAAOE,IAAI;QAC5D,IAAI,OAAOF,OAAOG,SAAS,KAAK,UAAUF,IAAAA,CAAKE,SAAS,GAAGH,MAAAA,CAAOG,SAAS;QAC3E,IAAI,OAAOH,OAAOI,IAAI,KAAK,WAAWH,IAAAA,CAAKG,IAAI,GAAGJ,MAAAA,CAAOI,IAAI;AAC7D,QAAA,IAAI,OAAOJ,MAAAA,CAAOK,IAAI,KAAK,QAAA,IAAYL,MAAAA,CAAOK,IAAI,KAAK,IAAA,EAAMJ,IAAAA,CAAKI,IAAI,GAAGL,OAAOK,IAAI;AACpF,QAAA,IAAIP,KAAAA,CAAMC,OAAO,CAACC,MAAAA,CAAOM,QAAQ,CAAA,EAAGL,IAAAA,CAAKK,QAAQ,GAAGpB,WAAAA,CAAYc,MAAAA,CAAOM,QAAQ,EAAEL,KAAKN,GAAG,CAAA;AACzFN,QAAAA,KAAAA,CAAMK,IAAI,CAACO,IAAAA,CAAAA;AACf,IAAA,CAAA,CAAA;IAEA,OAAOZ,KAAAA;AACX;AAEA;;;;;;AAMC,IACM,SAASkB,iBAAAA,CAAkBC,OAAqB,EAAEC,IAAY,EAAA;IACjE,OAAOvB,WAAAA,CAAYwB,yBAAcF,OAAAA,EAASC,IAAAA,CAAAA,CAAAA;AAC9C;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrimeButton.js","sources":["../../../button/PrimeButton.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Button } from 'primereact/button';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport {booleanProperty, severityProperty, stringProperty} from '../properties';\n\n/**\n * The `PrimeReact:button` component.\n *\n * Deliberately claims the same bare name `core` already declares. A `ui profile` listing `core` and then\n * `PrimeReact` resolves `button` to this one and records that it shadowed core's - which is the whole\n * point of override priority, and the reason a screen written against the fallback vocabulary gets a real\n * themed button the moment a component library is added to the profile, with no edit to the screen.\n *\n * PrimeReact 11 reshaped the props under it, and the adapter absorbs all of it so screens do not have to.\n * `label` and `icon` are children now rather than props. The `outlined` and `text` booleans collapsed into\n * a single `variant`, which is the better model - they were never combinable - and the authored booleans\n * are still read and translated. `warning` became `warn`.\n *\n * `loading` is the one that could not simply be translated: v11 dropped it. The state still matters to a\n * screen, so it is rebuilt from parts that exist - a spinning icon in place of the button's own, the\n * button disabled so the action cannot be fired twice, and `aria-busy` so the state is announced rather\n * than only drawn. The icon is marked decorative throughout because the label already names the action.\n */\nexport function PrimeButton({ element, slots }: RegisteredComponentProps) {\n const icon = stringProperty(element, 'icon');\n const severity = severityProperty(element, 'severity');\n const loading = booleanProperty(element, 'loading', false);\n\n let variant: 'link' | 'text' | 'outlined' | undefined;\n if (booleanProperty(element, 'outlined', false)) variant = 'outlined';\n else if (booleanProperty(element, 'text', false)) variant = 'text';\n\n return (\n <Button\n data-scene-id={element.id}\n severity={severity}\n variant={variant}\n rounded={booleanProperty(element, 'rounded', false)}\n disabled={loading || booleanProperty(element, 'disabled', false)}\n aria-busy={loading}>\n {loading && <i className='pi pi-spinner pi-spin' aria-hidden='true' />}\n {!loading && icon !== undefined && <i className={icon} aria-hidden='true' />}\n {stringProperty(element, 'label')}\n {slots.content}\n </Button>\n );\n}\n"],"names":["PrimeButton","element","slots","icon","stringProperty","severity","severityProperty","loading","booleanProperty","variant","_jsxs","Button","data-scene-id","id","rounded","disabled","aria-busy","_jsx","i","className","aria-hidden","undefined","content"],"mappings":";;;;AAOA;;;;;;;;;;;;;;;;;AAiBC,IACM,SAASA,WAAA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ratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Button } from 'primereact/button';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport {booleanProperty, severityProperty, stringProperty} from '../properties';\n\n/**\n * The `PrimeReact:button` component.\n *\n * Deliberately claims the same bare name `core` already declares. A `ui profile` listing `core` and then\n * `PrimeReact` resolves `button` to this one and records that it shadowed core's - which is the whole\n * point of override priority, and the reason a screen written against the fallback vocabulary gets a real\n * themed button the moment a component library is added to the profile, with no edit to the screen.\n *\n * PrimeReact 11 reshaped the props under it, and the adapter absorbs all of it so screens do not have to.\n * `label` and `icon` are children now rather than props. The `outlined` and `text` booleans collapsed into\n * a single `variant`, which is the better model - they were never combinable - and the authored booleans\n * are still read and translated. `warning` became `warn`.\n *\n * `loading` is the one that could not simply be translated: v11 dropped it. The state still matters to a\n * screen, so it is rebuilt from parts that exist - a spinning icon in place of the button's own, the\n * button disabled so the action cannot be fired twice, and `aria-busy` so the state is announced rather\n * than only drawn. The icon is marked decorative throughout because the label already names the action.\n */\nexport function PrimeButton({ element, slots }: RegisteredComponentProps) {\n const icon = stringProperty(element, 'icon');\n const severity = severityProperty(element, 'severity');\n const loading = booleanProperty(element, 'loading', false);\n\n let variant: 'link' | 'text' | 'outlined' | undefined;\n if (booleanProperty(element, 'outlined', false)) variant = 'outlined';\n else if (booleanProperty(element, 'text', false)) variant = 'text';\n\n return (\n <Button\n data-scene-id={element.id}\n severity={severity}\n variant={variant}\n rounded={booleanProperty(element, 'rounded', false)}\n disabled={loading || booleanProperty(element, 'disabled', false)}\n aria-busy={loading}>\n {loading && <i className='pi pi-spinner pi-spin' aria-hidden='true' />}\n {!loading && icon !== undefined && <i className={icon} aria-hidden='true' />}\n {stringProperty(element, 'label')}\n {slots.content}\n </Button>\n );\n}\n"],"names":["PrimeButton","element","slots","icon","stringProperty","severity","severityProperty","loading","booleanProperty","variant","_jsxs","Button","data-scene-id","id","rounded","disabled","aria-busy","_jsx","i","className","aria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@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrimeButtonGroup.js","sources":["../../../button/PrimeButtonGroup.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ButtonGroup } from 'primereact/buttongroup';\nimport { Button } from 'primereact/button';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { optionsProperty } from '../properties';\n\n/**\n * The `PrimeReact:buttonGroup` component - buttons joined into one visually continuous control.\n *\n * ButtonGroup styles its children by position, so it needs real `Button` elements as children. Slot\n * content is therefore rendered when a screen supplies it, and otherwise the group is built from a\n * `buttons` property - which is what lets a generated screen produce a group without having to nest\n * elements it does not otherwise need.\n *\n * PrimeReact 11 left the group itself alone; the only change is in the buttons, which take their label as\n * children now rather than through a `label` prop.\n */\nexport function PrimeButtonGroup({ element, slots }: RegisteredComponentProps) {\n const buttons = optionsProperty(element, 'buttons');\n return (\n <ButtonGroup data-scene-id={element.id}>\n {slots.content?.length ? slots.content : buttons.map((button) => <Button key={button.value}>{button.label}</Button>)}\n </ButtonGroup>\n );\n}\n"],"names":["PrimeButtonGroup","element","slots","buttons","optionsProperty","_jsx","ButtonGroup","data-scene-id","id","content","length","map","button","Button","label","value"],"mappings":";;;;;AAQA;;;;;;;;;;AAUC,IACM,SAASA,gBAAAA,CAAiB,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;IACzE,MAAMC,OAAAA,GAAUC,gBAAgBH,OAAAA,EAAS,SAAA,CAAA;AACzC,IAAA,qBACII,GAAA,CAACC,WAAAA,EAAAA;AAAYC,QAAAA,eAAAA,EAAeN,QAAQO,EAAE;kBACjCN,KAAAA,CAAMO,OAAO,EAAEC,MAAAA,GAASR,KAAAA,CAAMO,OAAO,GAAGN,OAAAA,CAAQQ,GAAG,CAAC,CAACC,MAAAA,iBAAWP,GAAA,CAACQ,MAAAA,EAAAA;AAA2BD,gBAAAA,QAAAA,EAAAA,MAAAA,CAAOE;AAAtBF,aAAAA,EAAAA,MAAAA,CAAOG,KAAK,CAAA;;AAGtG
|
|
1
|
+
{"version":3,"file":"PrimeButtonGroup.js","sources":["../../../button/PrimeButtonGroup.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ButtonGroup } from 'primereact/buttongroup';\nimport { Button } from 'primereact/button';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { optionsProperty } from '../properties';\n\n/**\n * The `PrimeReact:buttonGroup` component - buttons joined into one visually continuous control.\n *\n * ButtonGroup styles its children by position, so it needs real `Button` elements as children. Slot\n * content is therefore rendered when a screen supplies it, and otherwise the group is built from a\n * `buttons` property - which is what lets a generated screen produce a group without having to nest\n * elements it does not otherwise need.\n *\n * PrimeReact 11 left the group itself alone; the only change is in the buttons, which take their label as\n * children now rather than through a `label` prop.\n */\nexport function PrimeButtonGroup({ element, slots }: RegisteredComponentProps) {\n const buttons = optionsProperty(element, 'buttons');\n return (\n <ButtonGroup data-scene-id={element.id}>\n {slots.content?.length ? slots.content : buttons.map((button) => <Button key={button.value}>{button.label}</Button>)}\n </ButtonGroup>\n );\n}\n"],"names":["PrimeButtonGroup","element","slots","buttons","optionsProperty","_jsx","ButtonGroup","data-scene-id","id","content","length","map","button","Button","label","value"],"mappings":";;;;;AAQA;;;;;;;;;;AAUC,IACM,SAASA,gBAAAA,CAAiB,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;IACzE,MAAMC,OAAAA,GAAUC,gBAAgBH,OAAAA,EAAS,SAAA,CAAA;AACzC,IAAA,qBACII,GAAA,CAACC,WAAAA,EAAAA;AAAYC,QAAAA,eAAAA,EAAeN,QAAQO,EAAE;kBACjCN,KAAAA,CAAMO,OAAO,EAAEC,MAAAA,GAASR,KAAAA,CAAMO,OAAO,GAAGN,OAAAA,CAAQQ,GAAG,CAAC,CAACC,MAAAA,iBAAWP,GAAA,CAACQ,MAAAA,EAAAA;AAA2BD,gBAAAA,QAAAA,EAAAA,MAAAA,CAAOE;AAAtBF,aAAAA,EAAAA,MAAAA,CAAOG,KAAK,CAAA;;AAGtG;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrimeSpeedDial.js","sources":["../../../button/PrimeSpeedDial.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { SpeedDial } from 'primereact/speeddial';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { stringProperty } from '../properties';\nimport { menuItemsProperty } from '../menuItems';\n\n/**\n * The `PrimeReact:speedDial` component - a floating action button that fans its actions out on hover.\n *\n * Rendered inside a sized, relatively positioned box because SpeedDial positions its actions absolutely\n * against its nearest positioned ancestor; dropped straight into a Scene tree it would otherwise anchor\n * itself to the page and float over unrelated content.\n *\n * PrimeReact 11 replaced the `model` prop with parts, so the items are written out here. That is more\n * lines but a better fit: each action is a real button the adapter can name and label, where v10's model\n * entries produced icon-only buttons with no accessible name unless the screen happened to think of one.\n * The label is used as the accessible name and as the tooltip, and the icon is marked decorative, so an\n * action reads the same to a screen reader as it does to a pointer.\n */\nexport function PrimeSpeedDial({ element }: RegisteredComponentProps) {\n const items = menuItemsProperty(element, 'items');\n return (\n <div data-scene-id={element.id} className='relative h-40 w-40'>\n <SpeedDial.Root\n direction={stringProperty(element, 'direction', 'up') as 'up' | 'down' | 'left' | 'right'}\n type={stringProperty(element, 'type', 'linear') as 'linear' | 'circle' | 'semi-circle' | 'quarter-circle'}>\n <SpeedDial.Trigger aria-label='Actions'>\n <i className='pi pi-plus' aria-hidden='true' />\n </SpeedDial.Trigger>\n <SpeedDial.List>\n {items.map((item, index) => (\n <SpeedDial.Item key={index} index={index}>\n <SpeedDial.Action aria-label={item.label} title={item.label} onClick={item.command}>\n <i className={item.icon ?? 'pi pi-circle'} aria-hidden='true' />\n </SpeedDial.Action>\n </SpeedDial.Item>\n ))}\n </SpeedDial.List>\n </SpeedDial.Root>\n </div>\n );\n}\n"],"names":["PrimeSpeedDial","element","items","menuItemsProperty","_jsx","div","data-scene-id","id","className","_jsxs","SpeedDial","Root","direction","stringProperty","type","Trigger","aria-label","i","aria-hidden","List","map","item","index","Item","Action","label","title","onClick","command","icon"],"mappings":";;;;;AAQA;;;;;;;;;;;;AAYC,IACM,SAASA,cAAAA,CAAe,EAAEC,OAAO,EAA4B,EAAA;IAChE,MAAMC,KAAAA,GAAQC,kBAAkBF,OAAAA,EAAS,OAAA,CAAA;AACzC,IAAA,qBACIG,GAAA,CAACC,KAAAA,EAAAA;AAAIC,QAAAA,eAAAA,EAAeL,QAAQM,EAAE;QAAEC,SAAAA,EAAU,oBAAA;gCACtCC,IAAA,CAACC,UAAUC,IAAI,EAAA;YACXC,SAAAA,EAAWC,cAAAA,CAAeZ,SAAS,WAAA,EAAa,IAAA,CAAA;YAChDa,IAAAA,EAAMD,cAAAA,CAAeZ,SAAS,MAAA,EAAQ,QAAA,CAAA;;AACtC,8BAAAG,GAAA,CAACM,UAAUK,OAAO,EAAA;oBAACC,YAAAA,EAAW,SAAA;AAC1B,oBAAA,QAAA,gBAAAZ,GAAA,CAACa,GAAAA,EAAAA;wBAAET,SAAAA,EAAU,YAAA;wBAAaU,aAAAA,EAAY;;;AAE1C,8BAAAd,GAAA,CAACM,UAAUS,IAAI,EAAA;AACVjB,oBAAAA,QAAAA,EAAAA,KAAAA,CAAMkB,GAAG,CAAC,CAACC,MAAMC,KAAAA,iBACdlB,GAAA,CAACM,UAAUa,IAAI,EAAA;4BAAaD,KAAAA,EAAOA,KAAAA;oDAC/BlB,GAAA,CAACM,UAAUc,MAAM,EAAA;AAACR,gCAAAA,YAAAA,EAAYK,KAAKI,KAAK;AAAEC,gCAAAA,KAAAA,EAAOL,KAAKI,KAAK;AAAEE,gCAAAA,OAAAA,EAASN,KAAKO,OAAO;AAC9E,gCAAA,QAAA,gBAAAxB,GAAA,CAACa,GAAAA,EAAAA;oCAAET,SAAAA,EAAWa,IAAAA,CAAKQ,IAAI,IAAI,cAAA;oCAAgBX,aAAAA,EAAY;;;AAF1CI,yBAAAA,EAAAA,KAAAA,CAAAA;;;;;AAU7C
|
|
1
|
+
{"version":3,"file":"PrimeSpeedDial.js","sources":["../../../button/PrimeSpeedDial.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { SpeedDial } from 'primereact/speeddial';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { stringProperty } from '../properties';\nimport { menuItemsProperty } from '../menuItems';\n\n/**\n * The `PrimeReact:speedDial` component - a floating action button that fans its actions out on hover.\n *\n * Rendered inside a sized, relatively positioned box because SpeedDial positions its actions absolutely\n * against its nearest positioned ancestor; dropped straight into a Scene tree it would otherwise anchor\n * itself to the page and float over unrelated content.\n *\n * PrimeReact 11 replaced the `model` prop with parts, so the items are written out here. That is more\n * lines but a better fit: each action is a real button the adapter can name and label, where v10's model\n * entries produced icon-only buttons with no accessible name unless the screen happened to think of one.\n * The label is used as the accessible name and as the tooltip, and the icon is marked decorative, so an\n * action reads the same to a screen reader as it does to a pointer.\n */\nexport function PrimeSpeedDial({ element }: RegisteredComponentProps) {\n const items = menuItemsProperty(element, 'items');\n return (\n <div data-scene-id={element.id} className='relative h-40 w-40'>\n <SpeedDial.Root\n direction={stringProperty(element, 'direction', 'up') as 'up' | 'down' | 'left' | 'right'}\n type={stringProperty(element, 'type', 'linear') as 'linear' | 'circle' | 'semi-circle' | 'quarter-circle'}>\n <SpeedDial.Trigger aria-label='Actions'>\n <i className='pi pi-plus' aria-hidden='true' />\n </SpeedDial.Trigger>\n <SpeedDial.List>\n {items.map((item, index) => (\n <SpeedDial.Item key={index} index={index}>\n <SpeedDial.Action aria-label={item.label} title={item.label} onClick={item.command}>\n <i className={item.icon ?? 'pi pi-circle'} aria-hidden='true' />\n </SpeedDial.Action>\n </SpeedDial.Item>\n ))}\n </SpeedDial.List>\n </SpeedDial.Root>\n </div>\n );\n}\n"],"names":["PrimeSpeedDial","element","items","menuItemsProperty","_jsx","div","data-scene-id","id","className","_jsxs","SpeedDial","Root","direction","stringProperty","type","Trigger","aria-label","i","aria-hidden","List","map","item","index","Item","Action","label","title","onClick","command","icon"],"mappings":";;;;;AAQA;;;;;;;;;;;;AAYC,IACM,SAASA,cAAAA,CAAe,EAAEC,OAAO,EAA4B,EAAA;IAChE,MAAMC,KAAAA,GAAQC,kBAAkBF,OAAAA,EAAS,OAAA,CAAA;AACzC,IAAA,qBACIG,GAAA,CAACC,KAAAA,EAAAA;AAAIC,QAAAA,eAAAA,EAAeL,QAAQM,EAAE;QAAEC,SAAAA,EAAU,oBAAA;gCACtCC,IAAA,CAACC,UAAUC,IAAI,EAAA;YACXC,SAAAA,EAAWC,cAAAA,CAAeZ,SAAS,WAAA,EAAa,IAAA,CAAA;YAChDa,IAAAA,EAAMD,cAAAA,CAAeZ,SAAS,MAAA,EAAQ,QAAA,CAAA;;AACtC,8BAAAG,GAAA,CAACM,UAAUK,OAAO,EAAA;oBAACC,YAAAA,EAAW,SAAA;AAC1B,oBAAA,QAAA,gBAAAZ,GAAA,CAACa,GAAAA,EAAAA;wBAAET,SAAAA,EAAU,YAAA;wBAAaU,aAAAA,EAAY;;;AAE1C,8BAAAd,GAAA,CAACM,UAAUS,IAAI,EAAA;AACVjB,oBAAAA,QAAAA,EAAAA,KAAAA,CAAMkB,GAAG,CAAC,CAACC,MAAMC,KAAAA,iBACdlB,GAAA,CAACM,UAAUa,IAAI,EAAA;4BAAaD,KAAAA,EAAOA,KAAAA;oDAC/BlB,GAAA,CAACM,UAAUc,MAAM,EAAA;AAACR,gCAAAA,YAAAA,EAAYK,KAAKI,KAAK;AAAEC,gCAAAA,KAAAA,EAAOL,KAAKI,KAAK;AAAEE,gCAAAA,OAAAA,EAASN,KAAKO,OAAO;AAC9E,gCAAA,QAAA,gBAAAxB,GAAA,CAACa,GAAAA,EAAAA;oCAAET,SAAAA,EAAWa,IAAAA,CAAKQ,IAAI,IAAI,cAAA;oCAAgBX,aAAAA,EAAY;;;AAF1CI,yBAAAA,EAAAA,KAAAA,CAAAA;;;;;AAU7C;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrimeSplitButton.js","sources":["../../../button/PrimeSplitButton.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { SplitButton } from './SplitButton';\nimport { booleanProperty, stringProperty } from '../properties';\nimport { menuItemsProperty } from '../menuItems';\n\n/**\n * The `PrimeReact:splitButton` component - a primary action with a dropdown of related ones.\n *\n * PrimeReact 11 removed `SplitButton` with no replacement and no headless hook, so the adapter renders\n * Cratis's own {@link SplitButton}, itself composed from the `Button` and `Popover` that survived. Nothing\n * about the element's contract changed, which is the whole point of having an adapter layer at all.\n *\n * The secondary actions come from an `items` property rather than from slots, because they are data - a\n * list of labels and icons - and feeding a menu rendered React nodes would give it nothing to show in its\n * rows. `menuItemsProperty` is the same reader every other menu in this package uses, so a screen writes\n * items the same way here as it does for a menubar.\n */\nexport function PrimeSplitButton({ element }: RegisteredComponentProps) {\n return (\n <SplitButton\n data-scene-id={element.id}\n label={stringProperty(element, 'label')}\n icon={stringProperty(element, 'icon')}\n severity={stringProperty(element, 'severity')}\n items={menuItemsProperty(element, 'items')}\n disabled={booleanProperty(element, 'disabled', false)}\n />\n );\n}\n"],"names":["PrimeSplitButton","element","_jsx","SplitButton","data-scene-id","id","label","stringProperty","icon","severity","items","menuItemsProperty","disabled","booleanProperty"],"mappings":";;;;;AAAA;AACA;AAOA;;;;;;;;;;;AAWC,IACM,SAASA,gBAAAA,CAAiB,EAAEC,OAAO,EAA4B,EAAA;AAClE,IAAA,qBACIC,GAAA,CAACC,WAAAA,EAAAA;AACGC,QAAAA,eAAAA,EAAeH,QAAQI,EAAE;AACzBC,QAAAA,KAAAA,EAAOC,eAAeN,OAAAA,EAAS,OAAA,CAAA;AAC/BO,QAAAA,IAAAA,EAAMD,eAAeN,OAAAA,EAAS,MAAA,CAAA;AAC9BQ,QAAAA,QAAAA,EAAUF,eAAeN,OAAAA,EAAS,UAAA,CAAA;AAClCS,QAAAA,KAAAA,EAAOC,kBAAkBV,OAAAA,EAAS,OAAA,CAAA;QAClCW,QAAAA,EAAUC,eAAAA,CAAgBZ,SAAS,UAAA,EAAY,KAAA;;AAG3D
|
|
1
|
+
{"version":3,"file":"PrimeSplitButton.js","sources":["../../../button/PrimeSplitButton.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { SplitButton } from './SplitButton';\nimport { booleanProperty, stringProperty } from '../properties';\nimport { menuItemsProperty } from '../menuItems';\n\n/**\n * The `PrimeReact:splitButton` component - a primary action with a dropdown of related ones.\n *\n * PrimeReact 11 removed `SplitButton` with no replacement and no headless hook, so the adapter renders\n * Cratis's own {@link SplitButton}, itself composed from the `Button` and `Popover` that survived. Nothing\n * about the element's contract changed, which is the whole point of having an adapter layer at all.\n *\n * The secondary actions come from an `items` property rather than from slots, because they are data - a\n * list of labels and icons - and feeding a menu rendered React nodes would give it nothing to show in its\n * rows. `menuItemsProperty` is the same reader every other menu in this package uses, so a screen writes\n * items the same way here as it does for a menubar.\n */\nexport function PrimeSplitButton({ element }: RegisteredComponentProps) {\n return (\n <SplitButton\n data-scene-id={element.id}\n label={stringProperty(element, 'label')}\n icon={stringProperty(element, 'icon')}\n severity={stringProperty(element, 'severity')}\n items={menuItemsProperty(element, 'items')}\n disabled={booleanProperty(element, 'disabled', false)}\n />\n );\n}\n"],"names":["PrimeSplitButton","element","_jsx","SplitButton","data-scene-id","id","label","stringProperty","icon","severity","items","menuItemsProperty","disabled","booleanProperty"],"mappings":";;;;;AAAA;AACA;AAOA;;;;;;;;;;;AAWC,IACM,SAASA,gBAAAA,CAAiB,EAAEC,OAAO,EAA4B,EAAA;AAClE,IAAA,qBACIC,GAAA,CAACC,WAAAA,EAAAA;AACGC,QAAAA,eAAAA,EAAeH,QAAQI,EAAE;AACzBC,QAAAA,KAAAA,EAAOC,eAAeN,OAAAA,EAAS,OAAA,CAAA;AAC/BO,QAAAA,IAAAA,EAAMD,eAAeN,OAAAA,EAAS,MAAA,CAAA;AAC9BQ,QAAAA,QAAAA,EAAUF,eAAeN,OAAAA,EAAS,UAAA,CAAA;AAClCS,QAAAA,KAAAA,EAAOC,kBAAkBV,OAAAA,EAAS,OAAA,CAAA;QAClCW,QAAAA,EAAUC,eAAAA,CAAgBZ,SAAS,UAAA,EAAY,KAAA;;AAG3D;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SplitButton.js","sources":["../../../button/SplitButton.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { HTMLAttributes } from 'react';\nimport { Button } from 'primereact/button';\nimport { Popover } from 'primereact/popover';\nimport { MenuItem } from '../MenuItem';\n\n/**\n * Configuration for {@link SplitButton}.\n */\nexport interface SplitButtonProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'onClick' | 'children'> {\n /**\n * The text on the primary half. This is the action the control is named after - the one a reader\n * takes without opening anything.\n */\n label?: string;\n\n /**\n * An icon class shown before the label on the primary half.\n */\n icon?: string;\n\n /**\n * The secondary actions, shown when the dropdown half is opened. Empty means there are none, and the\n * dropdown half is left off entirely rather than rendered as a control that opens onto nothing.\n */\n items?: MenuItem[];\n\n /**\n * Whether both halves are unavailable. There is no way to disable only one: a split button with a\n * dead primary action is a menu wearing the wrong shape.\n */\n disabled?: boolean;\n\n /**\n * The PrimeReact severity to tint both halves with, so the two read as one control.\n */\n severity?: string;\n\n /**\n * Invoked when the primary half is pressed. Named apart from the DOM `onClick` this component would\n * otherwise inherit, because the two are different questions - \"was the action taken\" against\n * \"was anything in here clicked\", including the dropdown toggle.\n */\n onAction?: () => void;\n}\n\n/**\n * One row of the dropdown menu.\n *\n * Kept apart from the composition below so the three shapes an entry can take - a divider, a link, a\n * command - are three plain branches rather than nested conditionals inside the JSX. An entry carrying a\n * `url` becomes a real anchor: it is a navigation, and rendering it as a button would cost the reader the\n * middle-click, the copy-link and the status bar preview that make a link a link.\n */\nfunction SplitButtonItem({ item }: { item: MenuItem }) {\n const className = 'flex w-full items-center gap-2 border-0 bg-transparent px-3 py-2 text-left no-underline disabled:opacity-50';\n const content = (\n <>\n {item.icon !== undefined && <i className={item.icon} aria-hidden='true' />}\n {item.label}\n </>\n );\n\n if (item.separator === true) return <li role='separator' className='my-1 border-t' />;\n\n if (item.url !== undefined) {\n return (\n <li role='none'>\n <a role='menuitem' href={item.url} className={className}>\n {content}\n </a>\n </li>\n );\n }\n\n return (\n <li role='none'>\n <button type='button' role='menuitem' disabled={item.disabled} onClick={item.command} className={className}>\n {content}\n </button>\n </li>\n );\n}\n\n/**\n * A primary action with a dropdown of related ones beside it.\n *\n * Cratis owns this component. PrimeReact 10 had `SplitButton`; PrimeReact 11 removed it with no\n * replacement and no headless hook, while `splitButton` remains a name this package's manifest publishes.\n * It is composed rather than reimplemented: both halves are PrimeReact `Button`s and the menu hangs off a\n * PrimeReact `Popover`, so the control is themed, positioned, portaled and dismissed by the same machinery\n * every other overlay in the application uses. What is actually ours is the arrangement and the menu\n * markup - a `menu` / `menuitem` structure over {@link MenuItem}, which is the part v10 left to chance.\n *\n * A dropdown half with nothing behind it is not rendered, so an authored but not-yet-populated item list\n * degrades to a plain button.\n *\n * What it deliberately does not carry over from v10: nested submenus - `items` is read one level deep,\n * because a split button whose menu has drawers is a menubar and should say so; the `menuButtonProps` /\n * `buttonProps` escape hatches, which existed to reach past the component and are unnecessary when the\n * halves are just Buttons; the `loading` state, which v11's Button no longer has; and `appendTo` and\n * z-index juggling, which the popover's portal makes moot.\n */\nexport function SplitButton({ label, icon, items = [], disabled = false, severity, onAction, className, ...rest }: SplitButtonProps) {\n return (\n <span {...rest} className={['inline-flex', className].filter(Boolean).join(' ')}>\n <Button severity={severity} disabled={disabled} onClick={onAction}>\n {icon !== undefined && <i className={icon} aria-hidden='true' />}\n {label}\n </Button>\n {items.length > 0 && (\n <Popover.Root>\n <Popover.Trigger as={Button} severity={severity} disabled={disabled} aria-label={label === undefined ? 'More actions' : `More actions for ${label}`}>\n <i className='pi pi-chevron-down' aria-hidden='true' />\n </Popover.Trigger>\n <Popover.Portal>\n <Popover.Positioner>\n <Popover.Popup>\n <Popover.Content>\n <ul role='menu' className='m-0 flex list-none flex-col p-0'>\n {items.map((item, index) => (\n <SplitButtonItem key={index} item={item} />\n ))}\n </ul>\n </Popover.Content>\n </Popover.Popup>\n </Popover.Positioner>\n </Popover.Portal>\n </Popover.Root>\n )}\n </span>\n );\n}\n"],"names":["SplitButtonItem","item","className","content","_jsxs","_Fragment","icon","undefined","_jsx","i","aria-hidden","label","separator","li","role","url","a","href","button","type","disabled","onClick","command","SplitButton","items","severity","onAction","rest","span","filter","Boolean","join","Button","length","Popover","Root","Trigger","as","aria-label","Portal","Positioner","Popup","Content","ul","map","index"],"mappings":";;;;AAAA;AACA;AA+CA;;;;;;;AAOC,IACD,SAASA,eAAAA,CAAgB,EAAEC,IAAI,EAAsB,EAAA;AACjD,IAAA,MAAMC,SAAAA,GAAY,6GAAA;AAClB,IAAA,MAAMC,OAAAA,iBACFC,IAAA,CAAAC,QAAA,EAAA;;YACKJ,IAAAA,CAAKK,IAAI,KAAKC,SAAAA,kBAAaC,GAAA,CAACC,GAAAA,EAAAA;AAAEP,gBAAAA,SAAAA,EAAWD,KAAKK,IAAI;gBAAEI,aAAAA,EAAY;;AAChET,YAAAA,IAAAA,CAAKU;;;AAId,IAAA,IAAIV,IAAAA,CAAKW,SAAS,KAAK,IAAA,EAAM,qBAAOJ,GAAA,CAACK,IAAAA,EAAAA;QAAGC,IAAAA,EAAK,WAAA;QAAYZ,SAAAA,E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AA,IAAAA,KAASC,2BAAaC,GAAA,CAACC,GAAAA,EAAAA;wBAAEP,SAAAA,EAAWI,IAAAA;wBAAMI,aAAAA,EAAY;;AACtDC,oBAAAA;;;AAEJa,YAAAA,KAAAA,CAAMS,MAAM,GAAG,CAAA,kBACZ7B,IAAA,CAAC8B,QAAQC,IAAI,EAAA;;AACT,kCAAA3B,GAAA,CAAC0B,QAAQE,OAAO,EAAA;wBAACC,EAAAA,EAAIL,MAAAA;wBAAQP,QAAAA,EAAUA,QAAAA;wBAAUL,QAAAA,EAAUA,QAAAA;AAAUkB,wBAAAA,YAAAA,EAAY3B,UAAUJ,SAAAA,GAAY,cAAA,GAAiB,CAAC,iBAAiB,EAAEI,KAAAA,CAAAA,CAAO;AAC/I,wBAAA,QAAA,gBAAAH,GAAA,CAACC,GAAAA,EAAAA;4BAAEP,SAAAA,EAAU,oBAAA;4BAAqBQ,aAAAA,EAAY;;;AAElD,kCAAAF,GAAA,CAAC0B,QAAQK,MAAM,EAAA;gDACX/B,GAAA,CAAC0B,QAAQM,UAAU,EAAA;oDACfhC,GAAA,CAAC0B,QAAQO,KAAK,EAAA;wDACVjC,GAAA,CAAC0B,QAAQQ,OAAO,EAAA;AACZ,oCAAA,QAAA,gBAAAlC,GAAA,CAACmC,IAAAA,EAAAA;wCAAG7B,IAAAA,EAAK,MAAA;wCAAOZ,SAAAA,EAAU,iCAAA;AACrBsB,wCAAAA,QAAAA,EAAAA,KAAAA,CAAMoB,GAAG,CAAC,CAAC3C,IAAAA,EAAM4C,sBACdrC,GAAA,CAACR,eAAAA,EAAAA;gDAA4BC,IAAAA,EAAMA;AAAb4C,6CAAAA,EAAAA,KAAAA,CAAAA;;;;;;;;;;AAWlE
|
|
1
|
+
{"version":3,"file":"SplitButton.js","sources":["../../../button/SplitButton.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { HTMLAttributes } from 'react';\nimport { Button } from 'primereact/button';\nimport { Popover } from 'primereact/popover';\nimport { MenuItem } from '../MenuItem';\n\n/**\n * Configuration for {@link SplitButton}.\n */\nexport interface SplitButtonProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'onClick' | 'children'> {\n /**\n * The text on the primary half. This is the action the control is named after - the one a reader\n * takes without opening anything.\n */\n label?: string;\n\n /**\n * An icon class shown before the label on the primary half.\n */\n icon?: string;\n\n /**\n * The secondary actions, shown when the dropdown half is opened. Empty means there are none, and the\n * dropdown half is left off entirely rather than rendered as a control that opens onto nothing.\n */\n items?: MenuItem[];\n\n /**\n * Whether both halves are unavailable. There is no way to disable only one: a split button with a\n * dead primary action is a menu wearing the wrong shape.\n */\n disabled?: boolean;\n\n /**\n * The PrimeReact severity to tint both halves with, so the two read as one control.\n */\n severity?: string;\n\n /**\n * Invoked when the primary half is pressed. Named apart from the DOM `onClick` this component would\n * otherwise inherit, because the two are different questions - \"was the action taken\" against\n * \"was anything in here clicked\", including the dropdown toggle.\n */\n onAction?: () => void;\n}\n\n/**\n * One row of the dropdown menu.\n *\n * Kept apart from the composition below so the three shapes an entry can take - a divider, a link, a\n * command - are three plain branches rather than nested conditionals inside the JSX. An entry carrying a\n * `url` becomes a real anchor: it is a navigation, and rendering it as a button would cost the reader the\n * middle-click, the copy-link and the status bar preview that make a link a link.\n */\nfunction SplitButtonItem({ item }: { item: MenuItem }) {\n const className = 'flex w-full items-center gap-2 border-0 bg-transparent px-3 py-2 text-left no-underline disabled:opacity-50';\n const content = (\n <>\n {item.icon !== undefined && <i className={item.icon} aria-hidden='true' />}\n {item.label}\n </>\n );\n\n if (item.separator === true) return <li role='separator' className='my-1 border-t' />;\n\n if (item.url !== undefined) {\n return (\n <li role='none'>\n <a role='menuitem' href={item.url} className={className}>\n {content}\n </a>\n </li>\n );\n }\n\n return (\n <li role='none'>\n <button type='button' role='menuitem' disabled={item.disabled} onClick={item.command} className={className}>\n {content}\n </button>\n </li>\n );\n}\n\n/**\n * A primary action with a dropdown of related ones beside it.\n *\n * Cratis owns this component. PrimeReact 10 had `SplitButton`; PrimeReact 11 removed it with no\n * replacement and no headless hook, while `splitButton` remains a name this package's manifest publishes.\n * It is composed rather than reimplemented: both halves are PrimeReact `Button`s and the menu hangs off a\n * PrimeReact `Popover`, so the control is themed, positioned, portaled and dismissed by the same machinery\n * every other overlay in the application uses. What is actually ours is the arrangement and the menu\n * markup - a `menu` / `menuitem` structure over {@link MenuItem}, which is the part v10 left to chance.\n *\n * A dropdown half with nothing behind it is not rendered, so an authored but not-yet-populated item list\n * degrades to a plain button.\n *\n * What it deliberately does not carry over from v10: nested submenus - `items` is read one level deep,\n * because a split button whose menu has drawers is a menubar and should say so; the `menuButtonProps` /\n * `buttonProps` escape hatches, which existed to reach past the component and are unnecessary when the\n * halves are just Buttons; the `loading` state, which v11's Button no longer has; and `appendTo` and\n * z-index juggling, which the popover's portal makes moot.\n */\nexport function SplitButton({ label, icon, items = [], disabled = false, severity, onAction, className, ...rest }: SplitButtonProps) {\n return (\n <span {...rest} className={['inline-flex', className].filter(Boolean).join(' ')}>\n <Button severity={severity} disabled={disabled} onClick={onAction}>\n {icon !== undefined && <i className={icon} aria-hidden='true' />}\n {label}\n </Button>\n {items.length > 0 && (\n <Popover.Root>\n <Popover.Trigger as={Button} severity={severity} disabled={disabled} aria-label={label === undefined ? 'More actions' : `More actions for ${label}`}>\n <i className='pi pi-chevron-down' aria-hidden='true' />\n </Popover.Trigger>\n <Popover.Portal>\n <Popover.Positioner>\n <Popover.Popup>\n <Popover.Content>\n <ul role='menu' className='m-0 flex list-none flex-col p-0'>\n {items.map((item, index) => (\n <SplitButtonItem key={index} item={item} />\n ))}\n </ul>\n </Popover.Content>\n </Popover.Popup>\n </Popover.Positioner>\n </Popover.Portal>\n </Popover.Root>\n )}\n </span>\n );\n}\n"],"names":["SplitButtonItem","item","className","content","_jsxs","_Fragment","icon","undefined","_jsx","i","aria-hidden","label","separator","li","role","url","a","href","button","type","disabled","onClick","command","SplitButton","items","severity","onAction","rest","span","filter","Boolean","join","Button","length","Popover","Root","Trigger","as","aria-label","Portal","Positioner","Popup","Content","ul","map","index"],"mappings":";;;;AAAA;AACA;AA+CA;;;;;;;AAOC,IACD,SAASA,eAAAA,CAAgB,EAAEC,IAAI,EAAsB,EAAA;AACjD,IAAA,MAAMC,SAAAA,GAAY,6GAAA;AAClB,IAAA,MAAMC,OAAAA,iBACFC,IAAA,CAAAC,QAAA,EAAA;;YACKJ,IAAAA,CAAKK,IAAI,KAAKC,SAAAA,kBAAaC,GAAA,CAACC,GAAAA,EAAAA;AAAEP,gBAAAA,SAAAA,EAAWD,KAAKK,IAAI;gBAAEI,aAAAA,EAAY;;AAChET,YAAAA,IAAAA,CAAKU;;;AAId,IAAA,IAAIV,IAAAA,CAAKW,SAAS,KAAK,IAAA,EAAM,qBAAOJ,GAAA,CAACK,IAAAA,EAAAA;QAAGC,IAAAA,EAAK,WAAA;QAAYZ,SAAAA,EAAU;;IAEnE,IAAID,IAAAA,CAAKc,GAAG,KAAKR,SAAAA,EAAW;AACxB,QAAA,qBACIC,GAAA,CAACK,IAAAA,EAAAA;YAAGC,IAAAA,EAAK,MAAA;AACL,YAAA,QAAA,gBAAAN,GAAA,CAACQ,GAAAA,EAAAA;gBAAEF,IAAAA,EAAK,UAAA;AAAWG,gBAAAA,IAAAA,EAAMhB,KAAKc,GAAG;gBAAEb,SAAAA,EAAWA,SAAAA;AACzCC,gBAAAA,QAAAA,EAAAA;;;AAIjB,IAAA;AAEA,IAAA,qBACIK,GAAA,CAACK,IAAAA,EAAAA;QAAGC,IAAAA,EAAK,MAAA;AACL,QAAA,QAAA,gBAAAN,GAAA,CAACU,QAAAA,EAAAA;YAAOC,IAAAA,EAAK,QAAA;YAASL,IAAAA,EAAK,UAAA;AAAWM,YAAAA,QAAAA,EAAUnB,KAAKmB,QAAQ;AAAEC,YAAAA,OAAAA,EAASpB,KAAKqB,OAAO;YAAEpB,SAAAA,EAAWA,SAAAA;AAC5FC,YAAAA,QAAAA,E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AU,EAAA;oDACfhC,GAAA,CAAC0B,QAAQO,KAAK,EAAA;wDACVjC,GAAA,CAAC0B,QAAQQ,OAAO,EAAA;AACZ,oCAAA,QAAA,gBAAAlC,GAAA,CAACmC,IAAAA,EAAAA;wCAAG7B,IAAAA,EAAK,MAAA;wCAAOZ,SAAAA,EAAU,iCAAA;AACrBsB,wCAAAA,QAAAA,EAAAA,KAAAA,CAAMoB,GAAG,CAAC,CAAC3C,IAAAA,EAAM4C,sBACdrC,GAAA,CAACR,eAAAA,EAAAA;gDAA4BC,IAAAA,EAAMA;AAAb4C,6CAAAA,EAAAA,KAAAA,CAAAA;;;;;;;;;;AAWlE;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Column.js","sources":["../../../data/Column.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { FC, ReactNode } from 'react';\n\n/**\n * What one column of a table declares about itself.\n *\n * This is deliberately the smallest set a table needs to draw a heading and a cell. PrimeReact 10's\n * `Column` also carried `editor`, `frozen`, `footer`, `colSpan` and `expander`; none of them are carried\n * over. Editing, frozen panes and footers are table-wide behaviors that a Scene screen has no way to\n * drive - there is nowhere for an edit to go and nothing to compute a footer from - and `colSpan` and\n * `expander` only mean anything inside layouts (column groups, nested rows) this package no longer\n * offers. Re-declaring them here would advertise capabilities the adapters cannot honor.\n */\nexport interface ColumnProps {\n /**\n * The row property the column shows. Also the field the table sorts and filters by, which is why a\n * column without one gets neither: there is nothing to key the operation on.\n */\n field?: string;\n\n /**\n * The column heading. A column authored with only a field falls back to the field name rather than\n * rendering blank, so a half-configured table still reads as a table.\n */\n header?: string;\n\n /**\n * Renders the cell from the whole row instead of from a single field. This is the escape hatch for a\n * column that shows something derived - two fields joined, a formatted date, a badge - and it is the\n * one reason a column may sensibly omit `field`.\n */\n body?: (row: Record<string, unknown>) => ReactNode;\n\n /**\n * Whether clicking the heading sorts by this column.\n */\n sortable?: boolean;\n\n /**\n * Whether the heading offers an inline filter for this column.\n */\n filter?: boolean;\n}\n\n/**\n * One column of a table - Cratis-owned, because PrimeReact 11 removed `primereact/column` outright.\n *\n * In PrimeReact 10 `Column` was a real participant: `DataTable` walked its children, recognized them by\n * React element type, and rendered the table from their props. PrimeReact 11 replaced that with a\n * compositional table whose header and body cells the caller writes out itself, so nothing in the library\n * is left to declare a column with. Cratis Components rebuilt the same `<Column field header body\n * sortable filter />` authoring model on top of the new table, and this is that same move for Scene: the\n * component renders nothing on its own and exists only to be read.\n *\n * Being a pure declaration is the whole point - it is what lets a column be written where it belongs,\n * inside the table it configures, without the table having to interpret arbitrary children.\n */\nexport const Column: FC<ColumnProps> = () => null;\n\nColumn.displayName = 'Column';\n"],"names":["Column","displayName"],"mappings":"AAAA;AACA;AA6CA;;;;;;;;;;;;AAYC,IACM,MAAMA,MAAAA,GAA0B,IAAM;AAE7CA,MAAAA,CAAOC,WAAW,GAAG,QAAA
|
|
1
|
+
{"version":3,"file":"Column.js","sources":["../../../data/Column.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { FC, ReactNode } from 'react';\n\n/**\n * What one column of a table declares about itself.\n *\n * This is deliberately the smallest set a table needs to draw a heading and a cell. PrimeReact 10's\n * `Column` also carried `editor`, `frozen`, `footer`, `colSpan` and `expander`; none of them are carried\n * over. Editing, frozen panes and footers are table-wide behaviors that a Scene screen has no way to\n * drive - there is nowhere for an edit to go and nothing to compute a footer from - and `colSpan` and\n * `expander` only mean anything inside layouts (column groups, nested rows) this package no longer\n * offers. Re-declaring them here would advertise capabilities the adapters cannot honor.\n */\nexport interface ColumnProps {\n /**\n * The row property the column shows. Also the field the table sorts and filters by, which is why a\n * column without one gets neither: there is nothing to key the operation on.\n */\n field?: string;\n\n /**\n * The column heading. A column authored with only a field falls back to the field name rather than\n * rendering blank, so a half-configured table still reads as a table.\n */\n header?: string;\n\n /**\n * Renders the cell from the whole row instead of from a single field. This is the escape hatch for a\n * column that shows something derived - two fields joined, a formatted date, a badge - and it is the\n * one reason a column may sensibly omit `field`.\n */\n body?: (row: Record<string, unknown>) => ReactNode;\n\n /**\n * Whether clicking the heading sorts by this column.\n */\n sortable?: boolean;\n\n /**\n * Whether the heading offers an inline filter for this column.\n */\n filter?: boolean;\n}\n\n/**\n * One column of a table - Cratis-owned, because PrimeReact 11 removed `primereact/column` outright.\n *\n * In PrimeReact 10 `Column` was a real participant: `DataTable` walked its children, recognized them by\n * React element type, and rendered the table from their props. PrimeReact 11 replaced that with a\n * compositional table whose header and body cells the caller writes out itself, so nothing in the library\n * is left to declare a column with. Cratis Components rebuilt the same `<Column field header body\n * sortable filter />` authoring model on top of the new table, and this is that same move for Scene: the\n * component renders nothing on its own and exists only to be read.\n *\n * Being a pure declaration is the whole point - it is what lets a column be written where it belongs,\n * inside the table it configures, without the table having to interpret arbitrary children.\n */\nexport const Column: FC<ColumnProps> = () => null;\n\nColumn.displayName = 'Column';\n"],"names":["Column","displayName"],"mappings":"AAAA;AACA;AA6CA;;;;;;;;;;;;AAYC,IACM,MAAMA,MAAAA,GAA0B,IAAM;AAE7CA,MAAAA,CAAOC,WAAW,GAAG,QAAA;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pagination.js","sources":["../../../data/Pagination.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Paginator, type PaginatorPagesInstance, type PaginatorRootChangeEvent } from 'primereact/paginator';\n\n/**\n * How a caller drives {@link Pagination}.\n */\nexport interface PaginationProps {\n /**\n * The page being shown, counted from one. PrimeReact 11's paginator is one-based throughout - its\n * `defaultPage` is `1`, and the page numbers it reports back are the ones it prints - so the adapters\n * count the same way rather than translating at every edge.\n */\n page: number;\n\n /**\n * How many records there are in total, across all pages.\n */\n total: number;\n\n /**\n * How many records fit on a page.\n */\n itemsPerPage: number;\n\n /**\n * Called with the page the user asked for.\n */\n onPageChange: (page: number) => void;\n\n /**\n * The Scene element id to tag the rendered paginator with, when the paginator *is* the adapter's\n * output rather than a part of it.\n */\n sceneId?: string;\n}\n\n/**\n * Page navigation, assembled once from PrimeReact 11's paginator parts.\n *\n * PrimeReact 11 ships the paginator as a namespace of parts - a root that owns the page arithmetic and\n * hands out pre-built button props, and separate first/previous/pages/next/last elements the caller\n * arranges. That is more expressive than PrimeReact 10's single component, but it is also several dozen\n * lines that two adapters in this folder would otherwise both write out: the `paginator` component\n * itself, and `dataView`, which in PrimeReact 11 no longer owns its data and so cannot page it either.\n * Assembling it here means the two agree on what a paginator looks like.\n *\n * The paginator is driven as a controlled component so the caller always knows which page is showing -\n * `dataView` needs it to slice its rows, and an uncontrolled paginator would keep that inside itself.\n *\n * @param props How to drive the paginator.\n * @returns The paginator.\n */\nexport function Pagination({ page, total, itemsPerPage, onPageChange, sceneId }: PaginationProps) {\n return (\n <Paginator.Root\n data-scene-id={sceneId}\n page={page}\n total={total}\n itemsPerPage={itemsPerPage}\n onPageChange={(event: PaginatorRootChangeEvent) => onPageChange(event.value)}>\n <Paginator.Content>\n <Paginator.First>«</Paginator.First>\n <Paginator.Prev>‹</Paginator.Prev>\n <Paginator.Pages>\n {(pages: PaginatorPagesInstance) =>\n pages.paginator?.pages.map((item, index) =>\n item.type === 'page' ? (\n <Paginator.Page key={`page-${item.value}`} value={item.value} />\n ) : (\n <Paginator.Ellipsis key={`ellipsis-${index}`}>…</Paginator.Ellipsis>\n )\n )\n }\n </Paginator.Pages>\n <Paginator.Next>›</Paginator.Next>\n <Paginator.Last>»</Paginator.Last>\n </Paginator.Content>\n </Paginator.Root>\n );\n}\n"],"names":["Pagination","page","total","itemsPerPage","onPageChange","sceneId","_jsx","Paginator","Root","data-scene-id","event","value","_jsxs","Content","First","Prev","Pages","pages","paginator","map","item","index","type","Page","Ellipsis","Next","Last"],"mappings":";;;AAsCA;;;;;;;;;;;;;;;AAeC,IACM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ratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Paginator, type PaginatorPagesInstance, type PaginatorRootChangeEvent } from 'primereact/paginator';\n\n/**\n * How a caller drives {@link Pagination}.\n */\nexport interface PaginationProps {\n /**\n * The page being shown, counted from one. PrimeReact 11's paginator is one-based throughout - its\n * `defaultPage` is `1`, and the page numbers it reports back are the ones it prints - so the adapters\n * count the same way rather than translating at every edge.\n */\n page: number;\n\n /**\n * How many records there are in total, across all pages.\n */\n total: number;\n\n /**\n * How many records fit on a page.\n */\n itemsPerPage: number;\n\n /**\n * Called with the page the user asked for.\n */\n onPageChange: (page: number) => void;\n\n /**\n * The Scene element id to tag the rendered paginator with, when the paginator *is* the adapter's\n * output rather than a part of it.\n */\n sceneId?: string;\n}\n\n/**\n * Page navigation, assembled once from PrimeReact 11's paginator parts.\n *\n * PrimeReact 11 ships the paginator as a namespace of parts - a root that owns the page arithmetic and\n * hands out pre-built button props, and separate first/previous/pages/next/last elements the caller\n * arranges. That is more expressive than PrimeReact 10's single component, but it is also several dozen\n * lines that two adapters in this folder would otherwise both write out: the `paginator` component\n * itself, and `dataView`, which in PrimeReact 11 no longer owns its data and so cannot page it either.\n * Assembling it here means the two agree on what a paginator looks like.\n *\n * The paginator is driven as a controlled component so the caller always knows which page is showing -\n * `dataView` needs it to slice its rows, and an uncontrolled paginator would keep that inside itself.\n *\n * @param props How to drive the paginator.\n * @returns The paginator.\n */\nexport function Pagination({ page, total, itemsPerPage, onPageChange, sceneId }: PaginationProps) {\n return (\n <Paginator.Root\n data-scene-id={sceneId}\n page={page}\n total={total}\n itemsPerPage={itemsPerPage}\n onPageChange={(event: PaginatorRootChangeEvent) => onPageChange(event.value)}>\n <Paginator.Content>\n <Paginator.First>«</Paginator.First>\n <Paginator.Prev>‹</Paginator.Prev>\n <Paginator.Pages>\n {(pages: PaginatorPagesInstance) =>\n pages.paginator?.pages.map((item, index) =>\n item.type === 'page' ? (\n <Paginator.Page key={`page-${item.value}`} value={item.value} />\n ) : (\n <Paginator.Ellipsis key={`ellipsis-${index}`}>…</Paginator.Ellipsis>\n )\n )\n }\n </Paginator.Pages>\n <Paginator.Next>›</Paginator.Next>\n <Paginator.Last>»</Paginator.Last>\n </Paginator.Content>\n </Paginator.Root>\n );\n}\n"],"names":["Pagination","page","total","itemsPerPage","onPageChange","sceneId","_jsx","Paginator","Root","data-scene-id","event","value","_jsxs","Content","First","Prev","Pages","pages","paginator","map","item","index","type","Page","Ellipsis","Next","Last"],"mappings":";;;AAsCA;;;;;;;;;;;;;;;AAeC,IACM,SAASA,UAAAA,CAAW,EAAEC,IAAI,EAAEC,KAAK,EAAEC,YAAY,EAAEC,YAAY,EAAEC,OAAO,EAAmB,EAAA;IAC5F,qBACIC,GAAA,CAACC,UAAUC,IAAI,EAAA;QACXC,eAAAA,EAAeJ,OAAAA;QACfJ,IAAAA,EAAMA,IAAAA;QACNC,KAAAA,EAAOA,KAAAA;QACPC,YAAAA,EAAcA,YAAAA;AACdC,QAAAA,YAAAA,EAAc,CAACM,KAAAA,GAAoCN,YAAAA,CAAaM,KAAAA,CAAMC,KAAK,CAAA;gCAC3EC,IAAA,CAACL,UAAUM,OAAO,EAAA;;AACd,8BAAAP,GAAA,CAACC,UAAUO,KAAK,EAAA;AAAC,oBAAA,QAAA,EAAA;;AACjB,8BAAAR,GAAA,CAACC,UAAUQ,IAAI,EAAA;AAAC,oBAAA,QAAA,EAAA;;AAChB,8BAAAT,GAAA,CAACC,UAAUS,KAAK,EAAA;AACX,oBAAA,QAAA,EAAA,CAACC,KAAAA,GACEA,KAAAA,CAAMC,SAAS,EAAED,MAAME,GAAAA,CAAI,CAACC,IAAAA,EAAMC,KAAAA,GAC9BD,KAAKE,IAAI,KAAK,MAAA,iBACVhB,GAAA,CAACC,UAAUgB,IAAI,EAAA;AAA4BZ,gCAAAA,KAAAA,EAAOS,KAAKT;+BAAlC,CAAC,KAAK,EAAES,IAAAA,CAAKT,KAAK,EAAE,CAAA,iBAEzCL,GAAA,CAACC,UAAUiB,QAAQ,EAAA;AAA2B,gCAAA,QAAA,EAAA;+BAArB,CAAC,SAAS,EAAEH,KAAAA,CAAAA,CAAO,CAAA;;AAK5D,8BAAAf,GAAA,CAACC,UAAUkB,IAAI,EAAA;AAAC,oBAAA,QAAA,EAAA;;AAChB,8BAAAnB,GAAA,CAACC,UAAUmB,IAAI,EAAA;AAAC,oBAAA,QAAA,EAAA;;;;;AAIhC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrimeColumn.js","sources":["../../../data/PrimeColumn.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, stringProperty } from '../properties';\nimport { Column } from './Column';\n\n/**\n * The `PrimeReact:column` component - one column of a table.\n *\n * This renders {@link Column}, which is Cratis-owned rather than PrimeReact's: PrimeReact 11 removed\n * `primereact/column` along with the table that walked it. Like its predecessor it is configuration\n * rather than output - it renders nothing on its own and only means something inside a table - so a bare\n * `column` on a screen looking blank is the component working, not failing.\n *\n * When a `column` element is nested under `dataTable` or `table`, the table reads its properties off the\n * model rather than off this rendered output; see `columnDefinitions` for why that indirection exists and\n * why PrimeReact 11 did not change it.\n */\nexport function PrimeColumn({ element }: RegisteredComponentProps) {\n const field = stringProperty(element, 'field', '');\n return (\n <Column\n field={field}\n header={stringProperty(element, 'header', field)}\n sortable={booleanProperty(element, 'sortable', false)}\n filter={booleanProperty(element, 'filter', false)}\n />\n );\n}\n"],"names":["PrimeColumn","element","field","stringProperty","_jsx","Column","header","sortable","booleanProperty","filter"],"mappings":";;;;AAAA;AACA;AAMA;;;;;;;;;;;AAWC,IACM,SAASA,WAAAA,CAAY,EAAEC,OAAO,EAA4B,EAAA;IAC7D,MAAMC,KAAAA,GAAQC,cAAAA,CAAeF,OAAAA,EAAS,OAAA,EAAS,EAAA,CAAA;AAC/C,IAAA,qBACIG,GAAA,CAACC,MAAAA,EAAAA;QACGH,KAAAA,EAAOA,KAAAA;QACPI,MAAAA,EAAQH,cAAAA,CAAeF,SAAS,QAAA,EAAUC,KAAAA,CAAAA;QAC1CK,QAAAA,EAAUC,eAAAA,CAAgBP,SAAS,UAAA,EAAY,KAAA,CAAA;QAC/CQ,MAAAA,EAAQD,eAAAA,CAAgBP,SAAS,QAAA,EAAU,KAAA;;AAGvD
|
|
1
|
+
{"version":3,"file":"PrimeColumn.js","sources":["../../../data/PrimeColumn.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, stringProperty } from '../properties';\nimport { Column } from './Column';\n\n/**\n * The `PrimeReact:column` component - one column of a table.\n *\n * This renders {@link Column}, which is Cratis-owned rather than PrimeReact's: PrimeReact 11 removed\n * `primereact/column` along with the table that walked it. Like its predecessor it is configuration\n * rather than output - it renders nothing on its own and only means something inside a table - so a bare\n * `column` on a screen looking blank is the component working, not failing.\n *\n * When a `column` element is nested under `dataTable` or `table`, the table reads its properties off the\n * model rather than off this rendered output; see `columnDefinitions` for why that indirection exists and\n * why PrimeReact 11 did not change it.\n */\nexport function PrimeColumn({ element }: RegisteredComponentProps) {\n const field = stringProperty(element, 'field', '');\n return (\n <Column\n field={field}\n header={stringProperty(element, 'header', field)}\n sortable={booleanProperty(element, 'sortable', false)}\n filter={booleanProperty(element, 'filter', false)}\n />\n );\n}\n"],"names":["PrimeColumn","element","field","stringProperty","_jsx","Column","header","sortable","booleanProperty","filter"],"mappings":";;;;AAAA;AACA;AAMA;;;;;;;;;;;AAWC,IACM,SAASA,WAAAA,CAAY,EAAEC,OAAO,EAA4B,EAAA;IAC7D,MAAMC,KAAAA,GAAQC,cAAAA,CAAeF,OAAAA,EAAS,OAAA,EAAS,EAAA,CAAA;AAC/C,IAAA,qBACIG,GAAA,CAACC,MAAAA,EAAAA;QACGH,KAAAA,EAAOA,KAAAA;QACPI,MAAAA,EAAQH,cAAAA,CAAeF,SAAS,QAAA,EAAUC,KAAAA,CAAAA;QAC1CK,QAAAA,EAAUC,eAAAA,CAAgBP,SAAS,UAAA,EAAY,KAAA,CAAA;QAC/CQ,MAAAA,EAAQD,eAAAA,CAAgBP,SAAS,QAAA,EAAU,KAAA;;AAGvD;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrimeDataTable.js","sources":["../../../data/PrimeDataTable.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ReactElement, ReactNode, isValidElement } from 'react';\nimport { DataTable, type DataTableFilterInstance, type DataTablePaginationInstance, type DataTableTBodyItemOptions } from 'primereact/datatable';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, numberProperty, recordArrayProperty, stringProperty } from '../properties';\nimport { Column, ColumnProps } from './Column';\nimport { columnDefinitions } from './columnDefinitions';\n\n/**\n * The `PrimeReact:dataTable` component, also registered under Screenplay's `table` name so a screen\n * compiled from a `.play` file renders through this package without a translation step.\n *\n * PrimeReact 11 turned the table inside out. Where PrimeReact 10 took `value` and a set of `Column`\n * children and produced the whole table, PrimeReact 11 gives back a root that owns sorting, filtering and\n * paging and a set of parts - container, table, head, rows, cells - that the caller arranges. So this\n * adapter now writes out the table's structure itself, and the column concept it renders from is\n * {@link Column}, which is Cratis-owned because PrimeReact 11 removed `primereact/column` entirely.\n *\n * Columns are taken from `Column` declarations when a React caller composed some into a slot, and\n * otherwise from the element's model - nested `column` children, a `columns` property, or the shape of\n * the first row; see `columnDefinitions`. The model is the path a screen takes, and it is checked second\n * only because an explicitly composed declaration is the more specific statement of the two.\n */\nexport function PrimeDataTable({ element, slots }: RegisteredComponentProps) {\n const rows = recordArrayProperty(element, 'rows');\n const declared = declaredColumns(slots);\n const columns: ColumnProps[] = declared.length > 0 ? declared : columnDefinitions(element, rows);\n const pageSize = numberProperty(element, 'pageSize');\n const size = stringProperty(element, 'size');\n\n return (\n <DataTable.Root\n data-scene-id={element.id}\n data={rows}\n removableSort\n paginator={pageSize !== undefined}\n rows={pageSize}\n stripedRows={booleanProperty(element, 'stripedRows', false)}\n showGridlines={booleanProperty(element, 'showGridlines', false)}\n size={size === 'small' || size === 'large' ? size : undefined}>\n <DataTable.TableContainer>\n <DataTable.Table>\n <DataTable.THead>\n <DataTable.THeadRow>\n {columns.map((column, index) => (\n <DataTable.THeadCell key={column.field ?? index}>\n {column.sortable && column.field ? (\n <DataTable.Sort field={column.field}>\n {headerOf(column)}\n <DataTable.SortIndicator match='asc'> ▲</DataTable.SortIndicator>\n <DataTable.SortIndicator match='desc'> ▼</DataTable.SortIndicator>\n </DataTable.Sort>\n ) : (\n <span>{headerOf(column)}</span>\n )}\n {column.filter && column.field && (\n <DataTable.Filter field={column.field} display='row'>\n {(filter: DataTableFilterInstance) => (\n <input\n className='w-full'\n aria-label={`Filter by ${headerOf(column)}`}\n value={typeof filter.value === 'string' ? filter.value : ''}\n onChange={(event) => filter.onChange(event, event.target.value)}\n />\n )}\n </DataTable.Filter>\n )}\n </DataTable.THeadCell>\n ))}\n </DataTable.THeadRow>\n </DataTable.THead>\n <DataTable.TBody>\n {({ item, index }: DataTableTBodyItemOptions) => (\n <DataTable.Row index={index}>\n {columns.map((column, columnIndex) => (\n <DataTable.Cell key={column.field ?? columnIndex}>{cellOf(column, item)}</DataTable.Cell>\n ))}\n </DataTable.Row>\n )}\n </DataTable.TBody>\n <DataTable.EmptyTBody>\n <DataTable.Row>\n <DataTable.Cell colSpan={Math.max(columns.length, 1)}>\n {stringProperty(element, 'emptyMessage', 'No records found')}\n </DataTable.Cell>\n </DataTable.Row>\n </DataTable.EmptyTBody>\n </DataTable.Table>\n </DataTable.TableContainer>\n <DataTable.Pagination>\n {(pagination: DataTablePaginationInstance) => (\n <div className='flex items-center gap-2 p-2'>\n <button\n type='button'\n disabled={!pagination.canPrev}\n onClick={(event) => pagination.onPageChange(event, pagination.page - 1)}>\n ‹\n </button>\n <span className='text-sm opacity-75'>\n {pagination.page + 1} / {Math.max(pagination.pageCount, 1)}\n </span>\n <button\n type='button'\n disabled={!pagination.canNext}\n onClick={(event) => pagination.onPageChange(event, pagination.page + 1)}>\n ›\n </button>\n </div>\n )}\n </DataTable.Pagination>\n </DataTable.Root>\n );\n}\n\nfunction declaredColumns(slots: Record<string, ReactNode[]>): ColumnProps[] {\n return [...(slots.columns ?? []), ...(slots.content ?? [])]\n .filter((node): node is ReactElement<ColumnProps> => isValidElement(node) && node.type === Column)\n .map((node) => node.props);\n}\n\nfunction headerOf(column: ColumnProps): string {\n return column.header ?? column.field ?? '';\n}\n\nfunction cellOf(column: ColumnProps, row: Record<string, unknown>): ReactNode {\n if (column.body !== undefined) return column.body(row);\n if (column.field === undefined) return '';\n return String(row[column.field] ?? '');\n}\n"],"names":["PrimeDataTable","element","slots","rows","recordArrayProperty","declared","declaredColumns","columns","length","columnDefinitions","pageSize","numberProperty","size","stringProperty","_jsxs","DataTable","Root","data-scene-id","id","data","removableSort","paginator","undefined","stripedRows","booleanProperty","showGridlines","_jsx","TableContainer","Table","THead","THeadRow","map","column","index","THeadCell","sortable","field","Sort","headerOf","SortIndicator","match","span","filter","Filter","display","input","className","aria-label","value","onChange","event","target","TBody","item","Row","columnIndex","Cell","cellOf","EmptyTBody","colSpan","Math","max","Pagination","pagination","div","button","type","disabled","canPrev","onClick","onPageChange","page","pageCount","canNext","content","node","isValidElement","Column","props","header","row","body","String"],"mappings":";;;;;;;AAUA;;;;;;;;;;;;;;AAcC,IACM,SAASA,cAAAA,CAAe,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;IACvE,MAAMC,IAAAA,GAAOC,oBAAoBH,OAAAA,EAAS,MAAA,CAAA;AAC1C,IAAA,MAAMI,WAAWC,eAAAA,CAAgBJ,KAAAA,CAAAA;AACjC,IAAA,MAAMK,UAAyBF,QAAAA,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SAASjE,gBAAgBJ,KAAkC,EAAA;IACvD,OAAO;WAAKA,KAAAA,CAAMK,OAAO,IAAI,EAAE;WAAOL,KAAAA,CAAMwE,OAAO,IAAI;AAAI,KAAA,CACtDhC,MAAM,CAAC,CAACiC,IAAAA,iBAA4CC,eAAeD,IAAAA,CAAAA,IAASA,IAAAA,CAAKT,IAAI,KAAKW,QAC1F9C,GAAG,CAAC,CAAC4C,IAAAA,GAASA,KAAKG,KAAK,CAAA;AACjC;AAEA,SAASxC,SAASN,MAAmB,EAAA;AACjC,IAAA,OAAOA,MAAAA,CAAO+C,MAAM,IAAI/C,MAAAA,CAAOI,KAAK,IAAI,EAAA;AAC5C;AAEA,SAASqB,MAAAA,CAAOzB,MAAmB,EAAEgD,GAA4B,EAAA;AAC7D,IAAA,IAAIhD,OAAOiD,IAAI,KAAK3D,WAAW,OAAOU,MAAAA,CAAOiD,IAAI,CAACD,GAAAA,CAAAA;AAClD,IAAA,IAAIhD,MAAAA,CAAOI,KAAK,KAAKd,SAAAA,EAAW,OAAO,EAAA;AACvC,IAAA,OAAO4D,OAAOF,GAAG,CAAChD,MAAAA,CAAOI,KAAK,CAAC,IAAI,EAAA,CAAA;AACvC;;;;"}
|
|
1
|
+
{"version":3,"file":"PrimeDataTable.js","sources":["../../../data/PrimeDataTable.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ReactElement, ReactNode, isValidElement } from 'react';\nimport { DataTable, type DataTableFilterInstance, type DataTablePaginationInstance, type DataTableTBodyItemOptions } from 'primereact/datatable';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, numberProperty, recordArrayProperty, stringProperty } from '../properties';\nimport { Column, ColumnProps } from './Column';\nimport { columnDefinitions } from './columnDefinitions';\n\n/**\n * The `PrimeReact:dataTable` component, also registered under Screenplay's `table` name so a screen\n * compiled from a `.play` file renders through this package without a translation step.\n *\n * PrimeReact 11 turned the table inside out. Where PrimeReact 10 took `value` and a set of `Column`\n * children and produced the whole table, PrimeReact 11 gives back a root that owns sorting, filtering and\n * paging and a set of parts - container, table, head, rows, cells - that the caller arranges. So this\n * adapter now writes out the table's structure itself, and the column concept it renders from is\n * {@link Column}, which is Cratis-owned because PrimeReact 11 removed `primereact/column` entirely.\n *\n * Columns are taken from `Column` declarations when a React caller composed some into a slot, and\n * otherwise from the element's model - nested `column` children, a `columns` property, or the shape of\n * the first row; see `columnDefinitions`. The model is the path a screen takes, and it is checked second\n * only because an explicitly composed declaration is the more specific statement of the two.\n */\nexport function PrimeDataTable({ element, slots }: RegisteredComponentProps) {\n const rows = recordArrayProperty(element, 'rows');\n const declared = declaredColumns(slots);\n const columns: ColumnProps[] = declared.length > 0 ? declared : columnDefinitions(element, rows);\n const pageSize = numberProperty(element, 'pageSize');\n const size = stringProperty(element, 'size');\n\n return (\n <DataTable.Root\n data-scene-id={element.id}\n data={rows}\n removableSort\n paginator={pageSize !== undefined}\n rows={pageSize}\n stripedRows={booleanProperty(element, 'stripedRows', false)}\n showGridlines={booleanProperty(element, 'showGridlines', false)}\n size={size === 'small' || size === 'large' ? size : undefined}>\n <DataTable.TableContainer>\n <DataTable.Table>\n <DataTable.THead>\n <DataTable.THeadRow>\n {columns.map((column, index) => (\n <DataTable.THeadCell key={column.field ?? index}>\n {column.sortable && column.field ? (\n <DataTable.Sort field={column.field}>\n {headerOf(column)}\n <DataTable.SortIndicator match='asc'> ▲</DataTable.SortIndicator>\n <DataTable.SortIndicator match='desc'> ▼</DataTable.SortIndicator>\n </DataTable.Sort>\n ) : (\n <span>{headerOf(column)}</span>\n )}\n {column.filter && column.field && (\n <DataTable.Filter field={column.field} display='row'>\n {(filter: DataTableFilterInstance) => (\n <input\n className='w-full'\n aria-label={`Filter by ${headerOf(column)}`}\n value={typeof filter.value === 'string' ? filter.value : ''}\n onChange={(event) => filter.onChange(event, event.target.value)}\n />\n )}\n </DataTable.Filter>\n )}\n </DataTable.THeadCell>\n ))}\n </DataTable.THeadRow>\n </DataTable.THead>\n <DataTable.TBody>\n {({ item, index }: DataTableTBodyItemOptions) => (\n <DataTable.Row index={index}>\n {columns.map((column, columnIndex) => (\n <DataTable.Cell key={column.field ?? columnIndex}>{cellOf(column, item)}</DataTable.Cell>\n ))}\n </DataTable.Row>\n )}\n </DataTable.TBody>\n <DataTable.EmptyTBody>\n <DataTable.Row>\n <DataTable.Cell colSpan={Math.max(columns.length, 1)}>\n {stringProperty(element, 'emptyMessage', 'No records found')}\n </DataTable.Cell>\n </DataTable.Row>\n </DataTable.EmptyTBody>\n </DataTable.Table>\n </DataTable.TableContainer>\n <DataTable.Pagination>\n {(pagination: DataTablePaginationInstance) => (\n <div className='flex items-center gap-2 p-2'>\n <button\n type='button'\n disabled={!pagination.canPrev}\n onClick={(event) => pagination.onPageChange(event, pagination.page - 1)}>\n ‹\n </button>\n <span className='text-sm opacity-75'>\n {pagination.page + 1} / {Math.max(pagination.pageCount, 1)}\n </span>\n <button\n type='button'\n disabled={!pagination.canNext}\n onClick={(event) => pagination.onPageChange(event, pagination.page + 1)}>\n ›\n </button>\n </div>\n )}\n </DataTable.Pagination>\n </DataTable.Root>\n );\n}\n\nfunction declaredColumns(slots: Record<string, ReactNode[]>): ColumnProps[] {\n return [...(slots.columns ?? []), ...(slots.content ?? [])]\n .filter((node): node is ReactElement<ColumnProps> => isValidElement(node) && node.type === Column)\n .map((node) => node.props);\n}\n\nfunction headerOf(column: ColumnProps): string {\n return column.header ?? column.field ?? '';\n}\n\nfunction cellOf(column: ColumnProps, row: Record<string, unknown>): ReactNode {\n if (column.body !== undefined) return column.body(row);\n if (column.field === undefined) return '';\n return String(row[column.field] ?? '');\n}\n"],"names":["PrimeDataTable","element","slots","rows","recordArrayProperty","declared","declaredColumns","columns","length","columnDefinitions","pageSize","numberProperty","size","stringProperty","_jsxs","DataTable","Root","data-scene-id","id","data","removableSort","paginator","undefined","stripedRows","booleanProperty","showGridlines","_jsx","TableContainer","Table","THead","THeadRow","map","column","index","THeadCell","sortable","field","Sort","headerOf","SortIndicator","match","span","filter","Filter","display","input","className","aria-label","value","onChange","event","target","TBody","item","Row","columnIndex","Cell","cellOf","EmptyTBody","colSpan","Math","max","Pagination","pagination","div","button","type","disabled","canPrev","onClick","onPageChange","page","pageCount","canNext","content","node","isValidElement","Column","props","header","row","body","String"],"mappings":";;;;;;;AAUA;;;;;;;;;;;;;;AAcC,IACM,SAASA,cAAAA,CAAe,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;IACvE,MAAMC,IAAAA,GAAOC,oBAAoBH,OAAAA,EAAS,MAAA,CAAA;AAC1C,IAAA,MAAMI,WAAWC,eAAAA,CAAgBJ,KAAAA,CAAAA;AACjC,IAAA,MAAMK,UAAyBF,QAAAA,CAASG,MAAM,GAAG,CAAA,GAAIH,QAAAA,GAAWI,kBAAkBR,OAAAA,EAASE,IAAAA,CAAAA;IAC3F,MAAMO,QAAAA,GAAWC,eAAeV,OAAAA,EAAS,UAAA,CAAA;IACzC,MAAMW,IAAAA,GAAOC,eAAeZ,OAAAA,EAAS,MAAA,CAAA;IAErC,qBACIa,IAAA,CAACC,UAAUC,IAAI,EAAA;AACXC,QAAAA,eAAAA,EAAehB,QAAQiB,EAAE;QACzBC,IAAAA,EAAMhB,IAAAA;QACNiB,aAAa,EAAA,IAAA;AACbC,QAAAA,SAAAA,EAAWX,QAAAA,KAAaY,SAAAA;QACxBnB,IAAAA,EAAMO,QAAAA;QACNa,WAAAA,EAAaC,eAAAA,CAAgBvB,SAAS,aAAA,EAAe,KAAA,CAAA;QACrDwB,aAAAA,EAAeD,eAAAA,CAAgBvB,SAAS,eAAA,EAAiB,KAAA,CAAA;AACzDW,QAAAA,IAAAA,EAAMA,IAAAA,KAAS,OAAA,IAAWA,IAAAA,KAAS,OAAA,GAAUA,IAAAA,GAAOU,SAAAA;;AACpD,0BAAAI,GAAA,CAACX,UAAUY,cAAc,EAAA;wCACrBb,IAAA,CAACC,UAAUa,KAAK,EA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@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrimeDataView.js","sources":["../../../data/PrimeDataView.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useState } from 'react';\nimport { DataView } from 'primereact/dataview';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { numberProperty, recordArrayProperty, stringProperty } from '../properties';\nimport { Pagination } from './Pagination';\n\n/**\n * The `PrimeReact:dataView` component - the same rows a table would show, laid out as a list of cards.\n *\n * PrimeReact 11 reduced `DataView` to a layout shell: a root that tracks nothing but the list/grid\n * layout, and header, content, empty and footer slots. It no longer takes the rows, so it can no longer\n * template them, page them, or decide when the list is empty - all three now belong to the caller. The\n * adapter therefore renders the cards itself from the `titleField` and `descriptionField` properties,\n * shows the empty slot when there are no rows, and slices the rows for the page the user is on.\n *\n * Owning the page locally is the same trade {@link PrimePaginator} makes: a Scene element has nowhere to\n * record which page is showing, and a preview where paging does nothing would be worse than one where it\n * works but is forgotten on reload.\n */\nexport function PrimeDataView({ element }: RegisteredComponentProps) {\n const rows = recordArrayProperty(element, 'rows');\n const titleField = stringProperty(element, 'titleField', 'title');\n const descriptionField = stringProperty(element, 'descriptionField', 'description');\n const pageSize = numberProperty(element, 'pageSize');\n const [page, setPage] = useState(1);\n const visible = pageSize === undefined ? rows : rows.slice((page - 1) * pageSize, page * pageSize);\n\n return (\n <DataView.Root data-scene-id={element.id}>\n <DataView.Content>\n {visible.map((row, index) => (\n <div key={index} className='flex flex-col gap-1 p-3'>\n <span className='font-semibold'>{String(row[titleField] ?? '')}</span>\n <span className='text-sm opacity-75'>{String(row[descriptionField] ?? '')}</span>\n </div>\n ))}\n </DataView.Content>\n {rows.length === 0 && <DataView.Empty>{stringProperty(element, 'emptyMessage', 'No records found')}</DataView.Empty>}\n {pageSize !== undefined && (\n <DataView.Footer>\n <Pagination page={page} total={rows.length} itemsPerPage={pageSize} onPageChange={setPage} />\n </DataView.Footer>\n )}\n </DataView.Root>\n );\n}\n"],"names":["PrimeDataView","element","rows","recordArrayProperty","titleField","stringProperty","descriptionField","pageSize","numberProperty","page","setPage","useState","visible","undefined","slice","_jsxs","DataView","Root","data-scene-id","id","_jsx","Content","map","row","index","div","className","span","String","length","Empty","Footer","Pagination","total","itemsPerPage","onPageChange"],"mappings":";;;;;;AASA;;;;;;;;;;;;AAYC,IACM,SAASA,aAAAA,CAAc,EAAEC,OAAO,EAA4B,EAAA;IAC/D,MAAMC,IAAAA,GAAOC,oBAAoBF,OAAAA,EAAS,MAAA,CAAA;IAC1C,MAAMG,UAAAA,GAAaC,cAAAA,CAAeJ,OAAAA,EAAS,YAAA,EAAc,OAAA,CAAA;IACzD,MAAMK,gBAAAA,GAAmBD,cAAAA,CAAeJ,OAAAA,EAAS,kBAAA,EAAoB,aAAA,CAAA;IACrE,MAAMM,QAAAA,GAAWC,eAAeP,OAAAA,EAAS,UAAA,CAAA;AACzC,IAAA,MAAM,CAACQ,IAAAA,EAAMC,OAAAA,CAAQ,GAAGC,QAAAA,CAAS,CAAA,CAAA;AACjC,IAAA,MAAMC,OAAAA,GAAUL,QAAAA,KAAaM,SAAAA,GAAYX,IAAAA,GAAOA,IAAAA,CAAKY,KAAK,CAAEL,CAAAA,IAAAA,GAAO,CAAA,IAAKF,UAAUE,IAAAA,GAAOF,QAAAA,CAAAA;IAEzF,qBACIQ,IAAA,CAACC,SAASC,IAAI,EAAA;AAACC,QAAAA,eAAAA,EAAejB,QAAQkB,EAAE;;AACpC,0BAAAC,GAAA,CAACJ,SAASK,OAAO,EAAA;AACZT,gBAAAA,QAAAA,EAAAA,OAAAA,CAAQU,GAAG,CAAC,CAACC,GAAAA,EAAKC,sBACfT,IAAA,CAACU,KAAAA,EAAAA;wBAAgBC,SAAAA,EAAU,yBAAA;;0CACvBN,GAAA,CAACO,MAAAA,EAAAA;gCAAKD,SAAAA,EAAU,eAAA;0CAAiBE,MAAAA,CAAOL,GAAG,CAACnB,UAAAA,CAAW,IAAI,EAAA;;0CAC3DgB,GAAA,CAACO,MAAAA,EAAAA;gCAAKD,SAAAA,EAAU,oBAAA;0CAAsBE,MAAAA,CAAOL,GAAG,CAACjB,gBAAAA,CAAiB,IAAI,EAAA;;;AAFhEkB,qBAAAA,EAAAA,KAAAA,CAAAA;;AAMjBtB,YAAAA,IAAAA,CAAK2B,MAAM,KAAK,CAAA,kBAAKT,GAAA,CAACJ,SAASc,KAAK,EAAA;AAAEzB,gBAAAA,QAAAA,EAAAA,cAAAA,CAAeJ,SAAS,cAAA,EAAgB,kBAAA;;YAC9EM,QAAAA,KAAaM,SAAAA,kBACVO,GAAA,CAACJ,QAAAA,CAASe,MAAM,EAAA;AACZ,gBAAA,QAAA,gBAAAX,GAAA,CAACY,UAAAA,EAAAA;oBAAWvB,IAAAA,EAAMA,IAAAA;AAAMwB,oBAAAA,KAAAA,EAAO/B,KAAK2B,MAAM;oBAAEK,YAAAA,EAAc3B,QAAAA;oBAAU4B,YAAAA,EAAczB;;;;;AAKtG
|
|
1
|
+
{"version":3,"file":"PrimeDataView.js","sources":["../../../data/PrimeDataView.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useState } from 'react';\nimport { DataView } from 'primereact/dataview';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { numberProperty, recordArrayProperty, stringProperty } from '../properties';\nimport { Pagination } from './Pagination';\n\n/**\n * The `PrimeReact:dataView` component - the same rows a table would show, laid out as a list of cards.\n *\n * PrimeReact 11 reduced `DataView` to a layout shell: a root that tracks nothing but the list/grid\n * layout, and header, content, empty and footer slots. It no longer takes the rows, so it can no longer\n * template them, page them, or decide when the list is empty - all three now belong to the caller. The\n * adapter therefore renders the cards itself from the `titleField` and `descriptionField` properties,\n * shows the empty slot when there are no rows, and slices the rows for the page the user is on.\n *\n * Owning the page locally is the same trade {@link PrimePaginator} makes: a Scene element has nowhere to\n * record which page is showing, and a preview where paging does nothing would be worse than one where it\n * works but is forgotten on reload.\n */\nexport function PrimeDataView({ element }: RegisteredComponentProps) {\n const rows = recordArrayProperty(element, 'rows');\n const titleField = stringProperty(element, 'titleField', 'title');\n const descriptionField = stringProperty(element, 'descriptionField', 'description');\n const pageSize = numberProperty(element, 'pageSize');\n const [page, setPage] = useState(1);\n const visible = pageSize === undefined ? rows : rows.slice((page - 1) * pageSize, page * pageSize);\n\n return (\n <DataView.Root data-scene-id={element.id}>\n <DataView.Content>\n {visible.map((row, index) => (\n <div key={index} className='flex flex-col gap-1 p-3'>\n <span className='font-semibold'>{String(row[titleField] ?? '')}</span>\n <span className='text-sm opacity-75'>{String(row[descriptionField] ?? '')}</span>\n </div>\n ))}\n </DataView.Content>\n {rows.length === 0 && <DataView.Empty>{stringProperty(element, 'emptyMessage', 'No records found')}</DataView.Empty>}\n {pageSize !== undefined && (\n <DataView.Footer>\n <Pagination page={page} total={rows.length} itemsPerPage={pageSize} onPageChange={setPage} />\n </DataView.Footer>\n )}\n </DataView.Root>\n );\n}\n"],"names":["PrimeDataView","element","rows","recordArrayProperty","titleField","stringProperty","descriptionField","pageSize","numberProperty","page","setPage","useState","visible","undefined","slice","_jsxs","DataView","Root","data-scene-id","id","_jsx","Content","map","row","index","div","className","span","String","length","Empty","Footer","Pagination","total","itemsPerPage","onPageChange"],"mappings":";;;;;;AASA;;;;;;;;;;;;AAYC,IACM,SAASA,aAAAA,CAAc,EAAEC,OAAO,EAA4B,EAAA;IAC/D,MAAMC,IAAAA,GAAOC,oBAAoBF,OAAAA,EAAS,MAAA,CAAA;IAC1C,MAAMG,UAAAA,GAAaC,cAAAA,CAAeJ,OAAAA,EAAS,YAAA,EAAc,OAAA,CAAA;IACzD,MAAMK,gBAAAA,GAAmBD,cAAAA,CAAeJ,OAAAA,EAAS,kBAAA,EAAoB,aAAA,CAAA;IACrE,MAAMM,QAAAA,GAAWC,eAAeP,OAAAA,EAAS,UAAA,CAAA;AACzC,IAAA,MAAM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