@cratis/components 4.55.0 → 4.55.1

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.
Files changed (34) hide show
  1. package/compat-manifest.json +13 -13
  2. package/dist/esm/Chat/ChatConversation.d.ts.map +1 -1
  3. package/dist/esm/Chat/ChatConversation.js +38 -10
  4. package/dist/esm/Chat/ChatConversation.js.map +1 -1
  5. package/dist/esm/Chat/ChatMessageBody.js +1 -1
  6. package/dist/esm/Chat/ChatMessageBody.js.map +1 -1
  7. package/dist/esm/Chat/ChatTopicList.js +1 -1
  8. package/dist/esm/Chat/ChatTopicList.js.map +1 -1
  9. package/dist/esm/Chat/Kit/Avatar/PersonAvatarCircle.d.ts.map +1 -1
  10. package/dist/esm/Chat/Kit/Avatar/PersonAvatarCircle.js +1 -1
  11. package/dist/esm/Chat/Kit/Avatar/PersonAvatarCircle.js.map +1 -1
  12. package/dist/esm/Chat/Kit/ChatComposer.js +1 -1
  13. package/dist/esm/Chat/Kit/ChatComposer.js.map +1 -1
  14. package/dist/esm/Chat/Kit/ChatMessageBubble.d.ts.map +1 -1
  15. package/dist/esm/Chat/Kit/ChatMessageBubble.js +18 -11
  16. package/dist/esm/Chat/Kit/ChatMessageBubble.js.map +1 -1
  17. package/dist/esm/Chat/Kit/Emoji/EmojiPicker.js +1 -1
  18. package/dist/esm/Chat/Kit/Emoji/EmojiPicker.js.map +1 -1
  19. package/dist/esm/Chat/Kit/FailedReply.js +1 -1
  20. package/dist/esm/Chat/Kit/FailedReply.js.map +1 -1
  21. package/dist/esm/Chat/Kit/Mentions/MentionSuggestions.js +1 -1
  22. package/dist/esm/Chat/Kit/Mentions/MentionSuggestions.js.map +1 -1
  23. package/dist/esm/Chat/Kit/MessageReactions.js +1 -1
  24. package/dist/esm/Chat/Kit/MessageReactions.js.map +1 -1
  25. package/dist/esm/Chat/Kit/ReactionPicker.js +1 -1
  26. package/dist/esm/Chat/Kit/ReactionPicker.js.map +1 -1
  27. package/dist/esm/Chat/Kit/TypingIndicator.js +1 -1
  28. package/dist/esm/Chat/Kit/TypingIndicator.js.map +1 -1
  29. package/dist/esm/DataTables/DataTableRow.d.ts.map +1 -1
  30. package/dist/esm/DataTables/DataTableRow.js +23 -12
  31. package/dist/esm/DataTables/DataTableRow.js.map +1 -1
  32. package/dist/esm/SchemaEditor/Tree/PropertyTypeGlyph.js +1 -1
  33. package/dist/esm/SchemaEditor/Tree/PropertyTypeGlyph.js.map +1 -1
  34. package/package.json +1 -1
@@ -2,18 +2,29 @@ import { jsx } from 'react/jsx-runtime';
2
2
  import { classNames } from '../ClassNames/classNames.js';
3
3
  import { dataTableCellContent } from './dataTableCellContent.js';
4
4
 
