@crystallize/design-system 1.17.0 → 1.17.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.
- package/CHANGELOG.md +6 -0
- package/dist/index.css +5 -7
- package/dist/index.d.ts +7 -6
- package/dist/index.js +365 -410
- package/dist/index.mjs +312 -357
- package/package.json +1 -1
- package/src/action-menu/action-item.tsx +4 -4
- package/src/rich-text-editor/i18n/translations/en.ts +1 -0
- package/src/rich-text-editor/i18n/types.ts +1 -0
- package/src/rich-text-editor/plugins/ActionsPlugin/index.tsx +34 -38
- package/src/rich-text-editor/plugins/FloatingLinkEditorPlugin/index.tsx +3 -1
- package/src/rich-text-editor/plugins/FloatingTextFormatToolbarPlugin/index.tsx +16 -16
- package/src/rich-text-editor/plugins/ToolbarPlugin/index.css +9 -0
- package/src/rich-text-editor/plugins/ToolbarPlugin/index.tsx +11 -11
- package/src/rich-text-editor/rich-text-editor.css +0 -1
- package/src/rich-text-editor/rich-text-editor.tsx +5 -14
- package/src/rich-text-editor/types/crystallize-rich-text-types/index.ts +1 -1
- package/src/rich-text-editor/plugins/ActionsPlugin/index.css +0 -3
- package/src/rich-text-editor/plugins/DimensionsDetectorPlugin/index.tsx +0 -49
package/CHANGELOG.md
CHANGED
package/dist/index.css
CHANGED
|
@@ -2292,13 +2292,6 @@ button {
|
|
|
2292
2292
|
background-image: url(./prettier-error-DYJSLYDP.svg);
|
|
2293
2293
|
}
|
|
2294
2294
|
|
|
2295
|
-
/* src/rich-text-editor/plugins/ActionsPlugin/index.css */
|
|
2296
|
-
.c-rte-actions-plugin {
|
|
2297
|
-
z-index: 50;
|
|
2298
|
-
display: flex;
|
|
2299
|
-
align-items: center;
|
|
2300
|
-
}
|
|
2301
|
-
|
|
2302
2295
|
/* src/rich-text-editor/plugins/CodeActionMenuPlugin/index.css */
|
|
2303
2296
|
.c-rte-code-action-menu-container {
|
|
2304
2297
|
height: 37px;
|
|
@@ -2420,6 +2413,11 @@ button {
|
|
|
2420
2413
|
padding-top: var(--c-rte-toolbar-pt, 0.25rem);
|
|
2421
2414
|
padding-left: var(--c-rte-toolbar-pl, 0.5rem);
|
|
2422
2415
|
padding-right: var(--c-rte-toolbar-pr, 0.5rem);
|
|
2416
|
+
container-type: inline-size;
|
|
2417
|
+
container-name: rich-text-toolbar;
|
|
2418
|
+
@container rich-text-toolbar (max-width: 600px) {
|
|
2419
|
+
.c-rte-toolbar__icon-btn { display: none; };
|
|
2420
|
+
}
|
|
2423
2421
|
}
|
|
2424
2422
|
.c-rte-toolbar__inner {
|
|
2425
2423
|
display: flex;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { HTMLAttributes, ReactNode, ComponentPropsWithRef, ComponentProps, RefAttributes, ComponentPropsWithoutRef, LabelHTMLAttributes } from 'react';
|
|
3
|
+
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
4
|
+
import { DropdownMenuItemProps as DropdownMenuItemProps$1 } from '@radix-ui/react-dropdown-menu';
|
|
3
5
|
import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
|
|
4
6
|
import * as class_variance_authority from 'class-variance-authority';
|
|
5
7
|
import { VariantProps } from 'class-variance-authority';
|
|
6
|
-
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
7
8
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
8
9
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
9
10
|
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
@@ -16,10 +17,10 @@ import * as RadixSwitch from '@radix-ui/react-switch';
|
|
|
16
17
|
type SeparatorProps = HTMLAttributes<HTMLLIElement>;
|
|
17
18
|
declare function Separator({ className }: SeparatorProps): JSX.Element;
|
|
18
19
|
|
|
19
|
-
type ItemProps =
|
|
20
|
+
type ItemProps = DropdownMenuItemProps$1 & {
|
|
20
21
|
onSelect?: (event: React.MouseEvent<HTMLDivElement>) => void;
|
|
21
22
|
};
|
|
22
|
-
declare function Item({ children, className, onSelect }: ItemProps): JSX.Element;
|
|
23
|
+
declare function Item({ children, className, onSelect, ...delegated }: ItemProps): JSX.Element;
|
|
23
24
|
|
|
24
25
|
type DropdownMenuItemProps = DropdownMenuPrimitive.MenuItemProps & {
|
|
25
26
|
children: React.ReactNode;
|
|
@@ -319,7 +320,7 @@ type TagProps = React.ComponentProps<'div'> & TagStylesProps & {
|
|
|
319
320
|
};
|
|
320
321
|
declare function Tag({ children, className, variant, size, prepend, onRemove, ...delegated }: TagProps): JSX.Element;
|
|
321
322
|
|
|
322
|
-
type I18NKeys = 'actionClearTextFormatting' | 'actionTextFormattingOptions' | 'actionFormatAsStrongLabel' | 'actionFormatAsStrongTitle' | 'actionFormatAsStrongTitleApple' | 'actionFormatAsEmphasizedLabel' | 'actionFormatAsEmphasizedTitle' | 'actionFormatAsEmphasizedTitleApple' | 'actionFormatAsUnderlinedLabel' | 'actionFormatAsUnderlinedTitle' | 'actionFormatAsUnderlinedTitleApple' | 'actionFormatWithStrikethroughLabel' | 'actionFormatWithStrikethroughTitle' | 'actionFormatWithSubscriptLabel' | 'actionFormatWithSubscriptTitle' | 'actionFormatWithSuperscriptLabel' | 'actionFormatWithSuperscriptTitle' | 'actionCopyJSON' | 'actionClear' | 'actionFormatCode' | 'actionCopyCode' | 'actionInsertCodeBlock' | 'actionInsertlink' | 'actionTableInsertRowsAbove' | 'actionTableInsertRowsAbove_plural' | 'actionTableInsertRowsBelow' | 'actionTableInsertRowsBelow_plural' | 'actionTableInsertColumnsBefore' | 'actionTableInsertColumnsBefore_plural' | 'actionTableInsertColumnsAfter' | 'actionTableInsertColumnsAfter_plural' | 'actionTableAddRowHeader' | 'actionTableRemoveRowHeader' | 'actionTableAddColumnHeader' | 'actionTableRemoveColumnHeader' | 'actionTableDeleteColumn' | 'actionTableDeleteRow' | 'actionTableDeleteTable' | 'actionTableOpenOptions' | 'actionUndoLabel' | 'actionUndoTitle' | 'actionUndoTitleApple' | 'actionRedoLabel' | 'actionRedoTitle' | 'actionRedoTitleApple' | 'codeSelectLanguage' | 'linkEditorLink' | 'linkEditorRel' | 'linkEditorTarget' | 'linkEditorCommit' | 'linkEditorEdit' | 'linkPreviewReplaceTextWithTitle' | 'horizontalRule' | 'table' | 'insertTableTitle' | 'insertTableDescription' | 'insertTableRows' | 'insertTableColumns' | 'insertTableCommit';
|
|
323
|
+
type I18NKeys = 'actionClearTextFormatting' | 'actionTextFormattingOptions' | 'actionFormatAsStrongLabel' | 'actionFormatAsStrongTitle' | 'actionFormatAsStrongTitleApple' | 'actionFormatAsEmphasizedLabel' | 'actionFormatAsEmphasizedTitle' | 'actionFormatAsEmphasizedTitleApple' | 'actionFormatAsUnderlinedLabel' | 'actionFormatAsUnderlinedTitle' | 'actionFormatAsUnderlinedTitleApple' | 'actionFormatWithStrikethroughLabel' | 'actionFormatWithStrikethroughTitle' | 'actionFormatWithSubscriptLabel' | 'actionFormatWithSubscriptTitle' | 'actionFormatWithSuperscriptLabel' | 'actionFormatWithSuperscriptTitle' | 'actionFormatClear' | 'actionCopyJSON' | 'actionClear' | 'actionFormatCode' | 'actionCopyCode' | 'actionInsertCodeBlock' | 'actionInsertlink' | 'actionTableInsertRowsAbove' | 'actionTableInsertRowsAbove_plural' | 'actionTableInsertRowsBelow' | 'actionTableInsertRowsBelow_plural' | 'actionTableInsertColumnsBefore' | 'actionTableInsertColumnsBefore_plural' | 'actionTableInsertColumnsAfter' | 'actionTableInsertColumnsAfter_plural' | 'actionTableAddRowHeader' | 'actionTableRemoveRowHeader' | 'actionTableAddColumnHeader' | 'actionTableRemoveColumnHeader' | 'actionTableDeleteColumn' | 'actionTableDeleteRow' | 'actionTableDeleteTable' | 'actionTableOpenOptions' | 'actionUndoLabel' | 'actionUndoTitle' | 'actionUndoTitleApple' | 'actionRedoLabel' | 'actionRedoTitle' | 'actionRedoTitleApple' | 'codeSelectLanguage' | 'linkEditorLink' | 'linkEditorRel' | 'linkEditorTarget' | 'linkEditorCommit' | 'linkEditorEdit' | 'linkPreviewReplaceTextWithTitle' | 'horizontalRule' | 'table' | 'insertTableTitle' | 'insertTableDescription' | 'insertTableRows' | 'insertTableColumns' | 'insertTableCommit';
|
|
323
324
|
type I18N = Record<I18NKeys, string>;
|
|
324
325
|
|
|
325
326
|
type SupportedLanguages = 'en';
|
|
@@ -384,7 +385,7 @@ type CrystallizeRichTextTableNodes = {
|
|
|
384
385
|
type: 'table-body' | 'table-caption' | 'table-footer' | 'table-head' | 'table-row';
|
|
385
386
|
};
|
|
386
387
|
|
|
387
|
-
type CrystallizeRichText = CrystallizeRichTextNode
|
|
388
|
+
type CrystallizeRichText = CrystallizeRichTextNode[];
|
|
388
389
|
type CrystallizeRichTextNodeBase = {
|
|
389
390
|
textContent?: string;
|
|
390
391
|
children?: CrystallizeRichTextNode[];
|
|
@@ -429,7 +430,7 @@ type TRichTextBase = {
|
|
|
429
430
|
disabled?: boolean;
|
|
430
431
|
};
|
|
431
432
|
declare function RichTextEditor({ initialData, language, labelTranslations, ...rest }: TRichTextBase & {
|
|
432
|
-
initialData?: CrystallizeRichText;
|
|
433
|
+
initialData?: CrystallizeRichText | null;
|
|
433
434
|
}): JSX.Element;
|
|
434
435
|
|
|
435
436
|
type TooltipProps = Partial<Pick<RadixTooltip.TooltipContentProps, 'side'>> & {
|