@cratis/scene.blueprint.default 4.31.0 → 4.32.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/ComponentName.ts +12 -0
- package/defaultBlueprint.ts +2 -1
- package/defaultBlueprintComponentMetadata.ts +2 -0
- package/defaultBlueprintComponents.ts +5 -0
- package/dist/cjs/ComponentName.js +4 -0
- package/dist/cjs/ComponentName.js.map +1 -1
- package/dist/cjs/defaultBlueprint.js +9 -5
- package/dist/cjs/defaultBlueprint.js.map +1 -1
- package/dist/cjs/defaultBlueprintComponentMetadata.js +8 -0
- package/dist/cjs/defaultBlueprintComponentMetadata.js.map +1 -1
- package/dist/cjs/defaultBlueprintComponents.js +13 -1
- package/dist/cjs/defaultBlueprintComponents.js.map +1 -1
- package/dist/cjs/foundation/ActionButton.js +33 -0
- package/dist/cjs/foundation/ActionButton.js.map +1 -0
- package/dist/cjs/foundation/ComponentState.js +42 -0
- package/dist/cjs/foundation/ComponentState.js.map +1 -0
- package/dist/cjs/foundation/EmptyState.js +31 -0
- package/dist/cjs/foundation/EmptyState.js.map +1 -0
- package/dist/cjs/foundation/FoundationIcon.js +58 -0
- package/dist/cjs/foundation/FoundationIcon.js.map +1 -0
- package/dist/cjs/foundation/FoundationStates.js +62 -0
- package/dist/cjs/foundation/FoundationStates.js.map +1 -0
- package/dist/cjs/foundation/PermissionRule.js +22 -0
- package/dist/cjs/foundation/PermissionRule.js.map +1 -0
- package/dist/cjs/foundation/StatCard.js +61 -0
- package/dist/cjs/foundation/StatCard.js.map +1 -0
- package/dist/cjs/foundation/StateFrame.js +200 -0
- package/dist/cjs/foundation/StateFrame.js.map +1 -0
- package/dist/cjs/foundation/StatusChip.js +64 -0
- package/dist/cjs/foundation/StatusChip.js.map +1 -0
- package/dist/cjs/foundation/TrendChip.js +93 -0
- package/dist/cjs/foundation/TrendChip.js.map +1 -0
- package/dist/cjs/foundation/formatting.js +85 -0
- package/dist/cjs/foundation/formatting.js.map +1 -0
- package/dist/cjs/foundation/foundationComponentMetadata.js +41 -0
- package/dist/cjs/foundation/foundationComponentMetadata.js.map +1 -0
- package/dist/cjs/foundation/foundationDescriptors.js +232 -0
- package/dist/cjs/foundation/foundationDescriptors.js.map +1 -0
- package/dist/cjs/foundation/foundationSamples.js +71 -0
- package/dist/cjs/foundation/foundationSamples.js.map +1 -0
- package/dist/cjs/foundation/foundationStrings.js +105 -0
- package/dist/cjs/foundation/foundationStrings.js.map +1 -0
- package/dist/cjs/index.js +52 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/themes/dark.js +9 -1
- package/dist/cjs/themes/dark.js.map +1 -1
- package/dist/cjs/themes/light.js +10 -2
- package/dist/cjs/themes/light.js.map +1 -1
- package/dist/esm/ComponentName.d.ts +5 -1
- package/dist/esm/ComponentName.d.ts.map +1 -1
- package/dist/esm/ComponentName.js +4 -0
- package/dist/esm/ComponentName.js.map +1 -1
- package/dist/esm/defaultBlueprint.d.ts.map +1 -1
- package/dist/esm/defaultBlueprint.js +9 -5
- package/dist/esm/defaultBlueprint.js.map +1 -1
- package/dist/esm/defaultBlueprintComponentMetadata.d.ts.map +1 -1
- package/dist/esm/defaultBlueprintComponentMetadata.js +8 -0
- package/dist/esm/defaultBlueprintComponentMetadata.js.map +1 -1
- package/dist/esm/defaultBlueprintComponents.d.ts.map +1 -1
- package/dist/esm/defaultBlueprintComponents.js +13 -1
- package/dist/esm/defaultBlueprintComponents.js.map +1 -1
- package/dist/esm/foundation/ActionButton.d.ts +13 -0
- package/dist/esm/foundation/ActionButton.d.ts.map +1 -0
- package/dist/esm/foundation/ActionButton.js +31 -0
- package/dist/esm/foundation/ActionButton.js.map +1 -0
- package/dist/esm/foundation/ComponentState.d.ts +12 -0
- package/dist/esm/foundation/ComponentState.d.ts.map +1 -0
- package/dist/esm/foundation/ComponentState.js +38 -0
- package/dist/esm/foundation/ComponentState.js.map +1 -0
- package/dist/esm/foundation/EmptyState.d.ts +3 -0
- package/dist/esm/foundation/EmptyState.d.ts.map +1 -0
- package/dist/esm/foundation/EmptyState.js +29 -0
- package/dist/esm/foundation/EmptyState.js.map +1 -0
- package/dist/esm/foundation/Foundation.stories.d.ts +21 -0
- package/dist/esm/foundation/Foundation.stories.d.ts.map +1 -0
- package/dist/esm/foundation/Foundation.stories.js +18 -0
- package/dist/esm/foundation/Foundation.stories.js.map +1 -0
- package/dist/esm/foundation/FoundationIcon.d.ts +7 -0
- package/dist/esm/foundation/FoundationIcon.d.ts.map +1 -0
- package/dist/esm/foundation/FoundationIcon.js +55 -0
- package/dist/esm/foundation/FoundationIcon.js.map +1 -0
- package/dist/esm/foundation/FoundationStates.d.ts +8 -0
- package/dist/esm/foundation/FoundationStates.d.ts.map +1 -0
- package/dist/esm/foundation/FoundationStates.js +60 -0
- package/dist/esm/foundation/FoundationStates.js.map +1 -0
- package/dist/esm/foundation/PermissionRule.d.ts +8 -0
- package/dist/esm/foundation/PermissionRule.d.ts.map +1 -0
- package/dist/esm/foundation/PermissionRule.js +19 -0
- package/dist/esm/foundation/PermissionRule.js.map +1 -0
- package/dist/esm/foundation/StatCard.d.ts +3 -0
- package/dist/esm/foundation/StatCard.d.ts.map +1 -0
- package/dist/esm/foundation/StatCard.js +59 -0
- package/dist/esm/foundation/StatCard.js.map +1 -0
- package/dist/esm/foundation/StateFrame.d.ts +15 -0
- package/dist/esm/foundation/StateFrame.d.ts.map +1 -0
- package/dist/esm/foundation/StateFrame.js +197 -0
- package/dist/esm/foundation/StateFrame.js.map +1 -0
- package/dist/esm/foundation/StatusChip.d.ts +13 -0
- package/dist/esm/foundation/StatusChip.d.ts.map +1 -0
- package/dist/esm/foundation/StatusChip.js +59 -0
- package/dist/esm/foundation/StatusChip.js.map +1 -0
- package/dist/esm/foundation/TrendChip.d.ts +18 -0
- package/dist/esm/foundation/TrendChip.d.ts.map +1 -0
- package/dist/esm/foundation/TrendChip.js +88 -0
- package/dist/esm/foundation/TrendChip.js.map +1 -0
- package/dist/esm/foundation/formatting.d.ts +13 -0
- package/dist/esm/foundation/formatting.d.ts.map +1 -0
- package/dist/esm/foundation/formatting.js +78 -0
- package/dist/esm/foundation/formatting.js.map +1 -0
- package/dist/esm/foundation/foundationComponentMetadata.d.ts +3 -0
- package/dist/esm/foundation/foundationComponentMetadata.d.ts.map +1 -0
- package/dist/esm/foundation/foundationComponentMetadata.js +39 -0
- package/dist/esm/foundation/foundationComponentMetadata.js.map +1 -0
- package/dist/esm/foundation/foundationDescriptors.d.ts +6 -0
- package/dist/esm/foundation/foundationDescriptors.d.ts.map +1 -0
- package/dist/esm/foundation/foundationDescriptors.js +227 -0
- package/dist/esm/foundation/foundationDescriptors.js.map +1 -0
- package/dist/esm/foundation/foundationSamples.d.ts +10 -0
- package/dist/esm/foundation/foundationSamples.d.ts.map +1 -0
- package/dist/esm/foundation/foundationSamples.js +68 -0
- package/dist/esm/foundation/foundationSamples.js.map +1 -0
- package/dist/esm/foundation/foundationStrings.d.ts +78 -0
- package/dist/esm/foundation/foundationStrings.d.ts.map +1 -0
- package/dist/esm/foundation/foundationStrings.js +101 -0
- package/dist/esm/foundation/foundationStrings.js.map +1 -0
- package/dist/esm/foundation/index.d.ts +16 -0
- package/dist/esm/foundation/index.d.ts.map +1 -0
- package/dist/esm/foundation/index.js +16 -0
- package/dist/esm/foundation/index.js.map +1 -0
- package/dist/esm/gallery/widgets.js +1 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +15 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/themes/dark.d.ts.map +1 -1
- package/dist/esm/themes/dark.js +9 -1
- package/dist/esm/themes/dark.js.map +1 -1
- package/dist/esm/themes/light.d.ts.map +1 -1
- package/dist/esm/themes/light.js +10 -2
- package/dist/esm/themes/light.js.map +1 -1
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/foundation/ActionButton.tsx +39 -0
- package/foundation/ComponentState.ts +53 -0
- package/foundation/EmptyState.tsx +22 -0
- package/foundation/Foundation.stories.tsx +30 -0
- package/foundation/FoundationIcon.tsx +49 -0
- package/foundation/FoundationStates.tsx +46 -0
- package/foundation/PermissionRule.ts +26 -0
- package/foundation/StatCard.tsx +44 -0
- package/foundation/StateFrame.tsx +126 -0
- package/foundation/StatusChip.tsx +51 -0
- package/foundation/TrendChip.tsx +78 -0
- package/foundation/formatting.ts +69 -0
- package/foundation/foundationComponentMetadata.ts +17 -0
- package/foundation/foundationDescriptors.ts +119 -0
- package/foundation/foundationSamples.ts +44 -0
- package/foundation/foundationStrings.ts +112 -0
- package/foundation/index.ts +18 -0
- package/index.ts +1 -0
- package/package.json +9 -8
- package/shell/layout.css +241 -0
- package/themes/dark.ts +8 -0
- package/themes/light.ts +9 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dark.js","sources":["../../../themes/dark.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 { blueprintThemeCompatibility } from './blueprintThemeCompatibility';\n\n/**\n * The dark theme the shell ships with.\n *\n * Deliberately the same ten token names as the light theme and nothing more. A dark theme that introduced\n * extra tokens would work only for the parts of the shell written after it existed - the token set is the\n * contract, and both themes filling it identically is what makes switching between them a swap rather than\n * a re-render with holes in it.\n */\nexport const darkTheme: Theme = {\n name: 'Scene Default Dark',\n compatibleWith: blueprintThemeCompatibility,\n isDark: true,\n author: 'Cratis',\n authorUrl: 'https://cratis.io',\n license: 'MIT',\n description: 'The default dark palette: a deep slate ramp with a lifted indigo accent.',\n tokens: {\n 'primary.color': '#818cf8',\n 'primary.contrastColor': '#10131f',\n 'surface.background': '#0f1117',\n 'surface.card': '#171a23',\n 'surface.border': '#262a36',\n 'surface.hover': '#1f2431',\n 'surface.overlay': '#1c2030',\n 'text.color': '#e6e8ef',\n 'text.mutedColor': '#9aa1b1',\n 'highlight.background': '#232a45',\n 'highlight.color': '#c7ccff',\n 'content.borderRadius': '0.5rem',\n 'focus.ring': '0 0 0 2px rgb(129 140 248 / 0.45)',\n },\n};\n"],"names":["darkTheme","name","compatibleWith","blueprintThemeCompatibility","isDark","author","authorUrl","license","description","tokens"],"mappings":";;;;AAAA;AACA;AAKA;;;;;;;UAQaA,SAAAA,GAAmB;IAC5BC,IAAAA,EAAM,oBAAA;IACNC,cAAAA,EAAgBC,uDAAAA;IAChBC,MAAAA,EAAQ,IAAA;IACRC,MAAAA,EAAQ,QAAA;IACRC,SAAAA,EAAW,mBAAA;IACXC,OAAAA,EAAS,KAAA;IACTC,WAAAA,EAAa,0EAAA;IACbC,MAAAA,EAAQ;QACJ,eAAA,EAAiB,SAAA;QACjB,uBAAA,EAAyB,SAAA;QACzB,oBAAA,EAAsB,SAAA;QACtB,cAAA,EAAgB,SAAA;QAChB,gBAAA,EAAkB,SAAA;QAClB,eAAA,EAAiB,SAAA;QACjB,iBAAA,EAAmB,SAAA;QACnB,YAAA,EAAc,SAAA;QACd,iBAAA,EAAmB,SAAA;QACnB,sBAAA,EAAwB,SAAA;QACxB,iBAAA,EAAmB,SAAA;QACnB,sBAAA,EAAwB,QAAA;QACxB,YAAA,EAAc;
|
|
1
|
+
{"version":3,"file":"dark.js","sources":["../../../themes/dark.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 { blueprintThemeCompatibility } from './blueprintThemeCompatibility';\n\n/**\n * The dark theme the shell ships with.\n *\n * Deliberately the same ten token names as the light theme and nothing more. A dark theme that introduced\n * extra tokens would work only for the parts of the shell written after it existed - the token set is the\n * contract, and both themes filling it identically is what makes switching between them a swap rather than\n * a re-render with holes in it.\n */\nexport const darkTheme: Theme = {\n name: 'Scene Default Dark',\n compatibleWith: blueprintThemeCompatibility,\n isDark: true,\n author: 'Cratis',\n authorUrl: 'https://cratis.io',\n license: 'MIT',\n description: 'The default dark palette: a deep slate ramp with a lifted indigo accent.',\n tokens: {\n 'primary.color': '#818cf8',\n 'primary.contrastColor': '#10131f',\n 'surface.background': '#0f1117',\n 'surface.card': '#171a23',\n 'surface.border': '#262a36',\n 'surface.hover': '#1f2431',\n 'surface.overlay': '#1c2030',\n 'text.color': '#e6e8ef',\n 'text.mutedColor': '#9aa1b1',\n 'highlight.background': '#232a45',\n 'highlight.color': '#c7ccff',\n 'content.borderRadius': '0.5rem',\n 'focus.ring': '0 0 0 2px rgb(129 140 248 / 0.45)',\n 'status.successColor': '#86efac',\n 'status.successBackground': '#14301f',\n 'status.warningColor': '#fcd34d',\n 'status.warningBackground': '#33290f',\n 'status.dangerColor': '#fca5a5',\n 'status.dangerBackground': '#3a1616',\n 'status.infoColor': '#93c5fd',\n 'status.infoBackground': '#162a4a',\n },\n};\n"],"names":["darkTheme","name","compatibleWith","blueprintThemeCompatibility","isDark","author","authorUrl","license","description","tokens"],"mappings":";;;;AAAA;AACA;AAKA;;;;;;;UAQaA,SAAAA,GAAmB;IAC5BC,IAAAA,EAAM,oBAAA;IACNC,cAAAA,EAAgBC,uDAAAA;IAChBC,MAAAA,EAAQ,IAAA;IACRC,MAAAA,EAAQ,QAAA;IACRC,SAAAA,EAAW,mBAAA;IACXC,OAAAA,EAAS,KAAA;IACTC,WAAAA,EAAa,0EAAA;IACbC,MAAAA,EAAQ;QACJ,eAAA,EAAiB,SAAA;QACjB,uBAAA,EAAyB,SAAA;QACzB,oBAAA,EAAsB,SAAA;QACtB,cAAA,EAAgB,SAAA;QAChB,gBAAA,EAAkB,SAAA;QAClB,eAAA,EAAiB,SAAA;QACjB,iBAAA,EAAmB,SAAA;QACnB,YAAA,EAAc,SAAA;QACd,iBAAA,EAAmB,SAAA;QACnB,sBAAA,EAAwB,SAAA;QACxB,iBAAA,EAAmB,SAAA;QACnB,sBAAA,EAAwB,QAAA;QACxB,YAAA,EAAc,mCAAA;QACd,qBAAA,EAAuB,SAAA;QACvB,0BAAA,EAA4B,SAAA;QAC5B,qBAAA,EAAuB,SAAA;QACvB,0BAAA,EAA4B,SAAA;QAC5B,oBAAA,EAAsB,SAAA;QACtB,yBAAA,EAA2B,SAAA;QAC3B,kBAAA,EAAoB,SAAA;QACpB,uBAAA,EAAyB;AAC7B;AACJ;;"}
|
package/dist/cjs/themes/light.js
CHANGED
|
@@ -31,11 +31,19 @@ var blueprintThemeCompatibility = require('./blueprintThemeCompatibility.js');
|
|
|
31
31
|
'surface.hover': '#eceef1',
|
|
32
32
|
'surface.overlay': '#ffffff',
|
|
33
33
|
'text.color': '#1f2430',
|
|
34
|
-
'text.mutedColor': '#
|
|
34
|
+
'text.mutedColor': '#5b6472',
|
|
35
35
|
'highlight.background': '#eef2ff',
|
|
36
36
|
'highlight.color': '#3730a3',
|
|
37
37
|
'content.borderRadius': '0.5rem',
|
|
38
|
-
'focus.ring': '0 0 0 2px rgb(79 70 229 / 0.4)'
|
|
38
|
+
'focus.ring': '0 0 0 2px rgb(79 70 229 / 0.4)',
|
|
39
|
+
'status.successColor': '#166534',
|
|
40
|
+
'status.successBackground': '#dcfce7',
|
|
41
|
+
'status.warningColor': '#854d0e',
|
|
42
|
+
'status.warningBackground': '#fef3c7',
|
|
43
|
+
'status.dangerColor': '#991b1b',
|
|
44
|
+
'status.dangerBackground': '#fee2e2',
|
|
45
|
+
'status.infoColor': '#1e40af',
|
|
46
|
+
'status.infoBackground': '#dbeafe'
|
|
39
47
|
}
|
|
40
48
|
};
|
|
41
49
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"light.js","sources":["../../../themes/light.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 { blueprintThemeCompatibility } from './blueprintThemeCompatibility';\n\n/**\n * The light theme the shell ships with.\n *\n * The palette is original to Cratis - a neutral grey ramp with an indigo accent - rather than adopted from\n * any existing preset, which is why `author` says so rather than being left blank. A theme with empty\n * attribution reads as \"nobody has checked\", and once a palette is lifted from somewhere else without its\n * credit, nobody can tell afterwards which of the two it was.\n *\n * The token set is the shell's whole styling contract: every rule in `layout.css` resolves back to one of\n * these ten names. A theme that defines them defines the entire shell.\n */\nexport const lightTheme: Theme = {\n name: 'Scene Default Light',\n compatibleWith: blueprintThemeCompatibility,\n isDark: false,\n author: 'Cratis',\n authorUrl: 'https://cratis.io',\n license: 'MIT',\n description: 'The default light palette: a neutral grey ramp with an indigo accent.',\n tokens: {\n 'primary.color': '#4f46e5',\n 'primary.contrastColor': '#ffffff',\n 'surface.background': '#f4f5f7',\n 'surface.card': '#ffffff',\n 'surface.border': '#e2e5e9',\n 'surface.hover': '#eceef1',\n 'surface.overlay': '#ffffff',\n 'text.color': '#1f2430',\n 'text.mutedColor': '#
|
|
1
|
+
{"version":3,"file":"light.js","sources":["../../../themes/light.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 { blueprintThemeCompatibility } from './blueprintThemeCompatibility';\n\n/**\n * The light theme the shell ships with.\n *\n * The palette is original to Cratis - a neutral grey ramp with an indigo accent - rather than adopted from\n * any existing preset, which is why `author` says so rather than being left blank. A theme with empty\n * attribution reads as \"nobody has checked\", and once a palette is lifted from somewhere else without its\n * credit, nobody can tell afterwards which of the two it was.\n *\n * The token set is the shell's whole styling contract: every rule in `layout.css` resolves back to one of\n * these ten names. A theme that defines them defines the entire shell.\n */\nexport const lightTheme: Theme = {\n name: 'Scene Default Light',\n compatibleWith: blueprintThemeCompatibility,\n isDark: false,\n author: 'Cratis',\n authorUrl: 'https://cratis.io',\n license: 'MIT',\n description: 'The default light palette: a neutral grey ramp with an indigo accent.',\n tokens: {\n 'primary.color': '#4f46e5',\n 'primary.contrastColor': '#ffffff',\n 'surface.background': '#f4f5f7',\n 'surface.card': '#ffffff',\n 'surface.border': '#e2e5e9',\n 'surface.hover': '#eceef1',\n 'surface.overlay': '#ffffff',\n 'text.color': '#1f2430',\n 'text.mutedColor': '#5b6472',\n 'highlight.background': '#eef2ff',\n 'highlight.color': '#3730a3',\n 'content.borderRadius': '0.5rem',\n 'focus.ring': '0 0 0 2px rgb(79 70 229 / 0.4)',\n 'status.successColor': '#166534',\n 'status.successBackground': '#dcfce7',\n 'status.warningColor': '#854d0e',\n 'status.warningBackground': '#fef3c7',\n 'status.dangerColor': '#991b1b',\n 'status.dangerBackground': '#fee2e2',\n 'status.infoColor': '#1e40af',\n 'status.infoBackground': '#dbeafe',\n },\n};\n"],"names":["lightTheme","name","compatibleWith","blueprintThemeCompatibility","isDark","author","authorUrl","license","description","tokens"],"mappings":";;;;AAAA;AACA;AAKA;;;;;;;;;;UAWaA,UAAAA,GAAoB;IAC7BC,IAAAA,EAAM,qBAAA;IACNC,cAAAA,EAAgBC,uDAAAA;IAChBC,MAAAA,EAAQ,KAAA;IACRC,MAAAA,EAAQ,QAAA;IACRC,SAAAA,EAAW,mBAAA;IACXC,OAAAA,EAAS,KAAA;IACTC,WAAAA,EAAa,uEAAA;IACbC,MAAAA,EAAQ;QACJ,eAAA,EAAiB,SAAA;QACjB,uBAAA,EAAyB,SAAA;QACzB,oBAAA,EAAsB,SAAA;QACtB,cAAA,EAAgB,SAAA;QAChB,gBAAA,EAAkB,SAAA;QAClB,eAAA,EAAiB,SAAA;QACjB,iBAAA,EAAmB,SAAA;QACnB,YAAA,EAAc,SAAA;QACd,iBAAA,EAAmB,SAAA;QACnB,sBAAA,EAAwB,SAAA;QACxB,iBAAA,EAAmB,SAAA;QACnB,sBAAA,EAAwB,QAAA;QACxB,YAAA,EAAc,gCAAA;QACd,qBAAA,EAAuB,SAAA;QACvB,0BAAA,EAA4B,SAAA;QAC5B,qBAAA,EAAuB,SAAA;QACvB,0BAAA,EAA4B,SAAA;QAC5B,oBAAA,EAAsB,SAAA;QACtB,yBAAA,EAA2B,SAAA;QAC3B,kBAAA,EAAoB,SAAA;QACpB,uBAAA,EAAyB;AAC7B;AACJ;;"}
|
|
@@ -14,6 +14,10 @@ export declare enum ComponentName {
|
|
|
14
14
|
Logo = "logo",
|
|
15
15
|
UserMenu = "userMenu",
|
|
16
16
|
ThemeSwitcher = "themeSwitcher",
|
|
17
|
-
LayoutModeSwitcher = "layoutModeSwitcher"
|
|
17
|
+
LayoutModeSwitcher = "layoutModeSwitcher",
|
|
18
|
+
EmptyState = "emptyState",
|
|
19
|
+
StatCard = "statCard",
|
|
20
|
+
TrendChip = "trendChip",
|
|
21
|
+
StatusChip = "statusChip"
|
|
18
22
|
}
|
|
19
23
|
//# sourceMappingURL=ComponentName.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComponentName.d.ts","sourceRoot":"","sources":["../../ComponentName.ts"],"names":[],"mappings":"AAWA,oBAAY,aAAa;IAErB,QAAQ,aAAa;IAGrB,aAAa,kBAAkB;IAG/B,MAAM,WAAW;IAGjB,OAAO,YAAY;IAGnB,IAAI,SAAS;IAGb,QAAQ,aAAa;IAGrB,UAAU,eAAe;IAGzB,MAAM,WAAW;IAGjB,UAAU,eAAe;IAGzB,WAAW,gBAAgB;IAG3B,UAAU,eAAe;IAGzB,IAAI,SAAS;IAGb,IAAI,SAAS;IAGb,QAAQ,aAAa;IAGrB,aAAa,kBAAkB;IAG/B,kBAAkB,uBAAuB;
|
|
1
|
+
{"version":3,"file":"ComponentName.d.ts","sourceRoot":"","sources":["../../ComponentName.ts"],"names":[],"mappings":"AAWA,oBAAY,aAAa;IAErB,QAAQ,aAAa;IAGrB,aAAa,kBAAkB;IAG/B,MAAM,WAAW;IAGjB,OAAO,YAAY;IAGnB,IAAI,SAAS;IAGb,QAAQ,aAAa;IAGrB,UAAU,eAAe;IAGzB,MAAM,WAAW;IAGjB,UAAU,eAAe;IAGzB,WAAW,gBAAgB;IAG3B,UAAU,eAAe;IAGzB,IAAI,SAAS;IAGb,IAAI,SAAS;IAGb,QAAQ,aAAa;IAGrB,aAAa,kBAAkB;IAG/B,kBAAkB,uBAAuB;IAGzC,UAAU,eAAe;IAGzB,QAAQ,aAAa;IAGrB,SAAS,cAAc;IAGvB,UAAU,eAAe;CAC5B"}
|
|
@@ -24,6 +24,10 @@
|
|
|
24
24
|
/** The signed-in user's avatar and menu. */ ComponentName["UserMenu"] = "userMenu";
|
|
25
25
|
/** Switches between the themes a host offers. */ ComponentName["ThemeSwitcher"] = "themeSwitcher";
|
|
26
26
|
/** Switches between the layout modes. */ ComponentName["LayoutModeSwitcher"] = "layoutModeSwitcher";
|
|
27
|
+
/** An icon, a headline, a hint and one primary action: what a region says when it has nothing to show. */ ComponentName["EmptyState"] = "emptyState";
|
|
28
|
+
/** One key figure with its label, trend and comparison period. */ ComponentName["StatCard"] = "statCard";
|
|
29
|
+
/** A change drawn as a direction, a magnitude and whether it is good. */ ComponentName["TrendChip"] = "trendChip";
|
|
30
|
+
/** A status as a semantic color, an icon and its text. */ ComponentName["StatusChip"] = "statusChip";
|
|
27
31
|
return ComponentName;
|
|
28
32
|
}({});
|
|
29
33
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComponentName.js","sources":["../../ComponentName.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\n/**\n * The bare names this package declares components under.\n *\n * A page template writes a bare name and `resolveComponentName` decides which active package wins it, so\n * these names are public API: renaming one breaks every template that referenced it, in this package and\n * in anyone else's. Keeping them in one enum means the manifest, the registry and every template\n * reference the same symbol, and the specs can prove all three agree rather than hoping they do.\n */\nexport enum ComponentName {\n /** The application shell - topbar, sidebar, breadcrumb, content, footer and an optional right panel. */\n AppShell = 'appShell',\n\n /** The chrome-less shell - content, an optional branding aside, and the configurator. */\n FullPageShell = 'fullPageShell',\n\n /** The fixed strip across the top of the application shell. */\n Topbar = 'topbar',\n\n /** The sidebar's own chrome, inside the shell-positioned panel. */\n Sidebar = 'sidebar',\n\n /** A navigation list. */\n Menu = 'menu',\n\n /** One entry in a navigation list, optionally with a submenu. */\n MenuItem = 'menuItem',\n\n /** The trail above the content. */\n Breadcrumb = 'breadcrumb',\n\n /** The strip below the content. */\n Footer = 'footer',\n\n /** The inspector panel down the right-hand edge. */\n RightPanel = 'rightPanel',\n\n /** The floating configurator: color scheme, layout mode, menu theme and theme. */\n ConfigPanel = 'configPanel',\n\n /** A screen's title, subtitle and actions. */\n PageHeader = 'pageHeader',\n\n /** The scrim behind a floating sidebar, which also closes it. */\n Mask = 'mask',\n\n /** The brand mark. */\n Logo = 'logo',\n\n /** The signed-in user's avatar and menu. */\n UserMenu = 'userMenu',\n\n /** Switches between the themes a host offers. */\n ThemeSwitcher = 'themeSwitcher',\n\n /** Switches between the layout modes. */\n LayoutModeSwitcher = 'layoutModeSwitcher',\n}\n"],"names":["ComponentName"],"mappings":"AAAA;AACA;AAEA;;;;;;;IAQO,IAAKA,aAAAA,iBAAAA,SAAAA,aAAAA,EAAAA;6GAC8F,aAAA,CAAA,UAAA,CAAA,GAAA,UAAA;8FAGf,aAAA,CAAA,eAAA,CAAA,GAAA,eAAA;oEAG1B,aAAA,CAAA,QAAA,CAAA,GAAA,QAAA;wEAGI,aAAA,CAAA,SAAA,CAAA,GAAA,SAAA;8BAG1C,aAAA,CAAA,MAAA,CAAA,GAAA,MAAA;sEAGwC,aAAA,CAAA,UAAA,CAAA,GAAA,UAAA;wCAG9B,aAAA,CAAA,YAAA,CAAA,GAAA,YAAA;wCAGA,aAAA,CAAA,QAAA,CAAA,GAAA,QAAA;yDAGiB,aAAA,CAAA,YAAA,CAAA,GAAA,YAAA;uFAG8B,aAAA,CAAA,aAAA,CAAA,GAAA,aAAA;mDAGpC,aAAA,CAAA,YAAA,CAAA,GAAA,YAAA;sEAGmB,aAAA,CAAA,MAAA,CAAA,GAAA,MAAA;2BAG3C,aAAA,CAAA,MAAA,CAAA,GAAA,MAAA;iDAGsB,aAAA,CAAA,UAAA,CAAA,GAAA,UAAA;sDAGK,aAAA,CAAA,eAAA,CAAA,GAAA,eAAA;8CAGR,aAAA,CAAA,oBAAA,CAAA,GAAA,oBAAA;
|
|
1
|
+
{"version":3,"file":"ComponentName.js","sources":["../../ComponentName.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\n/**\n * The bare names this package declares components under.\n *\n * A page template writes a bare name and `resolveComponentName` decides which active package wins it, so\n * these names are public API: renaming one breaks every template that referenced it, in this package and\n * in anyone else's. Keeping them in one enum means the manifest, the registry and every template\n * reference the same symbol, and the specs can prove all three agree rather than hoping they do.\n */\nexport enum ComponentName {\n /** The application shell - topbar, sidebar, breadcrumb, content, footer and an optional right panel. */\n AppShell = 'appShell',\n\n /** The chrome-less shell - content, an optional branding aside, and the configurator. */\n FullPageShell = 'fullPageShell',\n\n /** The fixed strip across the top of the application shell. */\n Topbar = 'topbar',\n\n /** The sidebar's own chrome, inside the shell-positioned panel. */\n Sidebar = 'sidebar',\n\n /** A navigation list. */\n Menu = 'menu',\n\n /** One entry in a navigation list, optionally with a submenu. */\n MenuItem = 'menuItem',\n\n /** The trail above the content. */\n Breadcrumb = 'breadcrumb',\n\n /** The strip below the content. */\n Footer = 'footer',\n\n /** The inspector panel down the right-hand edge. */\n RightPanel = 'rightPanel',\n\n /** The floating configurator: color scheme, layout mode, menu theme and theme. */\n ConfigPanel = 'configPanel',\n\n /** A screen's title, subtitle and actions. */\n PageHeader = 'pageHeader',\n\n /** The scrim behind a floating sidebar, which also closes it. */\n Mask = 'mask',\n\n /** The brand mark. */\n Logo = 'logo',\n\n /** The signed-in user's avatar and menu. */\n UserMenu = 'userMenu',\n\n /** Switches between the themes a host offers. */\n ThemeSwitcher = 'themeSwitcher',\n\n /** Switches between the layout modes. */\n LayoutModeSwitcher = 'layoutModeSwitcher',\n\n /** An icon, a headline, a hint and one primary action: what a region says when it has nothing to show. */\n EmptyState = 'emptyState',\n\n /** One key figure with its label, trend and comparison period. */\n StatCard = 'statCard',\n\n /** A change drawn as a direction, a magnitude and whether it is good. */\n TrendChip = 'trendChip',\n\n /** A status as a semantic color, an icon and its text. */\n StatusChip = 'statusChip',\n}\n"],"names":["ComponentName"],"mappings":"AAAA;AACA;AAEA;;;;;;;IAQO,IAAKA,aAAAA,iBAAAA,SAAAA,aAAAA,EAAAA;6GAC8F,aAAA,CAAA,UAAA,CAAA,GAAA,UAAA;8FAGf,aAAA,CAAA,eAAA,CAAA,GAAA,eAAA;oEAG1B,aAAA,CAAA,QAAA,CAAA,GAAA,QAAA;wEAGI,aAAA,CAAA,SAAA,CAAA,GAAA,SAAA;8BAG1C,aAAA,CAAA,MAAA,CAAA,GAAA,MAAA;sEAGwC,aAAA,CAAA,UAAA,CAAA,GAAA,UAAA;wCAG9B,aAAA,CAAA,YAAA,CAAA,GAAA,YAAA;wCAGA,aAAA,CAAA,QAAA,CAAA,GAAA,QAAA;yDAGiB,aAAA,CAAA,YAAA,CAAA,GAAA,YAAA;uFAG8B,aAAA,CAAA,aAAA,CAAA,GAAA,aAAA;mDAGpC,aAAA,CAAA,YAAA,CAAA,GAAA,YAAA;sEAGmB,aAAA,CAAA,MAAA,CAAA,GAAA,MAAA;2BAG3C,aAAA,CAAA,MAAA,CAAA,GAAA,MAAA;iDAGsB,aAAA,CAAA,UAAA,CAAA,GAAA,UAAA;sDAGK,aAAA,CAAA,eAAA,CAAA,GAAA,eAAA;8CAGR,aAAA,CAAA,oBAAA,CAAA,GAAA,oBAAA;+GAGiE,aAAA,CAAA,YAAA,CAAA,GAAA,YAAA;uEAGxC,aAAA,CAAA,UAAA,CAAA,GAAA,UAAA;8EAGO,aAAA,CAAA,WAAA,CAAA,GAAA,WAAA;+DAGf,aAAA,CAAA,YAAA,CAAA,GAAA,YAAA;AA1DhDA,IAAAA,OAAAA,aAAAA;AA4DX,CAAA,CAAA,EAAA;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultBlueprint.d.ts","sourceRoot":"","sources":["../../defaultBlueprint.ts"],"names":[],"mappings":"AAGA,OAAO,EAAe,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAsB,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"defaultBlueprint.d.ts","sourceRoot":"","sources":["../../defaultBlueprint.ts"],"names":[],"mappings":"AAGA,OAAO,EAAe,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAsB,MAAM,qBAAqB,CAAC;AA6B7E,eAAO,MAAM,wBAAwB,EAAE,YAetC,CAAC;AAaF,eAAO,MAAM,gBAAgB,EAAE,kBAS9B,CAAC"}
|
|
@@ -2,7 +2,15 @@ import { PackageKind } from '@cratis/scene.model';
|
|
|
2
2
|
import { describeComponents } from '@cratis/scene.react';
|
|
3
3
|
import { ComponentName } from './ComponentName.js';
|
|
4
4
|
import { defaultBlueprintComponentMetadata } from './defaultBlueprintComponentMetadata.js';
|
|
5
|
+
import './foundation/ComponentState.js';
|
|
6
|
+
import 'react/jsx-runtime';
|
|
7
|
+
import { foundationDescriptors } from './foundation/foundationDescriptors.js';
|
|
8
|
+
import './foundation/foundationComponentMetadata.js';
|
|
9
|
+
import './foundation/foundationSamples.js';
|
|
5
10
|
import { defaultBlueprintComponents } from './defaultBlueprintComponents.js';
|
|
11
|
+
import { defaultBlueprintName } from './packageName.js';
|
|
12
|
+
import { defaultBlueprintThemes } from './themes/defaultBlueprintThemes.js';
|
|
13
|
+
import 'react';
|
|
6
14
|
import './gallery/elements.js';
|
|
7
15
|
import './gallery/navigation.js';
|
|
8
16
|
import { LayoutName } from './layouts/LayoutName.js';
|
|
@@ -10,10 +18,6 @@ import './layouts/shellComponents.js';
|
|
|
10
18
|
import './layouts/appShell.js';
|
|
11
19
|
import './layouts/fullPage.js';
|
|
12
20
|
import { defaultLayouts } from './layouts/defaultLayouts.js';
|
|
13
|
-
import { defaultBlueprintName } from './packageName.js';
|
|
14
|
-
import { defaultBlueprintThemes } from './themes/defaultBlueprintThemes.js';
|
|
15
|
-
import 'react/jsx-runtime';
|
|
16
|
-
import 'react';
|
|
17
21
|
import './gallery/nesting.js';
|
|
18
22
|
import './gallery/workspaceTemplates.js';
|
|
19
23
|
import './gallery/supportTemplates.js';
|
|
@@ -86,7 +90,7 @@ import './gallery/GalleryScreenPreview.js';
|
|
|
86
90
|
dialogTemplates: galleryDialogTemplates,
|
|
87
91
|
screens: galleryScreens,
|
|
88
92
|
themes: defaultBlueprintThemes,
|
|
89
|
-
descriptors: describeComponents(defaultBlueprintManifest.name,
|
|
93
|
+
descriptors: describeComponents(defaultBlueprintManifest.name, foundationDescriptors, defaultBlueprintComponentMetadata)
|
|
90
94
|
};
|
|
91
95
|
|
|
92
96
|
export { defaultBlueprint, defaultBlueprintManifest };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultBlueprint.js","sources":["../../defaultBlueprint.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 { PackageKind, ScenePackage } from '@cratis/scene.model';\nimport { ScenePackageBundle, describeComponents } from '@cratis/scene.react';\nimport { ComponentName } from './ComponentName';\nimport { defaultBlueprintComponentMetadata } from './defaultBlueprintComponentMetadata';\nimport { defaultBlueprintComponents } from './defaultBlueprintComponents';\nimport { galleryDialogTemplates, galleryScreenTemplates, galleryScreens } from './gallery';\nimport { LayoutName, defaultLayouts } from './layouts';\nimport { defaultBlueprintName } from './packageName';\nimport { defaultBlueprintThemes } from './themes';\n\n/**\n * The default blueprint's declaration.\n *\n * A blueprint is the package an application picks once to get a coherent shape: the {@link Layout}s that\n * are its base navigational look, the {@link ScreenTemplate}s and {@link DialogTemplate}s that go inside\n * them, the components that fill their slots, and the themes that color all of it. Picking the parts\n * separately is how an application ends up with a sidebar from one design language and a form from\n * another.\n *\n * The dependency list is what makes a blueprint honest about what it is built from. This one declares\n * PrimeReact - the shell's buttons, breadcrumb, overlay menu and drawer are PrimeReact 10 components - and\n * Cratis Components, which its screen templates fill their content with. A profile that activated this\n * blueprint without them would render a shell whose every control was a dashed red placeholder, and\n * `resolvePackageDependencies` exists to catch that when the profile is configured rather than when\n * someone opens the page.\n *\n * `layouts` lists only true application shells. A dashboard, a CRUD list or a sign-in screen is a screen\n * template, not a layout, and is listed as one.\n */\nexport const defaultBlueprintManifest: ScenePackage = {\n name: defaultBlueprintName,\n version: '1.0.0',\n kind: PackageKind.Blueprint,\n dependencies: [{ name: 'PrimeReact' }, { name: 'Cratis.Components' }],\n components: Object.values(ComponentName),\n layouts: Object.values(LayoutName),\n screenTemplates: galleryScreenTemplates.map(template => template.name),\n dialogTemplates: galleryDialogTemplates.map(template => template.name),\n themes: defaultBlueprintThemes.map(theme => theme.name),\n displayName: 'Cratis Default Blueprint',\n description: 'Application shells with eight menu modes, the components that fill their slots, and a full screen and dialog template set.',\n module: '@cratis/scene.blueprint.default',\n license: 'MIT',\n licenseUrl: 'https://github.com/Cratis/Scene/blob/main/LICENSE',\n};\n\n/**\n * The default blueprint as a loadable bundle.\n *\n * The manifest names things; this provides them. `validatePackageBundle` is what proves the two agree, and\n * this package's specs run it - a manifest promising a component the bundle never registered renders as a\n * dashed red placeholder somewhere deep inside a screen, a long way from the declaration that caused it.\n *\n * The screens are the gallery: real {@link Screen} instances naming a layout, a screen template and the\n * content that fills it, so a preview boots them through the real engine as a working miniature\n * application rather than a set of pictures.\n */\nexport const defaultBlueprint: ScenePackageBundle = {\n manifest: defaultBlueprintManifest,\n components: defaultBlueprintComponents,\n layouts: defaultLayouts,\n screenTemplates: galleryScreenTemplates,\n dialogTemplates: galleryDialogTemplates,\n screens: galleryScreens,\n themes: defaultBlueprintThemes,\n descriptors: describeComponents(defaultBlueprintManifest.name,
|
|
1
|
+
{"version":3,"file":"defaultBlueprint.js","sources":["../../defaultBlueprint.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 { PackageKind, ScenePackage } from '@cratis/scene.model';\nimport { ScenePackageBundle, describeComponents } from '@cratis/scene.react';\nimport { ComponentName } from './ComponentName';\nimport { defaultBlueprintComponentMetadata } from './defaultBlueprintComponentMetadata';\nimport { foundationDescriptors } from './foundation';\nimport { defaultBlueprintComponents } from './defaultBlueprintComponents';\nimport { galleryDialogTemplates, galleryScreenTemplates, galleryScreens } from './gallery';\nimport { LayoutName, defaultLayouts } from './layouts';\nimport { defaultBlueprintName } from './packageName';\nimport { defaultBlueprintThemes } from './themes';\n\n/**\n * The default blueprint's declaration.\n *\n * A blueprint is the package an application picks once to get a coherent shape: the {@link Layout}s that\n * are its base navigational look, the {@link ScreenTemplate}s and {@link DialogTemplate}s that go inside\n * them, the components that fill their slots, and the themes that color all of it. Picking the parts\n * separately is how an application ends up with a sidebar from one design language and a form from\n * another.\n *\n * The dependency list is what makes a blueprint honest about what it is built from. This one declares\n * PrimeReact - the shell's buttons, breadcrumb, overlay menu and drawer are PrimeReact 10 components - and\n * Cratis Components, which its screen templates fill their content with. A profile that activated this\n * blueprint without them would render a shell whose every control was a dashed red placeholder, and\n * `resolvePackageDependencies` exists to catch that when the profile is configured rather than when\n * someone opens the page.\n *\n * `layouts` lists only true application shells. A dashboard, a CRUD list or a sign-in screen is a screen\n * template, not a layout, and is listed as one.\n */\nexport const defaultBlueprintManifest: ScenePackage = {\n name: defaultBlueprintName,\n version: '1.0.0',\n kind: PackageKind.Blueprint,\n dependencies: [{ name: 'PrimeReact' }, { name: 'Cratis.Components' }],\n components: Object.values(ComponentName),\n layouts: Object.values(LayoutName),\n screenTemplates: galleryScreenTemplates.map(template => template.name),\n dialogTemplates: galleryDialogTemplates.map(template => template.name),\n themes: defaultBlueprintThemes.map(theme => theme.name),\n displayName: 'Cratis Default Blueprint',\n description: 'Application shells with eight menu modes, the components that fill their slots, and a full screen and dialog template set.',\n module: '@cratis/scene.blueprint.default',\n license: 'MIT',\n licenseUrl: 'https://github.com/Cratis/Scene/blob/main/LICENSE',\n};\n\n/**\n * The default blueprint as a loadable bundle.\n *\n * The manifest names things; this provides them. `validatePackageBundle` is what proves the two agree, and\n * this package's specs run it - a manifest promising a component the bundle never registered renders as a\n * dashed red placeholder somewhere deep inside a screen, a long way from the declaration that caused it.\n *\n * The screens are the gallery: real {@link Screen} instances naming a layout, a screen template and the\n * content that fills it, so a preview boots them through the real engine as a working miniature\n * application rather than a set of pictures.\n */\nexport const defaultBlueprint: ScenePackageBundle = {\n manifest: defaultBlueprintManifest,\n components: defaultBlueprintComponents,\n layouts: defaultLayouts,\n screenTemplates: galleryScreenTemplates,\n dialogTemplates: galleryDialogTemplates,\n screens: galleryScreens,\n themes: defaultBlueprintThemes,\n descriptors: describeComponents(defaultBlueprintManifest.name, foundationDescriptors, defaultBlueprintComponentMetadata),\n};\n"],"names":["defaultBlueprintManifest","name","defaultBlueprintName","version","kind","PackageKind","Blueprint","dependencies","components","Object","values","ComponentName","layouts","LayoutName","screenTemplates","galleryScreenTemplates","map","template","dialogTemplates","galleryDialogTemplates","themes","defaultBlueprintThemes","theme","displayName","description","module","license","licenseUrl","defaultBlueprint","manifest","defaultBlueprintComponents","defaultLayouts","screens","galleryScreens","descriptors","describeComponents","foundationDescriptors","defaultBlueprintComponentMetadata"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AAaA;;;;;;;;;;;;;;;;;;UAmBaA,wBAAAA,GAAyC;IAClDC,IAAAA,EAAMC,oBAAAA;IACNC,OAAAA,EAAS,OAAA;AACTC,IAAAA,IAAAA,EAAMC,YAAYC,SAAS;IAC3BC,YAAAA,EAAc;AAAC,QAAA;YAAEN,IAAAA,EAAM;AAAa,SAAA;AAAG,QAAA;YAAEA,IAAAA,EAAM;AAAoB;AAAE,KAAA;IACrEO,UAAAA,EAAYC,MAAAA,CAAOC,MAAM,CAACC,aAAAA,CAAAA;IAC1BC,OAAAA,EAASH,MAAAA,CAAOC,MAAM,CAACG,UAAAA,CAAAA;AACvBC,IAAAA,eAAAA,EAAiBC,uBAAuBC,GAAG,CAACC,CAAAA,QAAAA,GAAYA,SAAShB,IAAI,CAAA;AACrEiB,IAAAA,eAAAA,EAAiBC,uBAAuBH,GAAG,CAACC,CAAAA,QAAAA,GAAYA,SAAShB,IAAI,CAAA;AACrEmB,IAAAA,MAAAA,EAAQC,uBAAuBL,GAAG,CAACM,CAAAA,KAAAA,GAASA,MAAMrB,IAAI,CAAA;IACtDsB,WAAAA,EAAa,0BAAA;IACbC,WAAAA,EAAa,4HAAA;IACbC,MAAAA,EAAQ,iCAAA;IACRC,OAAAA,EAAS,KAAA;IACTC,UAAAA,EAAY;AAChB;AAEA;;;;;;;;;;UAWaC,gBAAAA,GAAuC;IAChDC,QAAAA,EAAU7B,wBAAAA;IACVQ,UAAAA,EAAYsB,0BAAAA;IACZlB,OAAAA,EAASmB,cAAAA;IACTjB,eAAAA,EAAiBC,sBAAAA;IACjBG,eAAAA,EAAiBC,sBAAAA;IACjBa,OAAAA,EAASC,cAAAA;IACTb,MAAAA,EAAQC,sBAAAA;AACRa,IAAAA,WAAAA,EAAaC,kBAAAA,CAAmBnC,wBAAAA,CAAyBC,IAAI,EAAEmC,qBAAAA,EAAuBC,iCAAAA;AAC1F;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultBlueprintComponentMetadata.d.ts","sourceRoot":"","sources":["../../defaultBlueprintComponentMetadata.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"defaultBlueprintComponentMetadata.d.ts","sourceRoot":"","sources":["../../defaultBlueprintComponentMetadata.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAgD,MAAM,qBAAqB,CAAC;AAGtG,eAAO,MAAM,iCAAiC,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAkB/E,CAAC"}
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import { ComponentCategory } from '@cratis/scene.model';
|
|
2
|
+
import './foundation/ComponentState.js';
|
|
3
|
+
import 'react/jsx-runtime';
|
|
4
|
+
import './foundation/foundationDescriptors.js';
|
|
5
|
+
import { foundationComponentMetadata } from './foundation/foundationComponentMetadata.js';
|
|
6
|
+
import './foundation/foundationSamples.js';
|
|
2
7
|
import { componentMetadata, navigationDesignMode } from '@cratis/scene.react';
|
|
8
|
+
import './defaultBlueprintComponents.js';
|
|
9
|
+
import 'react';
|
|
3
10
|
|
|
4
11
|
// Copyright (c) Cratis. All rights reserved.
|
|
5
12
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
6
13
|
/** The category, icon, keywords and picker badge of every component of the package (CMP1), keyed by bare component name. */ const defaultBlueprintComponentMetadata = {
|
|
14
|
+
...foundationComponentMetadata,
|
|
7
15
|
appShell: componentMetadata('Application shell', ComponentCategory.Layout, 'app-window', [
|
|
8
16
|
'layout',
|
|
9
17
|
'frame',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultBlueprintComponentMetadata.js","sources":["../../defaultBlueprintComponentMetadata.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 { ComponentCategory } from '@cratis/scene.model';\nimport { ComponentMetadata, componentMetadata as m, navigationDesignMode } from '@cratis/scene.react';\n\n/** The category, icon, keywords and picker badge of every component of the package (CMP1), keyed by bare component name. */\nexport const defaultBlueprintComponentMetadata: Record<string, ComponentMetadata> = {\n appShell: m('Application shell', ComponentCategory.Layout, 'app-window', ['layout', 'frame', 'chrome']),\n fullPageShell: m('Full page shell', ComponentCategory.Layout, 'maximize', ['layout', 'fullscreen', 'frame']),\n topbar: m('Topbar', ComponentCategory.Navigation, 'panel-top', ['header', 'top bar', 'navigation'], 'Tp', navigationDesignMode()),\n sidebar: m('Side bar', ComponentCategory.Navigation, 'panel-left', ['navigation', 'menu', 'side panel'], 'Sb', navigationDesignMode({ sidebar: true })),\n menu: m('Menu', ComponentCategory.Navigation, 'menu', ['navigation', 'list', 'links']),\n menuItem: m('Menu item', ComponentCategory.Navigation, 'minus', ['link', 'entry', 'navigation']),\n breadcrumb: m('Breadcrumbs', ComponentCategory.Navigation, 'chevron-right', ['trail', 'path', 'navigation']),\n footer: m('Footer', ComponentCategory.Layout, 'panel-bottom', ['bottom', 'page footer']),\n rightPanel: m('Right panel', ComponentCategory.Layout, 'panel-right', ['side panel', 'drawer', 'aside']),\n configPanel: m('Config panel', ComponentCategory.Layout, 'settings', ['settings', 'layout options', 'preferences']),\n pageHeader: m('Page header', ComponentCategory.Layout, 'heading', ['title', 'header', 'page title']),\n mask: m('Mask', ComponentCategory.Feedback, 'layers', ['overlay', 'scrim', 'backdrop']),\n logo: m('Logo', ComponentCategory.DataDisplay, 'badge', ['brand', 'identity', 'image']),\n userMenu: m('User menu', ComponentCategory.Actions, 'circle-user', ['account', 'profile', 'sign out']),\n themeSwitcher: m('Theme switcher', ComponentCategory.Actions, 'palette', ['theme', 'dark mode', 'colors']),\n layoutModeSwitcher: m('Layout mode switcher', ComponentCategory.Actions, 'layout-dashboard', ['layout', 'mode', 'navigation style']),\n};\n"],"names":["defaultBlueprintComponentMetadata","appShell","m","ComponentCategory","Layout","fullPageShell","topbar","Navigation","navigationDesignMode","sidebar","menu","menuItem","breadcrumb","footer","rightPanel","configPanel","pageHeader","mask","Feedback","logo","DataDisplay","userMenu","Actions","themeSwitcher","layoutModeSwitcher"],"mappings":"
|
|
1
|
+
{"version":3,"file":"defaultBlueprintComponentMetadata.js","sources":["../../defaultBlueprintComponentMetadata.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 { ComponentCategory } from '@cratis/scene.model';\nimport { foundationComponentMetadata } from './foundation';\nimport { ComponentMetadata, componentMetadata as m, navigationDesignMode } from '@cratis/scene.react';\n\n/** The category, icon, keywords and picker badge of every component of the package (CMP1), keyed by bare component name. */\nexport const defaultBlueprintComponentMetadata: Record<string, ComponentMetadata> = {\n ...foundationComponentMetadata,\n appShell: m('Application shell', ComponentCategory.Layout, 'app-window', ['layout', 'frame', 'chrome']),\n fullPageShell: m('Full page shell', ComponentCategory.Layout, 'maximize', ['layout', 'fullscreen', 'frame']),\n topbar: m('Topbar', ComponentCategory.Navigation, 'panel-top', ['header', 'top bar', 'navigation'], 'Tp', navigationDesignMode()),\n sidebar: m('Side bar', ComponentCategory.Navigation, 'panel-left', ['navigation', 'menu', 'side panel'], 'Sb', navigationDesignMode({ sidebar: true })),\n menu: m('Menu', ComponentCategory.Navigation, 'menu', ['navigation', 'list', 'links']),\n menuItem: m('Menu item', ComponentCategory.Navigation, 'minus', ['link', 'entry', 'navigation']),\n breadcrumb: m('Breadcrumbs', ComponentCategory.Navigation, 'chevron-right', ['trail', 'path', 'navigation']),\n footer: m('Footer', ComponentCategory.Layout, 'panel-bottom', ['bottom', 'page footer']),\n rightPanel: m('Right panel', ComponentCategory.Layout, 'panel-right', ['side panel', 'drawer', 'aside']),\n configPanel: m('Config panel', ComponentCategory.Layout, 'settings', ['settings', 'layout options', 'preferences']),\n pageHeader: m('Page header', ComponentCategory.Layout, 'heading', ['title', 'header', 'page title']),\n mask: m('Mask', ComponentCategory.Feedback, 'layers', ['overlay', 'scrim', 'backdrop']),\n logo: m('Logo', ComponentCategory.DataDisplay, 'badge', ['brand', 'identity', 'image']),\n userMenu: m('User menu', ComponentCategory.Actions, 'circle-user', ['account', 'profile', 'sign out']),\n themeSwitcher: m('Theme switcher', ComponentCategory.Actions, 'palette', ['theme', 'dark mode', 'colors']),\n layoutModeSwitcher: m('Layout mode switcher', ComponentCategory.Actions, 'layout-dashboard', ['layout', 'mode', 'navigation style']),\n};\n"],"names":["defaultBlueprintComponentMetadata","foundationComponentMetadata","appShell","m","ComponentCategory","Layout","fullPageShell","topbar","Navigation","navigationDesignMode","sidebar","menu","menuItem","breadcrumb","footer","rightPanel","configPanel","pageHeader","mask","Feedback","logo","DataDisplay","userMenu","Actions","themeSwitcher","layoutModeSwitcher"],"mappings":";;;;;;;;;;AAAA;AACA;AAMA,6HACO,MAAMA,iCAAAA,GAAuE;AAChF,IAAA,GAAGC,2BAA2B;AAC9BC,IAAAA,QAAAA,EAAUC,iBAAAA,CAAE,mBAAA,EAAqBC,iBAAAA,CAAkBC,MAAM,EAAE,YAAA,EAAc;AAAC,QAAA,QAAA;AAAU,QAAA,OAAA;AAAS,QAAA;AAAS,KAAA,CAAA;AACtGC,IAAAA,aAAAA,EAAeH,iBAAAA,CAAE,iBAAA,EAAmBC,iBAAAA,CAAkBC,MAAM,EAAE,UAAA,EAAY;AAAC,QAAA,QAAA;AAAU,QAAA,YAAA;AAAc,QAAA;AAAQ,KAAA,CAAA;AAC3GE,IAAAA,MAAAA,EAAQJ,iBAAAA,CAAE,QAAA,EAAUC,iBAAAA,CAAkBI,UAAU,EAAE,WAAA,EAAa;AAAC,QAAA,QAAA;AAAU,QAAA,SAAA;AAAW,QAAA;AAAa,KAAA,EAAE,IAAA,EAAMC,oBAAAA,EAAAA,CAAAA;AAC1GC,IAAAA,OAAAA,EAASP,iBAAAA,CAAE,UAAA,EAAYC,iBAAAA,CAAkBI,UAAU,EAAE,YAAA,EAAc;AAAC,QAAA,YAAA;AAAc,QAAA,MAAA;AAAQ,QAAA;AAAa,KAAA,EAAE,MAAMC,oBAAAA,CAAqB;QAAEC,OAAAA,EAAS;AAAK,KAAA,CAAA,CAAA;AACpJC,IAAAA,IAAAA,EAAMR,iBAAAA,CAAE,MAAA,EAAQC,iBAAAA,CAAkBI,UAAU,EAAE,MAAA,EAAQ;AAAC,QAAA,YAAA;AAAc,QAAA,MAAA;AAAQ,QAAA;AAAQ,KAAA,CAAA;AACrFI,IAAAA,QAAAA,EAAUT,iBAAAA,CAAE,WAAA,EAAaC,iBAAAA,CAAkBI,UAAU,EAAE,OAAA,EAAS;AAAC,QAAA,MAAA;AAAQ,QAAA,OAAA;AAAS,QAAA;AAAa,KAAA,CAAA;AAC/FK,IAAAA,UAAAA,EAAYV,iBAAAA,CAAE,aAAA,EAAeC,iBAAAA,CAAkBI,UAAU,EAAE,eAAA,EAAiB;AAAC,QAAA,OAAA;AAAS,QAAA,MAAA;AAAQ,QAAA;AAAa,KAAA,CAAA;AAC3GM,IAAAA,MAAAA,EAAQX,iBAAAA,CAAE,QAAA,EAAUC,iBAAAA,CAAkBC,MAAM,EAAE,cAAA,EAAgB;AAAC,QAAA,QAAA;AAAU,QAAA;AAAc,KAAA,CAAA;AACvFU,IAAAA,UAAAA,EAAYZ,iBAAAA,CAAE,aAAA,EAAeC,iBAAAA,CAAkBC,MAAM,EAAE,aAAA,EAAe;AAAC,QAAA,YAAA;AAAc,QAAA,QAAA;AAAU,QAAA;AAAQ,KAAA,CAAA;AACvGW,IAAAA,WAAAA,EAAab,iBAAAA,CAAE,cAAA,EAAgBC,iBAAAA,CAAkBC,MAAM,EAAE,UAAA,EAAY;AAAC,QAAA,UAAA;AAAY,QAAA,gBAAA;AAAkB,QAAA;AAAc,KAAA,CAAA;AAClHY,IAAAA,UAAAA,EAAYd,iBAAAA,CAAE,aAAA,EAAeC,iBAAAA,CAAkBC,MAAM,EAAE,SAAA,EAAW;AAAC,QAAA,OAAA;AAAS,QAAA,QAAA;AAAU,QAAA;AAAa,KAAA,CAAA;AACnGa,IAAAA,IAAAA,EAAMf,iBAAAA,CAAE,MAAA,EAAQC,iBAAAA,CAAkBe,QAAQ,EAAE,QAAA,EAAU;AAAC,QAAA,SAAA;AAAW,QAAA,OAAA;AAAS,QAAA;AAAW,KAAA,CAAA;AACtFC,IAAAA,IAAAA,EAAMjB,iBAAAA,CAAE,MAAA,EAAQC,iBAAAA,CAAkBiB,WAAW,EAAE,OAAA,EAAS;AAAC,QAAA,OAAA;AAAS,QAAA,UAAA;AAAY,QAAA;AAAQ,KAAA,CAAA;AACtFC,IAAAA,QAAAA,EAAUnB,iBAAAA,CAAE,WAAA,EAAaC,iBAAAA,CAAkBmB,OAAO,EAAE,aAAA,EAAe;AAAC,QAAA,SAAA;AAAW,QAAA,SAAA;AAAW,QAAA;AAAW,KAAA,CAAA;AACrGC,IAAAA,aAAAA,EAAerB,iBAAAA,CAAE,gBAAA,EAAkBC,iBAAAA,CAAkBmB,OAAO,EAAE,SAAA,EAAW;AAAC,QAAA,OAAA;AAAS,QAAA,WAAA;AAAa,QAAA;AAAS,KAAA,CAAA;AACzGE,IAAAA,kBAAAA,EAAoBtB,iBAAAA,CAAE,sBAAA,EAAwBC,iBAAAA,CAAkBmB,OAAO,EAAE,kBAAA,EAAoB;AAAC,QAAA,QAAA;AAAU,QAAA,MAAA;AAAQ,QAAA;AAAmB,KAAA;AACvI;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultBlueprintComponents.d.ts","sourceRoot":"","sources":["../../defaultBlueprintComponents.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAwB,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"defaultBlueprintComponents.d.ts","sourceRoot":"","sources":["../../defaultBlueprintComponents.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAwB,MAAM,qBAAqB,CAAC;AA+B9E,eAAO,MAAM,0BAA0B,EAAE,iBAqBxC,CAAC"}
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import { componentRegistryKey } from '@cratis/scene.react';
|
|
2
2
|
import { ComponentName } from './ComponentName.js';
|
|
3
3
|
import { defaultBlueprintName } from './packageName.js';
|
|
4
|
+
import './foundation/ComponentState.js';
|
|
4
5
|
import 'react/jsx-runtime';
|
|
6
|
+
import { EmptyState } from './foundation/EmptyState.js';
|
|
7
|
+
import { TrendChip } from './foundation/TrendChip.js';
|
|
8
|
+
import { StatusChip } from './foundation/StatusChip.js';
|
|
9
|
+
import { StatCard } from './foundation/StatCard.js';
|
|
10
|
+
import './foundation/foundationDescriptors.js';
|
|
11
|
+
import './foundation/foundationComponentMetadata.js';
|
|
12
|
+
import './foundation/foundationSamples.js';
|
|
5
13
|
import 'react';
|
|
6
14
|
import { AppShell } from './shell/AppShell.js';
|
|
7
15
|
import { FullPageShell } from './shell/FullPageShell.js';
|
|
@@ -45,7 +53,11 @@ import { LayoutModeSwitcher } from './shell/LayoutModeSwitcher.js';
|
|
|
45
53
|
[componentRegistryKey(defaultBlueprintName, ComponentName.Logo)]: Logo,
|
|
46
54
|
[componentRegistryKey(defaultBlueprintName, ComponentName.UserMenu)]: UserMenu,
|
|
47
55
|
[componentRegistryKey(defaultBlueprintName, ComponentName.ThemeSwitcher)]: ThemeSwitcher,
|
|
48
|
-
[componentRegistryKey(defaultBlueprintName, ComponentName.LayoutModeSwitcher)]: LayoutModeSwitcher
|
|
56
|
+
[componentRegistryKey(defaultBlueprintName, ComponentName.LayoutModeSwitcher)]: LayoutModeSwitcher,
|
|
57
|
+
[componentRegistryKey(defaultBlueprintName, ComponentName.EmptyState)]: EmptyState,
|
|
58
|
+
[componentRegistryKey(defaultBlueprintName, ComponentName.StatCard)]: StatCard,
|
|
59
|
+
[componentRegistryKey(defaultBlueprintName, ComponentName.TrendChip)]: TrendChip,
|
|
60
|
+
[componentRegistryKey(defaultBlueprintName, ComponentName.StatusChip)]: StatusChip
|
|
49
61
|
};
|
|
50
62
|
|
|
51
63
|
export { defaultBlueprintComponents };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultBlueprintComponents.js","sources":["../../defaultBlueprintComponents.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 { ComponentRegistry, componentRegistryKey } from '@cratis/scene.react';\nimport { ComponentName } from './ComponentName';\nimport { defaultBlueprintName } from './packageName';\nimport {\n AppShell,\n Breadcrumb,\n ConfigPanel,\n Footer,\n FullPageShell,\n LayoutModeSwitcher,\n Logo,\n Mask,\n Menu,\n MenuItem,\n PageHeader,\n RightPanel,\n Sidebar,\n ThemeSwitcher,\n Topbar,\n UserMenu,\n} from './shell';\n\n/**\n * The components this package registers, keyed the way the renderer looks them up.\n *\n * Every key is built with `componentRegistryKey` rather than written out, because the separator between\n * package and component name is the registry's own business - it is deliberately not the `.` a screen uses\n * to qualify a name, so that a package name containing dots stays unambiguous. Building a key by hand is\n * how a component ends up registered under something no lookup will ever produce.\n */\nexport const defaultBlueprintComponents: ComponentRegistry = {\n [componentRegistryKey(defaultBlueprintName, ComponentName.AppShell)]: AppShell,\n [componentRegistryKey(defaultBlueprintName, ComponentName.FullPageShell)]: FullPageShell,\n [componentRegistryKey(defaultBlueprintName, ComponentName.Topbar)]: Topbar,\n [componentRegistryKey(defaultBlueprintName, ComponentName.Sidebar)]: Sidebar,\n [componentRegistryKey(defaultBlueprintName, ComponentName.Menu)]: Menu,\n [componentRegistryKey(defaultBlueprintName, ComponentName.MenuItem)]: MenuItem,\n [componentRegistryKey(defaultBlueprintName, ComponentName.Breadcrumb)]: Breadcrumb,\n [componentRegistryKey(defaultBlueprintName, ComponentName.Footer)]: Footer,\n [componentRegistryKey(defaultBlueprintName, ComponentName.RightPanel)]: RightPanel,\n [componentRegistryKey(defaultBlueprintName, ComponentName.ConfigPanel)]: ConfigPanel,\n [componentRegistryKey(defaultBlueprintName, ComponentName.PageHeader)]: PageHeader,\n [componentRegistryKey(defaultBlueprintName, ComponentName.Mask)]: Mask,\n [componentRegistryKey(defaultBlueprintName, ComponentName.Logo)]: Logo,\n [componentRegistryKey(defaultBlueprintName, ComponentName.UserMenu)]: UserMenu,\n [componentRegistryKey(defaultBlueprintName, ComponentName.ThemeSwitcher)]: ThemeSwitcher,\n [componentRegistryKey(defaultBlueprintName, ComponentName.LayoutModeSwitcher)]: LayoutModeSwitcher,\n};\n"],"names":["defaultBlueprintComponents","componentRegistryKey","defaultBlueprintName","ComponentName","AppShell","FullPageShell","Topbar","Sidebar","Menu","MenuItem","Breadcrumb","Footer","RightPanel","ConfigPanel","PageHeader","Mask","Logo","UserMenu","ThemeSwitcher","LayoutModeSwitcher"],"mappings":"
|
|
1
|
+
{"version":3,"file":"defaultBlueprintComponents.js","sources":["../../defaultBlueprintComponents.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 { ComponentRegistry, componentRegistryKey } from '@cratis/scene.react';\nimport { ComponentName } from './ComponentName';\nimport { defaultBlueprintName } from './packageName';\nimport { EmptyState, StatCard, StatusChip, TrendChip } from './foundation';\nimport {\n AppShell,\n Breadcrumb,\n ConfigPanel,\n Footer,\n FullPageShell,\n LayoutModeSwitcher,\n Logo,\n Mask,\n Menu,\n MenuItem,\n PageHeader,\n RightPanel,\n Sidebar,\n ThemeSwitcher,\n Topbar,\n UserMenu,\n} from './shell';\n\n/**\n * The components this package registers, keyed the way the renderer looks them up.\n *\n * Every key is built with `componentRegistryKey` rather than written out, because the separator between\n * package and component name is the registry's own business - it is deliberately not the `.` a screen uses\n * to qualify a name, so that a package name containing dots stays unambiguous. Building a key by hand is\n * how a component ends up registered under something no lookup will ever produce.\n */\nexport const defaultBlueprintComponents: ComponentRegistry = {\n [componentRegistryKey(defaultBlueprintName, ComponentName.AppShell)]: AppShell,\n [componentRegistryKey(defaultBlueprintName, ComponentName.FullPageShell)]: FullPageShell,\n [componentRegistryKey(defaultBlueprintName, ComponentName.Topbar)]: Topbar,\n [componentRegistryKey(defaultBlueprintName, ComponentName.Sidebar)]: Sidebar,\n [componentRegistryKey(defaultBlueprintName, ComponentName.Menu)]: Menu,\n [componentRegistryKey(defaultBlueprintName, ComponentName.MenuItem)]: MenuItem,\n [componentRegistryKey(defaultBlueprintName, ComponentName.Breadcrumb)]: Breadcrumb,\n [componentRegistryKey(defaultBlueprintName, ComponentName.Footer)]: Footer,\n [componentRegistryKey(defaultBlueprintName, ComponentName.RightPanel)]: RightPanel,\n [componentRegistryKey(defaultBlueprintName, ComponentName.ConfigPanel)]: ConfigPanel,\n [componentRegistryKey(defaultBlueprintName, ComponentName.PageHeader)]: PageHeader,\n [componentRegistryKey(defaultBlueprintName, ComponentName.Mask)]: Mask,\n [componentRegistryKey(defaultBlueprintName, ComponentName.Logo)]: Logo,\n [componentRegistryKey(defaultBlueprintName, ComponentName.UserMenu)]: UserMenu,\n [componentRegistryKey(defaultBlueprintName, ComponentName.ThemeSwitcher)]: ThemeSwitcher,\n [componentRegistryKey(defaultBlueprintName, ComponentName.LayoutModeSwitcher)]: LayoutModeSwitcher,\n [componentRegistryKey(defaultBlueprintName, ComponentName.EmptyState)]: EmptyState,\n [componentRegistryKey(defaultBlueprintName, ComponentName.StatCard)]: StatCard,\n [componentRegistryKey(defaultBlueprintName, ComponentName.TrendChip)]: TrendChip,\n [componentRegistryKey(defaultBlueprintName, ComponentName.StatusChip)]: StatusChip,\n};\n"],"names":["defaultBlueprintComponents","componentRegistryKey","defaultBlueprintName","ComponentName","AppShell","FullPageShell","Topbar","Sidebar","Menu","MenuItem","Breadcrumb","Footer","RightPanel","ConfigPanel","PageHeader","Mask","Logo","UserMenu","ThemeSwitcher","LayoutModeSwitcher","EmptyState","StatCard","TrendChip","StatusChip"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AAyBA;;;;;;;UAQaA,0BAAAA,GAAgD;AACzD,IAAA,CAACC,oBAAAA,CAAqBC,oBAAAA,EAAsBC,aAAAA,CAAcC,QAAQ,IAAIA,QAAAA;AACtE,IAAA,CAACH,oBAAAA,CAAqBC,oBAAAA,EAAsBC,aAAAA,CAAcE,aAAa,IAAIA,aAAAA;AAC3E,IAAA,CAACJ,oBAAAA,CAAqBC,oBAAAA,EAAsBC,aAAAA,CAAcG,MAAM,IAAIA,MAAAA;AACpE,IAAA,CAACL,oBAAAA,CAAqBC,oBAAAA,EAAsBC,aAAAA,CAAcI,OAAO,IAAIA,OAAAA;AACrE,IAAA,CAACN,oBAAAA,CAAqBC,oBAAAA,EAAsBC,aAAAA,CAAcK,IAAI,IAAIA,IAAAA;AAClE,IAAA,CAACP,oBAAAA,CAAqBC,oBAAAA,EAAsBC,aAAAA,CAAcM,QAAQ,IAAIA,QAAAA;AACtE,IAAA,CAACR,oBAAAA,CAAqBC,oBAAAA,EAAsBC,aAAAA,CAAcO,UAAU,IAAIA,UAAAA;AACxE,IAAA,CAACT,oBAAAA,CAAqBC,oBAAAA,EAAsBC,aAAAA,CAAcQ,MAAM,IAAIA,MAAAA;AACpE,IAAA,CAACV,oBAAAA,CAAqBC,oBAAAA,EAAsBC,aAAAA,CAAcS,UAAU,IAAIA,UAAAA;AACxE,IAAA,CAACX,oBAAAA,CAAqBC,oBAAAA,EAAsBC,aAAAA,CAAcU,WAAW,IAAIA,WAAAA;AACzE,IAAA,CAACZ,oBAAAA,CAAqBC,oBAAAA,EAAsBC,aAAAA,CAAcW,UAAU,IAAIA,UAAAA;AACxE,IAAA,CAACb,oBAAAA,CAAqBC,oBAAAA,EAAsBC,aAAAA,CAAcY,IAAI,IAAIA,IAAAA;AAClE,IAAA,CAACd,oBAAAA,CAAqBC,oBAAAA,EAAsBC,aAAAA,CAAca,IAAI,IAAIA,IAAAA;AAClE,IAAA,CAACf,oBAAAA,CAAqBC,oBAAAA,EAAsBC,aAAAA,CAAcc,QAAQ,IAAIA,QAAAA;AACtE,IAAA,CAAChB,oBAAAA,CAAqBC,oBAAAA,EAAsBC,aAAAA,CAAce,aAAa,IAAIA,aAAAA;AAC3E,IAAA,CAACjB,oBAAAA,CAAqBC,oBAAAA,EAAsBC,aAAAA,CAAcgB,kBAAkB,IAAIA,kBAAAA;AAChF,IAAA,CAAClB,oBAAAA,CAAqBC,oBAAAA,EAAsBC,aAAAA,CAAciB,UAAU,IAAIA,UAAAA;AACxE,IAAA,CAACnB,oBAAAA,CAAqBC,oBAAAA,EAAsBC,aAAAA,CAAckB,QAAQ,IAAIA,QAAAA;AACtE,IAAA,CAACpB,oBAAAA,CAAqBC,oBAAAA,EAAsBC,aAAAA,CAAcmB,SAAS,IAAIA,SAAAA;AACvE,IAAA,CAACrB,oBAAAA,CAAqBC,oBAAAA,EAAsBC,aAAAA,CAAcoB,UAAU,IAAIA;AAC5E;;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { PermissionRule } from './PermissionRule';
|
|
3
|
+
export interface ActionButtonProps {
|
|
4
|
+
rule?: PermissionRule;
|
|
5
|
+
disabledReason: string;
|
|
6
|
+
onClick?: (event: {
|
|
7
|
+
stopPropagation(): void;
|
|
8
|
+
}) => void;
|
|
9
|
+
emphasis?: 'primary' | 'secondary' | 'quiet';
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export declare function ActionButton({ rule, disabledReason, onClick, emphasis, children }: ActionButtonProps): import("react").JSX.Element | undefined;
|
|
13
|
+
//# sourceMappingURL=ActionButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionButton.d.ts","sourceRoot":"","sources":["../../../foundation/ActionButton.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,WAAW,iBAAiB;IAE9B,IAAI,CAAC,EAAE,cAAc,CAAC;IAGtB,cAAc,EAAE,MAAM,CAAC;IAGvB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,eAAe,IAAI,IAAI,CAAA;KAAE,KAAK,IAAI,CAAC;IAGvD,QAAQ,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,OAAO,CAAC;IAE7C,QAAQ,EAAE,SAAS,CAAC;CACvB;AAOD,wBAAgB,YAAY,CAAC,EAAE,IAA6B,EAAE,cAAc,EAAE,OAAO,EAAE,QAAoB,EAAE,QAAQ,EAAE,EAAE,iBAAiB,2CAWzI"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { PermissionRule } from './PermissionRule.js';
|
|
3
|
+
|
|
4
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
5
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
6
|
+
/**
|
|
7
|
+
* The one button every foundation component starts an action with, so the permission rule of spec Part B 1.5 is honoured in one place:
|
|
8
|
+
* hidden renders nothing; disabled stays focusable-by-description (`aria-disabled`) and carries the reason, rather than a bare
|
|
9
|
+
* greyed control nobody can explain.
|
|
10
|
+
*/ function ActionButton({ rule = PermissionRule.Enabled, disabledReason, onClick, emphasis = 'primary', children }) {
|
|
11
|
+
if (rule === PermissionRule.Hidden) return undefined;
|
|
12
|
+
const disabled = rule === PermissionRule.Disabled;
|
|
13
|
+
return /*#__PURE__*/ jsxs("button", {
|
|
14
|
+
type: "button",
|
|
15
|
+
className: "foundation-button",
|
|
16
|
+
"data-emphasis": emphasis,
|
|
17
|
+
"aria-disabled": disabled || undefined,
|
|
18
|
+
title: disabled ? disabledReason : undefined,
|
|
19
|
+
onClick: disabled ? undefined : onClick,
|
|
20
|
+
children: [
|
|
21
|
+
children,
|
|
22
|
+
disabled && /*#__PURE__*/ jsx("span", {
|
|
23
|
+
className: "foundation-visually-hidden",
|
|
24
|
+
children: `. ${disabledReason}`
|
|
25
|
+
})
|
|
26
|
+
]
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export { ActionButton };
|
|
31
|
+
//# sourceMappingURL=ActionButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionButton.js","sources":["../../../foundation/ActionButton.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 { ReactNode } from 'react';\nimport { PermissionRule } from './PermissionRule';\n\nexport interface ActionButtonProps {\n /** The permission rule that decides whether the control works, refuses or is not rendered. */\n rule?: PermissionRule;\n\n /** Why the control is disabled, announced and shown as its tooltip. */\n disabledReason: string;\n\n /** What the control does when pressed. */\n onClick?: (event: { stopPropagation(): void }) => void;\n\n /** The emphasis of the button. */\n emphasis?: 'primary' | 'secondary' | 'quiet';\n\n children: ReactNode;\n}\n\n/**\n * The one button every foundation component starts an action with, so the permission rule of spec Part B 1.5 is honoured in one place:\n * hidden renders nothing; disabled stays focusable-by-description (`aria-disabled`) and carries the reason, rather than a bare\n * greyed control nobody can explain.\n */\nexport function ActionButton({ rule = PermissionRule.Enabled, disabledReason, onClick, emphasis = 'primary', children }: ActionButtonProps) {\n if (rule === PermissionRule.Hidden) return undefined;\n\n const disabled = rule === PermissionRule.Disabled;\n return (\n <button type='button' className='foundation-button' data-emphasis={emphasis} aria-disabled={disabled || undefined}\n title={disabled ? disabledReason : undefined} onClick={disabled ? undefined : onClick}>\n {children}\n {disabled && <span className='foundation-visually-hidden'>{`. ${disabledReason}`}</span>}\n </button>\n );\n}\n"],"names":["ActionButton","rule","PermissionRule","Enabled","disabledReason","onClick","emphasis","children","Hidden","undefined","disabled","Disabled","_jsxs","button","type","className","data-emphasis","aria-disabled","title","_jsx","span"],"mappings":";;;AAAA;AACA;AAqBA;;;;AAIC,IACM,SAASA,YAAAA,CAAa,EAAEC,IAAAA,GAAOC,eAAeC,OAAO,EAAEC,cAAc,EAAEC,OAAO,EAAEC,QAAAA,GAAW,SAAS,EAAEC,QAAQ,EAAqB,EAAA;AACtI,IAAA,IAAIN,IAAAA,KAASC,cAAAA,CAAeM,MAAM,EAAE,OAAOC,SAAAA;IAE3C,MAAMC,QAAAA,GAAWT,IAAAA,KAASC,cAAAA,CAAeS,QAAQ;AACjD,IAAA,qBACIC,IAAA,CAACC,QAAAA,EAAAA;QAAOC,IAAAA,EAAK,QAAA;QAASC,SAAAA,EAAU,mBAAA;QAAoBC,eAAAA,EAAeV,QAAAA;AAAUW,QAAAA,eAAAA,EAAeP,QAAAA,IAAYD,SAAAA;AACpGS,QAAAA,KAAAA,EAAOR,WAAWN,cAAAA,GAAiBK,SAAAA;AAAWJ,QAAAA,OAAAA,EAASK,WAAWD,SAAAA,GAAYJ,OAAAA;;AAC7EE,YAAAA,QAAAA;AACAG,YAAAA,QAAAA,kBAAYS,GAAA,CAACC,MAAAA,EAAAA;gBAAKL,SAAAA,EAAU,4BAAA;0BAA8B,CAAC,EAAE,EAAEX,cAAAA,CAAAA;;;;AAG5E;;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ExternalComponent } from '@cratis/scene.model';
|
|
2
|
+
export declare enum ComponentState {
|
|
3
|
+
Ready = "ready",
|
|
4
|
+
Loading = "loading",
|
|
5
|
+
Empty = "empty",
|
|
6
|
+
Error = "error",
|
|
7
|
+
NoPermission = "noPermission",
|
|
8
|
+
Partial = "partial"
|
|
9
|
+
}
|
|
10
|
+
export declare const componentStates: readonly ComponentState[];
|
|
11
|
+
export declare function readComponentState(element: ExternalComponent, hasData: boolean): ComponentState;
|
|
12
|
+
//# sourceMappingURL=ComponentState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComponentState.d.ts","sourceRoot":"","sources":["../../../foundation/ComponentState.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAQxD,oBAAY,cAAc;IAEtB,KAAK,UAAU;IAGf,OAAO,YAAY;IAGnB,KAAK,UAAU;IAGf,KAAK,UAAU;IAGf,YAAY,iBAAiB;IAG7B,OAAO,YAAY;CACtB;AAGD,eAAO,MAAM,eAAe,EAAE,SAAS,cAAc,EAAkC,CAAC;AAYxF,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,OAAO,GAAG,cAAc,CAQ/F"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
/**
|
|
4
|
+
* The visual states every data-showing foundation component defines (spec Part B 1.4).
|
|
5
|
+
*
|
|
6
|
+
* A template is only worth choosing if it looks right in all of them: an application spends real time loading, empty, failing
|
|
7
|
+
* and not allowed, and a component that only draws its populated self has not been finished.
|
|
8
|
+
*/ var ComponentState = /*#__PURE__*/ function(ComponentState) {
|
|
9
|
+
/** The data is there and drawn. */ ComponentState["Ready"] = "ready";
|
|
10
|
+
/** The data has not answered yet: a skeleton in the shape of the content, never a spinner alone. */ ComponentState["Loading"] = "loading";
|
|
11
|
+
/** The data answered with nothing: an explanation and the primary action. */ ComponentState["Empty"] = "empty";
|
|
12
|
+
/** The data could not be loaded: a message and a retry. */ ComponentState["Error"] = "error";
|
|
13
|
+
/** The user may not see the data: what is missing, and nothing of the data. */ ComponentState["NoPermission"] = "noPermission";
|
|
14
|
+
/** Some regions loaded and some failed: what loaded, plus which parts did not. */ ComponentState["Partial"] = "partial";
|
|
15
|
+
return ComponentState;
|
|
16
|
+
}({});
|
|
17
|
+
/** Every state, in the order a preview or a story lists them. */ const componentStates = Object.values(ComponentState);
|
|
18
|
+
/**
|
|
19
|
+
* Reads the state a component is in from its properties.
|
|
20
|
+
*
|
|
21
|
+
* An explicit `state` property wins, which is how a preview forces a state. Otherwise the state follows the properties a bound
|
|
22
|
+
* query already publishes - the same `loading` and `error` the preview states use for tables - plus `forbidden` and
|
|
23
|
+
* `failedRegions`, and falls to Empty when the component has nothing to show.
|
|
24
|
+
*
|
|
25
|
+
* @param element The element being rendered.
|
|
26
|
+
* @param hasData Whether the component has anything to draw when it is ready.
|
|
27
|
+
*/ function readComponentState(element, hasData) {
|
|
28
|
+
const { state, forbidden, error, loading, failedRegions } = element.properties;
|
|
29
|
+
if (typeof state === 'string' && componentStates.includes(state)) return state;
|
|
30
|
+
if (forbidden === true) return "noPermission";
|
|
31
|
+
if (typeof error === 'string' && error.length > 0) return "error";
|
|
32
|
+
if (loading === true) return "loading";
|
|
33
|
+
if (Array.isArray(failedRegions) && failedRegions.length > 0) return "partial";
|
|
34
|
+
return hasData ? "ready" : "empty";
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export { ComponentState, componentStates, readComponentState };
|
|
38
|
+
//# sourceMappingURL=ComponentState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComponentState.js","sources":["../../../foundation/ComponentState.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 { ExternalComponent } from '@cratis/scene.model';\n\n/**\n * The visual states every data-showing foundation component defines (spec Part B 1.4).\n *\n * A template is only worth choosing if it looks right in all of them: an application spends real time loading, empty, failing\n * and not allowed, and a component that only draws its populated self has not been finished.\n */\nexport enum ComponentState {\n /** The data is there and drawn. */\n Ready = 'ready',\n\n /** The data has not answered yet: a skeleton in the shape of the content, never a spinner alone. */\n Loading = 'loading',\n\n /** The data answered with nothing: an explanation and the primary action. */\n Empty = 'empty',\n\n /** The data could not be loaded: a message and a retry. */\n Error = 'error',\n\n /** The user may not see the data: what is missing, and nothing of the data. */\n NoPermission = 'noPermission',\n\n /** Some regions loaded and some failed: what loaded, plus which parts did not. */\n Partial = 'partial',\n}\n\n/** Every state, in the order a preview or a story lists them. */\nexport const componentStates: readonly ComponentState[] = Object.values(ComponentState);\n\n/**\n * Reads the state a component is in from its properties.\n *\n * An explicit `state` property wins, which is how a preview forces a state. Otherwise the state follows the properties a bound\n * query already publishes - the same `loading` and `error` the preview states use for tables - plus `forbidden` and\n * `failedRegions`, and falls to Empty when the component has nothing to show.\n *\n * @param element The element being rendered.\n * @param hasData Whether the component has anything to draw when it is ready.\n */\nexport function readComponentState(element: ExternalComponent, hasData: boolean): ComponentState {\n const { state, forbidden, error, loading, failedRegions } = element.properties;\n if (typeof state === 'string' && (componentStates as readonly string[]).includes(state)) return state as ComponentState;\n if (forbidden === true) return ComponentState.NoPermission;\n if (typeof error === 'string' && error.length > 0) return ComponentState.Error;\n if (loading === true) return ComponentState.Loading;\n if (Array.isArray(failedRegions) && failedRegions.length > 0) return ComponentState.Partial;\n return hasData ? ComponentState.Ready : ComponentState.Empty;\n}\n"],"names":["ComponentState","componentStates","Object","values","readComponentState","element","hasData","state","forbidden","error","loading","failedRegions","properties","includes","length","Array","isArray"],"mappings":"AAAA;AACA;AAIA;;;;;IAMO,IAAKA,cAAAA,iBAAAA,SAAAA,cAAAA,EAAAA;wCACyB,cAAA,CAAA,OAAA,CAAA,GAAA,OAAA;yGAGiE,cAAA,CAAA,SAAA,CAAA,GAAA,SAAA;kFAGvB,cAAA,CAAA,OAAA,CAAA,GAAA,OAAA;gEAGlB,cAAA,CAAA,OAAA,CAAA,GAAA,OAAA;oFAGoB,cAAA,CAAA,cAAA,CAAA,GAAA,cAAA;uFAGG,cAAA,CAAA,SAAA,CAAA,GAAA,SAAA;AAhBxEA,IAAAA,OAAAA,cAAAA;AAkBX,CAAA,CAAA,EAAA;AAED,kEACO,MAAMC,kBAA6CC,MAAAA,CAAOC,MAAM,CAACH,cAAAA;AAExE;;;;;;;;;AASC,IACM,SAASI,kBAAAA,CAAmBC,OAA0B,EAAEC,OAAgB,EAAA;AAC3E,IAAA,MAAM,EAAEC,KAAK,EAAEC,SAAS,EAAEC,KAAK,EAAEC,OAAO,EAAEC,aAAa,EAAE,GAAGN,QAAQO,UAAU;IAC9E,IAAI,OAAOL,UAAU,QAAA,IAAaN,gBAAsCY,QAAQ,CAACN,QAAQ,OAAOA,KAAAA;AAChG,IAAA,IAAIC,cAAc,IAAA,EAAM,OAAA,cAAA;AACxB,IAAA,IAAI,OAAOC,KAAAA,KAAU,QAAA,IAAYA,KAAAA,CAAMK,MAAM,GAAG,CAAA,EAAG,OAAA,OAAA;AACnD,IAAA,IAAIJ,YAAY,IAAA,EAAM,OAAA,SAAA;AACtB,IAAA,IAAIK,MAAMC,OAAO,CAACL,kBAAkBA,aAAAA,CAAcG,MAAM,GAAG,CAAA,EAAG,OAAA,SAAA;IAC9D,OAAOR,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA;AACX;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmptyState.d.ts","sourceRoot":"","sources":["../../../foundation/EmptyState.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAY/D,wBAAgB,UAAU,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,wBAAwB,+BAM7E"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { EmptyStateView } from './StateFrame.js';
|
|
3
|
+
import { readFoundationStrings } from './foundationStrings.js';
|
|
4
|
+
import { readLocale } from './formatting.js';
|
|
5
|
+
|
|
6
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
7
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
8
|
+
/**
|
|
9
|
+
* The empty state as a component of its own: an icon, a headline, a hint and one primary action, embeddable in any region.
|
|
10
|
+
*
|
|
11
|
+
* Every other foundation component shows this same view when it has no data, so a screen reads the same wherever nothing is
|
|
12
|
+
* found. Placed on its own it is what a template puts in a region that has nothing to say yet. The action starts whatever the
|
|
13
|
+
* element's behaviors say, and honours the `actionPermission` rule, so an empty list never offers a creation the user may not do.
|
|
14
|
+
*/ function EmptyState({ element, interactions }) {
|
|
15
|
+
return /*#__PURE__*/ jsx("section", {
|
|
16
|
+
className: "foundation foundation-empty-state",
|
|
17
|
+
"data-scene-id": element.id,
|
|
18
|
+
"data-state": "empty",
|
|
19
|
+
lang: readLocale(element),
|
|
20
|
+
children: /*#__PURE__*/ jsx(EmptyStateView, {
|
|
21
|
+
element: element,
|
|
22
|
+
interactions: interactions,
|
|
23
|
+
strings: readFoundationStrings(element)
|
|
24
|
+
})
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export { EmptyState };
|
|
29
|
+
//# sourceMappingURL=EmptyState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmptyState.js","sources":["../../../foundation/EmptyState.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 { EmptyStateView } from './StateFrame';\nimport { readFoundationStrings } from './foundationStrings';\nimport { readLocale } from './formatting';\n\n/**\n * The empty state as a component of its own: an icon, a headline, a hint and one primary action, embeddable in any region.\n *\n * Every other foundation component shows this same view when it has no data, so a screen reads the same wherever nothing is\n * found. Placed on its own it is what a template puts in a region that has nothing to say yet. The action starts whatever the\n * element's behaviors say, and honours the `actionPermission` rule, so an empty list never offers a creation the user may not do.\n */\nexport function EmptyState({ element, interactions }: RegisteredComponentProps) {\n return (\n <section className='foundation foundation-empty-state' data-scene-id={element.id} data-state='empty' lang={readLocale(element)}>\n <EmptyStateView element={element} interactions={interactions} strings={readFoundationStrings(element)} />\n </section>\n );\n}\n"],"names":["EmptyState","element","interactions","_jsx","section","className","data-scene-id","id","data-state","lang","readLocale","EmptyStateView","strings","readFoundationStrings"],"mappings":";;;;;AAAA;AACA;AAOA;;;;;;AAMC,IACM,SAASA,UAAAA,CAAW,EAAEC,OAAO,EAAEC,YAAY,EAA4B,EAAA;AAC1E,IAAA,qBACIC,GAAA,CAACC,SAAAA,EAAAA;QAAQC,SAAAA,EAAU,mCAAA;AAAoCC,QAAAA,eAAAA,EAAeL,QAAQM,EAAE;QAAEC,YAAAA,EAAW,OAAA;AAAQC,QAAAA,IAAAA,EAAMC,UAAAA,CAAWT,OAAAA,CAAAA;AAClH,QAAA,QAAA,gBAAAE,GAAA,CAACQ,cAAAA,EAAAA;YAAeV,OAAAA,EAASA,OAAAA;YAASC,YAAAA,EAAcA,YAAAA;AAAcU,YAAAA,OAAAA,EAASC,qBAAAA,CAAsBZ,OAAAA;;;AAGzG;;"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import { FoundationStates } from './FoundationStates';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof FoundationStates;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof meta>;
|
|
12
|
+
export declare const EmptyStateLight: Story;
|
|
13
|
+
export declare const EmptyStateDark: Story;
|
|
14
|
+
export declare const StatCardLight: Story;
|
|
15
|
+
export declare const StatCardDark: Story;
|
|
16
|
+
export declare const StatCardRightToLeft: Story;
|
|
17
|
+
export declare const TrendChipLight: Story;
|
|
18
|
+
export declare const TrendChipDark: Story;
|
|
19
|
+
export declare const StatusChipLight: Story;
|
|
20
|
+
export declare const StatusChipDark: Story;
|
|
21
|
+
//# sourceMappingURL=Foundation.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Foundation.stories.d.ts","sourceRoot":"","sources":["../../../foundation/Foundation.stories.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAMtD,QAAA,MAAM,IAAI;;;;QAGQ,MAAM;;CACiB,CAAC;eAE3B,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,eAAe,EAAE,KAAyE,CAAC;AACxG,eAAO,MAAM,cAAc,EAAE,KAAwE,CAAC;AACtG,eAAO,MAAM,aAAa,EAAE,KAAuE,CAAC;AACpG,eAAO,MAAM,YAAY,EAAE,KAAsE,CAAC;AAClG,eAAO,MAAM,mBAAmB,EAAE,KAAiJ,CAAC;AACpL,eAAO,MAAM,cAAc,EAAE,KAAwE,CAAC;AACtG,eAAO,MAAM,aAAa,EAAE,KAAuE,CAAC;AACpG,eAAO,MAAM,eAAe,EAAE,KAAyE,CAAC;AACxG,eAAO,MAAM,cAAc,EAAE,KAAwE,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ComponentName } from '../ComponentName';
|
|
2
|
+
import { FoundationStates } from './FoundationStates';
|
|
3
|
+
const meta = {
|
|
4
|
+
title: 'Blueprint/Foundation components',
|
|
5
|
+
component: FoundationStates,
|
|
6
|
+
parameters: { layout: 'fullscreen' },
|
|
7
|
+
};
|
|
8
|
+
export default meta;
|
|
9
|
+
export const EmptyStateLight = { args: { component: ComponentName.EmptyState, theme: 'light' } };
|
|
10
|
+
export const EmptyStateDark = { args: { component: ComponentName.EmptyState, theme: 'dark' } };
|
|
11
|
+
export const StatCardLight = { args: { component: ComponentName.StatCard, theme: 'light' } };
|
|
12
|
+
export const StatCardDark = { args: { component: ComponentName.StatCard, theme: 'dark' } };
|
|
13
|
+
export const StatCardRightToLeft = { args: { component: ComponentName.StatCard, theme: 'light', rightToLeft: true, properties: { label: 'خط الأنابيب', locale: 'ar-EG' } } };
|
|
14
|
+
export const TrendChipLight = { args: { component: ComponentName.TrendChip, theme: 'light' } };
|
|
15
|
+
export const TrendChipDark = { args: { component: ComponentName.TrendChip, theme: 'dark' } };
|
|
16
|
+
export const StatusChipLight = { args: { component: ComponentName.StatusChip, theme: 'light' } };
|
|
17
|
+
export const StatusChipDark = { args: { component: ComponentName.StatusChip, theme: 'dark' } };
|
|
18
|
+
//# sourceMappingURL=Foundation.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Foundation.stories.js","sourceRoot":"","sources":["../../../foundation/Foundation.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAMtD,MAAM,IAAI,GAAG;IACT,KAAK,EAAE,iCAAiC;IACxC,SAAS,EAAE,gBAAgB;IAC3B,UAAU,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE;CACC,CAAC;AAE1C,eAAe,IAAI,CAAC;AAIpB,MAAM,CAAC,MAAM,eAAe,GAAU,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,aAAa,CAAC,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,CAAC;AACxG,MAAM,CAAC,MAAM,cAAc,GAAU,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,aAAa,CAAC,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC;AACtG,MAAM,CAAC,MAAM,aAAa,GAAU,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,aAAa,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,CAAC;AACpG,MAAM,CAAC,MAAM,YAAY,GAAU,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,aAAa,CAAC,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC;AAClG,MAAM,CAAC,MAAM,mBAAmB,GAAU,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,aAAa,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;AACpL,MAAM,CAAC,MAAM,cAAc,GAAU,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,aAAa,CAAC,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,CAAC;AACtG,MAAM,CAAC,MAAM,aAAa,GAAU,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,aAAa,CAAC,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC;AACpG,MAAM,CAAC,MAAM,eAAe,GAAU,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,aAAa,CAAC,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,CAAC;AACxG,MAAM,CAAC,MAAM,cAAc,GAAU,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,aAAa,CAAC,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type FoundationIconName = 'check' | 'close' | 'arrow-up' | 'arrow-down' | 'minus' | 'alert' | 'info' | 'lock' | 'clock' | 'inbox' | 'refresh' | 'plus' | 'chevron-right' | 'chevron-down' | 'upload' | 'file' | 'user' | 'columns' | 'filter' | 'star' | 'circle';
|
|
2
|
+
export declare function isFoundationIcon(name: string): name is FoundationIconName;
|
|
3
|
+
export declare function FoundationIcon({ name, label }: {
|
|
4
|
+
name: FoundationIconName;
|
|
5
|
+
label?: string;
|
|
6
|
+
}): import("react").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=FoundationIcon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FoundationIcon.d.ts","sourceRoot":"","sources":["../../../foundation/FoundationIcon.tsx"],"names":[],"mappings":"AAIA,MAAM,MAAM,kBAAkB,GACxB,OAAO,GAAG,OAAO,GAAG,UAAU,GAAG,YAAY,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,GACnH,MAAM,GAAG,eAAe,GAAG,cAAc,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,CAAC;AA2BxH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,IAAI,kBAAkB,CAEzE;AAMD,wBAAgB,cAAc,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;IAAE,IAAI,EAAE,kBAAkB,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,+BAO3F"}
|