5
- const DataTableRow = ({ row, rowKey, columns, parts: pt, selectionMode, isSelected, isInteractive, isRowSelected, rowClassName, resolvedSelectionAriaLabel, selectionGroupName, onActivate, onToggleSelection, }) => (jsx("tr", { ...pt?.row, tabIndex: isInteractive ? 0 : pt?.row?.tabIndex, "aria-selected": selectionMode === 'single' ? isSelected : undefined, className: classNames('cratis-datatable__row', pt?.row?.className, rowClassName?.(row)), "data-cratis-part": 'row', "data-datatable-row-key": rowKey, "data-selected": isSelected || undefined, "data-interactive": isInteractive || undefined, onClick: (event) => onActivate(event), onKeyDown: (event) => {
6
- if (event.target !== event.currentTarget ||
7
- (event.key !== 'Enter' && event.key !== ' ')) {
8
- return;
9
- }
10
- event.preventDefault();
11
- onActivate(event);
12
- }, children: columns.map((column, columnIndex) => (jsx("td", { ...pt?.cell, style: {
13
- ...pt?.cell?.style,
14
- ...column.props.style,
15
- ...column.props.bodyStyle,
16
- }, className: classNames('cratis-datatable__cell', pt?.cell?.className, column.props.bodyClassName ?? column.props.className), "data-cratis-part": 'cell', "data-selected": isSelected || undefined, children: column.props.selectionMode === 'multiple' ? (jsx("input", { type: 'checkbox', "aria-label": resolvedSelectionAriaLabel, checked: isRowSelected, onClick: (event) => event.stopPropagation(), onChange: () => onToggleSelection() })) : column.props.selectionMode ? (jsx("input", { type: 'radio', name: selectionGroupName, readOnly: true, tabIndex: -1, "aria-label": resolvedSelectionAriaLabel, checked: isSelected })) : (dataTableCellContent(column.props, row)) }, columnIndex))) }));
5
+ const activateFromKeyboard = (event, onActivate) => {
6
+ if (event.target !== event.currentTarget || !['Enter', ' '].includes(event.key)) {
7
+ return;
8
+ }
9
+ event.preventDefault();
10
+ onActivate(event);
11
+ };
12
+ const rowTabIndex = (isInteractive, parts) => isInteractive ? 0 : parts?.row?.tabIndex;
13
+ const rowCellContent = ({ column, row, isSelected, isRowSelected, resolvedSelectionAriaLabel, selectionGroupName, onToggleSelection, }) => {
14
+ if (column.props.selectionMode === 'multiple') {
15
+ return (jsx("input", { type: 'checkbox', "aria-label": resolvedSelectionAriaLabel, checked: isRowSelected, onClick: (event) => event.stopPropagation(), onChange: () => onToggleSelection() }));
16
+ }
17
+ if (column.props.selectionMode) {
18
+ return (jsx("input", { type: 'radio', name: selectionGroupName, readOnly: true, tabIndex: -1, "aria-label": resolvedSelectionAriaLabel, checked: isSelected }));
19
+ }
20
+ return dataTableCellContent(column.props, row);
21
+ };
22
+ const RowCell = ({ parts: pt, ...props }) => (jsx("td", { ...pt?.cell, style: {
23
+ ...pt?.cell?.style,
24
+ ...props.column.props.style,
25
+ ...props.column.props.bodyStyle,
26
+ }, className: classNames('cratis-datatable__cell', pt?.cell?.className, props.column.props.bodyClassName ?? props.column.props.className), "data-cratis-part": 'cell', "data-selected": props.isSelected || undefined, children: rowCellContent(props) }));
27
+ const DataTableRow = ({ row, rowKey, columns, parts: pt, selectionMode, isSelected, isInteractive, isRowSelected, rowClassName, resolvedSelectionAriaLabel, selectionGroupName, onActivate, onToggleSelection, }) => (jsx("tr", { ...pt?.row, tabIndex: rowTabIndex(isInteractive, pt), "aria-selected": selectionMode === 'single' ? isSelected : undefined, className: classNames('cratis-datatable__row', pt?.row?.className, rowClassName?.(row)), "data-cratis-part": 'row', "data-datatable-row-key": rowKey, "data-selected": isSelected || undefined, "data-interactive": isInteractive || undefined, onClick: (event) => onActivate(event), onKeyDown: (event) => activateFromKeyboard(event, onActivate), children: columns.map((column, columnIndex) => (jsx(RowCell, { column: column, row: row, parts: pt, isSelected: isSelected, isRowSelected: isRowSelected, resolvedSelectionAriaLabel: resolvedSelectionAriaLabel, selectionGroupName: selectionGroupName, onToggleSelection: onToggleSelection }, columnIndex))) }));
17
28
 
18
29
  export { DataTableRow };
19
30
  //# sourceMappingURL=DataTableRow.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DataTableRow.js","sources":["../../../DataTables/DataTableRow.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 type { ReactElement, SyntheticEvent } from 'react';\nimport type { ColumnProps } from './Column';\nimport { classNames } from '../ClassNames/classNames';\nimport type { DataTableParts } from './DataTableParts';\nimport { dataTableCellContent } from './dataTableCellContent';\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n/** Props for {@link DataTableRow}. */\nexport interface DataTableRowProps<TData> {\n row: TData;\n /** Shared identity for focus transfer between presentations. */\n rowKey?: string;\n columns: ReactElement<ColumnProps<any>>[];\n /** The table's part attributes. */\n parts?: DataTableParts;\n selectionMode?: 'single' | 'multiple';\n isSelected: boolean;\n isInteractive: boolean;\n isRowSelected: boolean;\n rowClassName?: (rowData: TData) => string;\n resolvedSelectionAriaLabel: string;\n selectionGroupName: string;\n onActivate: (event: SyntheticEvent) => void;\n onToggleSelection: () => void;\n}\n\n/** One data row, activated by click, Enter or Space. */\nexport const DataTableRow = <TData extends object>({\n row,\n rowKey,\n columns,\n parts: pt,\n selectionMode,\n isSelected,\n isInteractive,\n isRowSelected,\n rowClassName,\n resolvedSelectionAriaLabel,\n selectionGroupName,\n onActivate,\n onToggleSelection,\n}: DataTableRowProps<TData>) => (\n <tr\n {...pt?.row}\n tabIndex={isInteractive ? 0 : pt?.row?.tabIndex}\n aria-selected={selectionMode === 'single' ? isSelected : undefined}\n className={classNames(\n 'cratis-datatable__row',\n pt?.row?.className,\n rowClassName?.(row),\n )}\n data-cratis-part='row'\n data-datatable-row-key={rowKey}\n data-selected={isSelected || undefined}\n data-interactive={isInteractive || undefined}\n onClick={(event) => onActivate(event)}\n onKeyDown={(event) => {\n if (\n event.target !== event.currentTarget ||\n (event.key !== 'Enter' && event.key !== ' ')\n ) {\n return;\n }\n event.preventDefault();\n onActivate(event);\n }}\n >\n {columns.map((column, columnIndex) => (\n <td\n key={columnIndex}\n {...pt?.cell}\n style={{\n ...pt?.cell?.style,\n ...column.props.style,\n ...column.props.bodyStyle,\n }}\n className={classNames(\n 'cratis-datatable__cell',\n pt?.cell?.className,\n column.props.bodyClassName ?? column.props.className,\n )}\n data-cratis-part='cell'\n data-selected={isSelected || undefined}\n >\n {column.props.selectionMode === 'multiple' ? (\n <input\n type='checkbox'\n aria-label={resolvedSelectionAriaLabel}\n checked={isRowSelected}\n onClick={(event) => event.stopPropagation()}\n onChange={() => onToggleSelection()}\n />\n ) : column.props.selectionMode ? (\n <input\n type='radio'\n name={selectionGroupName}\n readOnly\n tabIndex={-1}\n aria-label={resolvedSelectionAriaLabel}\n checked={isSelected}\n />\n ) : (\n dataTableCellContent(column.props, row)\n )}\n </td>\n ))}\n </tr>\n);\n"],"names":["_jsx"],"mappings":";;;;AA+BO,MAAM,YAAY,GAAG,CAAuB,EAC/C,GAAG,EACH,MAAM,EACN,OAAO,EACP,KAAK,EAAE,EAAE,EACT,aAAa,EACb,UAAU,EACV,aAAa,EACb,aAAa,EACb,YAAY,EACZ,0BAA0B,EAC1B,kBAAkB,EAClB,UAAU,EACV,iBAAiB,GACM,MACvBA,GAAA,CAAA,IAAA,EAAA,EAAA,GACQ,EAAE,EAAE,GAAG,EACX,QAAQ,EAAE,aAAa,GAAG,CAAC,GAAG,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAA,eAAA,EAChC,aAAa,KAAK,QAAQ,GAAG,UAAU,GAAG,SAAS,EAClE,SAAS,EAA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EAAE,CAAC,KAAK,KAAK,KAAK,CAAC,eAAe,EAAE,EAC3C,QAAQ,EAAE,MAAM,iBAAiB,EAAE,EAAA,CACrC,IACF,MAAM,CAAC,KAAK,CAAC,aAAa,IAC1BA,GAAA,CAAA,OAAA,EAAA,EACI,IAAI,EAAC,OAAO,EACZ,IAAI,EAAE,kBAAkB,EACxB,QAAQ,EAAA,IAAA,EACR,QAAQ,EAAE,EAAE,EAAA,YAAA,EACA,0BAA0B,EACtC,OAAO,EAAE,UAAU,EAAA,CACrB,KAEF,oBAAoB,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,CAC1C,EAAA,EAlCI,WAAW,CAmCf,CACR,CAAC,EAAA,CACD;;"}
1
+ {"version":3,"file":"DataTableRow.js","sources":["../../../DataTables/DataTableRow.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 type { KeyboardEvent, ReactElement, SyntheticEvent } from 'react';\nimport type { ColumnProps } from './Column';\nimport { classNames } from '../ClassNames/classNames';\nimport type { DataTableParts } from './DataTableParts';\nimport { dataTableCellContent } from './dataTableCellContent';\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n/** Props for {@link DataTableRow}. */\nexport interface DataTableRowProps<TData> {\n row: TData;\n /** Shared identity for focus transfer between presentations. */\n rowKey?: string;\n columns: ReactElement<ColumnProps<any>>[];\n /** The table's part attributes. */\n parts?: DataTableParts;\n selectionMode?: 'single' | 'multiple';\n isSelected: boolean;\n isInteractive: boolean;\n isRowSelected: boolean;\n rowClassName?: (rowData: TData) => string;\n resolvedSelectionAriaLabel: string;\n selectionGroupName: string;\n onActivate: (event: SyntheticEvent) => void;\n onToggleSelection: () => void;\n}\n\nconst activateFromKeyboard = (\n event: KeyboardEvent<HTMLTableRowElement>,\n onActivate: DataTableRowProps<object>['onActivate'],\n) => {\n if (event.target !== event.currentTarget || !['Enter', ' '].includes(event.key)) {\n return;\n }\n event.preventDefault();\n onActivate(event);\n};\n\nconst rowTabIndex = (isInteractive: boolean, parts: DataTableParts | undefined) =>\n isInteractive ? 0 : parts?.row?.tabIndex;\n\ninterface RowCellProps<TData> extends Pick<DataTableRowProps<TData>,\n 'row' | 'isSelected' | 'isRowSelected' | 'resolvedSelectionAriaLabel' |\n 'selectionGroupName' | 'onToggleSelection'> {\n column: DataTableRowProps<TData>['columns'][number];\n parts?: DataTableParts;\n}\n\nconst rowCellContent = <TData,>({\n column,\n row,\n isSelected,\n isRowSelected,\n resolvedSelectionAriaLabel,\n selectionGroupName,\n onToggleSelection,\n}: RowCellProps<TData>) => {\n if (column.props.selectionMode === 'multiple') {\n return (\n <input\n type='checkbox'\n aria-label={resolvedSelectionAriaLabel}\n checked={isRowSelected}\n onClick={(event) => event.stopPropagation()}\n onChange={() => onToggleSelection()}\n />\n );\n }\n if (column.props.selectionMode) {\n return (\n <input\n type='radio'\n name={selectionGroupName}\n readOnly\n tabIndex={-1}\n aria-label={resolvedSelectionAriaLabel}\n checked={isSelected}\n />\n );\n }\n return dataTableCellContent(column.props, row);\n};\n\nconst RowCell = <TData,>({ parts: pt, ...props }: RowCellProps<TData>) => (\n <td\n {...pt?.cell}\n style={{\n ...pt?.cell?.style,\n ...props.column.props.style,\n ...props.column.props.bodyStyle,\n }}\n className={classNames(\n 'cratis-datatable__cell',\n pt?.cell?.className,\n props.column.props.bodyClassName ?? props.column.props.className,\n )}\n data-cratis-part='cell'\n data-selected={props.isSelected || undefined}\n >\n {rowCellContent(props)}\n </td>\n);\n\n/** One data row, activated by click, Enter or Space. */\nexport const DataTableRow = <TData extends object>({\n row,\n rowKey,\n columns,\n parts: pt,\n selectionMode,\n isSelected,\n isInteractive,\n isRowSelected,\n rowClassName,\n resolvedSelectionAriaLabel,\n selectionGroupName,\n onActivate,\n onToggleSelection,\n}: DataTableRowProps<TData>) => (\n <tr\n {...pt?.row}\n tabIndex={rowTabIndex(isInteractive, pt)}\n aria-selected={selectionMode === 'single' ? isSelected : undefined}\n className={classNames(\n 'cratis-datatable__row',\n pt?.row?.className,\n rowClassName?.(row),\n )}\n data-cratis-part='row'\n data-datatable-row-key={rowKey}\n data-selected={isSelected || undefined}\n data-interactive={isInteractive || undefined}\n onClick={(event) => onActivate(event)}\n onKeyDown={(event) => activateFromKeyboard(event, onActivate)}\n >\n {columns.map((column, columnIndex) => (\n <RowCell\n key={columnIndex}\n column={column}\n row={row}\n parts={pt}\n isSelected={isSelected}\n isRowSelected={isRowSelected}\n resolvedSelectionAriaLabel={resolvedSelectionAriaLabel}\n selectionGroupName={selectionGroupName}\n onToggleSelection={onToggleSelection}\n />\n ))}\n </tr>\n);\n"],"names":["_jsx"],"mappings":";;;;AA8BA,MAAM,oBAAoB,GAAG,CACzB,KAAyC,EACzC,UAAmD,KACnD;IACA,IAAI,KAAK,CAAC,MAAM,KAAK,KAAK,CAAC,aAAa,IAAI,CAAC,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;QAC7E;IACJ;IACA,KAAK,CAAC,cAAc,EAAE;IACtB,UAAU,CAAC,KAAK,CAAC;AACrB,CAAC;AAED,MAAM,WAAW,GAAG,CAAC,aAAsB,EAAE,KAAiC,KAC1E,aAAa,GAAG,CAAC,GAAG,KAAK,EAAE,GAAG,EAAE,QAAQ;AAS5C,MAAM,cAAc,GAAG,CAAS,EAC5B,MAAM,EACN,GAAG,EACH,UAAU,EACV,aAAa,EACb,0BAA0B,EAC1B,kBAAkB,EAClB,iBAAiB,GACC,KAAI;IACtB,IAAI,MAAM,CAAC,KAAK,CAAC,aAAa,KAAK,UAAU,EAAE;AAC3C,QAAA,QACIA,GAAA,CAAA,OAAA,EAAA,EACI,IAAI,EAAC,UAAU,EAAA,YAAA,EACH,0BAA0B,EACtC,OAAO,EAAE,aAAa,EACtB,OAAO,EAAE,CAAC,KAAK,KAAK,KAAK,CAAC,eAAe,EAAE,EAC3C,QAAQ,EAAE,MAAM,iBAA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,EAAE,GAAG,EACX,QAAQ,EAAE,WAAW,CAAC,aAAa,EAAE,EAAE,CAAC,EAAA,eAAA,EACzB,aAAa,KAAK,QAAQ,GAAG,UAAU,GAAG,SAAS,EAClE,SAAS,EAAE,UAAU,CACjB,uBAAuB,EACvB,EAAE,EAAE,GAAG,EAAE,SAAS,EAClB,YAAY,GAAG,GAAG,CAAC,CACtB,EAAA,kBAAA,EACgB,KAAK,4BACE,MAAM,EAAA,eAAA,EACf,UAAU,IAAI,SAAS,EAAA,kBAAA,EACpB,aAAa,IAAI,SAAS,EAC5C,OAAO,EAAE,CAAC,KAAK,KAAK,UAAU,CAAC,KAAK,CAAC,EACrC,SAAS,EAAE,CAAC,KAAK,KAAK,oBAAoB,CAAC,KAAK,EAAE,UAAU,CAAC,EAAA,QAAA,EAE5D,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,WAAW,MAC7BA,IAAC,OAAO,EAAA,EAEJ,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,EAAE,EACT,UAAU,EAAE,UAAU,EACtB,aAAa,EAAE,aAAa,EAC5B,0BAA0B,EAAE,0BAA0B,EACtD,kBAAkB,EAAE,kBAAkB,EACtC,iBAAiB,EAAE,iBAAiB,IAR/B,WAAW,CASlB,CACL,CAAC,EAAA,CACD;;"}
@@ -24,7 +24,7 @@ const glyphs = {
24
24
  [PropertyType.NumberArray]: '[#]',
25
25
  [PropertyType.ObjectArray]: '[{}]',
26
26
  };
27
- const PropertyTypeGlyph = ({ type }) => (jsx("span", { className: 'cratis-schema-editor__badge-glyph', "data-property-type": type, "aria-hidden": 'true', children: glyphs[type] }));
27
+ const PropertyTypeGlyph = ({ type }) => (jsx("span", { className: 'cratis-schema-editor__badge-glyph', "data-cratis-component": 'PropertyTypeGlyph', "data-property-type": type, "aria-hidden": 'true', children: glyphs[type] }));
28
28
 
29
29
  export { PropertyTypeGlyph };
30
30
  //# sourceMappingURL=PropertyTypeGlyph.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PropertyTypeGlyph.js","sources":["../../../../SchemaEditor/Tree/PropertyTypeGlyph.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 { PropertyType } from './PropertyType';\n\nconst iconProps = {\n viewBox: '0 0 12 12',\n fill: 'none',\n stroke: 'currentColor',\n strokeWidth: 1.5,\n strokeLinecap: 'round',\n strokeLinejoin: 'round',\n width: 11,\n height: 11,\n 'aria-hidden': true,\n} as const;\n\nconst glyphs: Record<PropertyType, React.ReactNode> = {\n [PropertyType.String]: 'Aa',\n [PropertyType.Number]: '123',\n [PropertyType.Boolean]: 'T/F',\n [PropertyType.Date]: (\n <svg {...iconProps}>\n <rect x='1' y='2.5' width='10' height='8.5' rx='1.5' />\n <path d='M1 5.5h10M4 1v3M8 1v3' />\n </svg>\n ),\n [PropertyType.Time]: (\n <svg {...iconProps}>\n <circle cx='6' cy='6' r='4.5' />\n <path d='M6 3.5v2.5l2 1' />\n </svg>\n ),\n [PropertyType.UniqueIdentifier]: (\n <svg {...iconProps}>\n <path d='M4.5 1.5 3.5 10.5M8.5 1.5 7.5 10.5M1.5 4h9M1.5 8h9' />\n </svg>\n ),\n [PropertyType.Object]: '{}',\n [PropertyType.StringArray]: '[A]',\n [PropertyType.NumberArray]: '[#]',\n [PropertyType.ObjectArray]: '[{}]',\n};\n\n/** Props for the glyph of a property type. */\nexport interface PropertyTypeGlyphProps {\n /** The type whose glyph is shown. */\n type: PropertyType;\n}\n\n/**\n * A short colored chip identifying a property type at a glance. It is decorative: the type's name is always\n * next to it, so it is hidden from assistive technology.\n */\nexport const PropertyTypeGlyph = ({ type }: PropertyTypeGlyphProps) => (\n <span className='cratis-schema-editor__badge-glyph' data-property-type={type} aria-hidden='true'>{glyphs[type]}</span>\n);\n"],"names":["_jsxs","_jsx"],"mappings":";;;AAKA,MAAM,SAAS,GAAG;AACd,IAAA,OAAO,EAAE,WA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AC,YAAY,CAAC,MAAM,GAAG,IAAI;AAC3B,IAAA,CAAC,YAAY,CAAC,WAAW,GAAG,KAAK;AACjC,IAAA,CAAC,YAAY,CAAC,WAAW,GAAG,KAAK;AACjC,IAAA,CAAC,YAAY,CAAC,WAAW,GAAG,MAAM;CACrC;AAYM,MAAM,iBAAiB,GAAG,CAAC,EAAE,IAAI,EAA0B,MAC9DA,GAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAC,mCAAmC,EAAA,oBAAA,EAAqB,IAAI,EAAA,aAAA,EAAc,MAAM,EAAA,QAAA,EAAE,MAAM,CAAC,IAAI,CAAC,EAAA,CAAQ;;"}
1
+ {"version":3,"file":"PropertyTypeGlyph.js","sources":["../../../../SchemaEditor/Tree/PropertyTypeGlyph.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 { PropertyType } from './PropertyType';\n\nconst iconProps = {\n viewBox: '0 0 12 12',\n fill: 'none',\n stroke: 'currentColor',\n strokeWidth: 1.5,\n strokeLinecap: 'round',\n strokeLinejoin: 'round',\n width: 11,\n height: 11,\n 'aria-hidden': true,\n} as const;\n\nconst glyphs: Record<PropertyType, React.ReactNode> = {\n [PropertyType.String]: 'Aa',\n [PropertyType.Number]: '123',\n [PropertyType.Boolean]: 'T/F',\n [PropertyType.Date]: (\n <svg {...iconProps}>\n <rect x='1' y='2.5' width='10' height='8.5' rx='1.5' />\n <path d='M1 5.5h10M4 1v3M8 1v3' />\n </svg>\n ),\n [PropertyType.Time]: (\n <svg {...iconProps}>\n <circle cx='6' cy='6' r='4.5' />\n <path d='M6 3.5v2.5l2 1' />\n </svg>\n ),\n [PropertyType.UniqueIdentifier]: (\n <svg {...iconProps}>\n <path d='M4.5 1.5 3.5 10.5M8.5 1.5 7.5 10.5M1.5 4h9M1.5 8h9' />\n </svg>\n ),\n [PropertyType.Object]: '{}',\n [PropertyType.StringArray]: '[A]',\n [PropertyType.NumberArray]: '[#]',\n [PropertyType.ObjectArray]: '[{}]',\n};\n\n/** Props for the glyph of a property type. */\nexport interface PropertyTypeGlyphProps {\n /** The type whose glyph is shown. */\n type: PropertyType;\n}\n\n/**\n * A short colored chip identifying a property type at a glance. It is decorative: the type's name is always\n * next to it, so it is hidden from assistive technology.\n */\nexport const PropertyTypeGlyph = ({ type }: PropertyTypeGlyphProps) => (\n <span className='cratis-schema-editor__badge-glyph' data-cratis-component='PropertyTypeGlyph' data-property-type={type} aria-hidden='true'>{glyphs[type]}</span>\n);\n"],"names":["_jsxs","_jsx"],"mappings":";;;AAKA,MAAM,SAAS,GAAG;AACd,IAAA,OAAO,EAAE,WAAW;AACpB,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,MAAM,EAAE,cAAc;AACtB,IAAA,WAAW,EAAE,GAAG;AAChB,IAAA,aAAa,EAAE,OAAO;AACtB,IAAA,cAAc,EAAE,OAAO;AACvB,IAAA,KAAK,EAAE,EAAE;AACT,IAAA,MAAM,EAAE,EAAE;AACV,IAAA,aAAa,EAAE,IAAI;CACb;AAEV,MAAM,MAAM,GAA0C;AAClD,IAAA,CAAC,YAAY,CAAC,MAAM,GAAG,IAAI;AAC3B,IAAA,CAAC,YAAY,CAAC,MAAM,GAAG,KAAK;AAC5B,IAAA,CAAC,YAAY,CAAC,OAAO,GAAG,KAAK;AAC7B,IAAA,CAAC,YAAY,CAAC,IAAI,IACdA,IAAA,CAAA,KAAA,EAAA,EAAA,GAAS,SAAS,EAAA,QAAA,EAAA,CACdC,GAAA,CAAA,MAAA,EAAA,EAAM,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,KAAK,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,EAAE,EAAC,KAAK,EAAA,CAAG,EACvDA,GAAA,CAAA,MAAA,EAAA,EAAM,CAAC,EAAC,uBAAuB,EAAA,CAAG,IAChC,CACT;AACD,IAAA,CAAC,YAAY,CAAC,IAAI,IACdD,IAAA,CAAA,KAAA,EAAA,EAAA,GAAS,SAAS,EAAA,QAAA,EAAA,CACdC,GAAA,CAAA,QAAA,EAAA,EAAQ,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,GAAG,EAAC,CAAC,EAAC,KAAK,EAAA,CAAG,EAChCA,GAAA,CAAA,MAAA,EAAA,EAAM,CAAC,EAAC,gBAAgB,EAAA,CAAG,IACzB,CACT;AACD,IAAA,CAAC,YAAY,CAAC,gBAAgB,IAC1BA,GAAA,CAAA,KAAA,EAAA,EAAA,GAAS,SAAS,EAAA,QAAA,EACdA,cAAM,CAAC,EAAC,oDAAoD,EAAA,CAAG,GAC7D,CACT;AACD,IAAA,CAAC,YAAY,CAAC,MAAM,GAAG,IAAI;AAC3B,IAAA,CAAC,YAAY,CAAC,WAAW,GAAG,KAAK;AACjC,IAAA,CAAC,YAAY,CAAC,WAAW,GAAG,KAAK;AACjC,IAAA,CAAC,YAAY,CAAC,WAAW,GAAG,MAAM;CACrC;AAYM,MAAM,iBAAiB,GAAG,CAAC,EAAE,IAAI,EAA0B,MAC9DA,GAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAC,mCAAmC,EAAA,uBAAA,EAAuB,mBAAmB,EAAA,oBAAA,EAAqB,IAAI,EAAA,aAAA,EAAc,MAAM,EAAA,QAAA,EAAE,MAAM,CAAC,IAAI,CAAC,EAAA,CAAQ;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cratis/components",
3
- "version": "4.55.0",
3
+ "version": "4.55.1",
4
4
  "description": "React components for CQRS and event-sourced apps — command dialogs, typed forms, and query-backed data tables for Cratis Arc",
5
5
  "keywords": [
6
6
  "react",