@crystallize/design-system 1.23.6 → 1.24.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/CHANGELOG.md +6 -0
- package/dist/index.css +42 -0
- package/dist/index.d.ts +15 -1
- package/dist/index.js +438 -394
- package/dist/index.mjs +107 -66
- package/package.json +3 -1
- package/src/collapsible/collapsible.css +19 -0
- package/src/collapsible/collapsible.stories.tsx +61 -0
- package/src/collapsible/collapsible.tsx +44 -0
- package/src/collapsible/index.ts +1 -0
- package/src/index.ts +1 -0
- package/tailwind.config.cjs +11 -1
package/CHANGELOG.md
CHANGED
package/dist/index.css
CHANGED
|
@@ -1032,6 +1032,48 @@
|
|
|
1032
1032
|
stroke: rgb(var(--c-color-cyan-700-200) / 1);
|
|
1033
1033
|
}
|
|
1034
1034
|
|
|
1035
|
+
/* src/collapsible/collapsible.css */
|
|
1036
|
+
.c-collapsible-content {
|
|
1037
|
+
overflow: hidden;
|
|
1038
|
+
}
|
|
1039
|
+
@keyframes collapsible-close {
|
|
1040
|
+
0% {
|
|
1041
|
+
height: var(--radix-collapsible-content-height);
|
|
1042
|
+
}
|
|
1043
|
+
100% {
|
|
1044
|
+
height: 0;
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
.c-collapsible-content[data-state=closed] {
|
|
1048
|
+
animation: collapsible-close 300ms ease-out forwards;
|
|
1049
|
+
}
|
|
1050
|
+
@keyframes collapsible-open {
|
|
1051
|
+
0% {
|
|
1052
|
+
height: 0;
|
|
1053
|
+
}
|
|
1054
|
+
100% {
|
|
1055
|
+
height: var(--radix-collapsible-content-height);
|
|
1056
|
+
}
|
|
1057
|
+
}
|
|
1058
|
+
.c-collapsible-content[data-state=open] {
|
|
1059
|
+
animation: collapsible-open 300ms ease-out forwards;
|
|
1060
|
+
}
|
|
1061
|
+
.c-collapsible-trigger {
|
|
1062
|
+
display: flex;
|
|
1063
|
+
align-items: center;
|
|
1064
|
+
gap: 0.5rem;
|
|
1065
|
+
}
|
|
1066
|
+
.c-collapsible-trigger.arrow-right {
|
|
1067
|
+
flex-direction: row-reverse;
|
|
1068
|
+
justify-content: flex-end;
|
|
1069
|
+
}
|
|
1070
|
+
.c-collapsible-arrow {
|
|
1071
|
+
transition: 0.3s;
|
|
1072
|
+
}
|
|
1073
|
+
.c-collapsible-trigger[data-state=open] .c-collapsible-arrow {
|
|
1074
|
+
transform: rotate(180deg);
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1035
1077
|
/* src/dialog/dialog.css */
|
|
1036
1078
|
:root {
|
|
1037
1079
|
--dialog-z-index: 100;
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ import * as class_variance_authority_dist_types from 'class-variance-authority/d
|
|
|
6
6
|
import * as class_variance_authority from 'class-variance-authority';
|
|
7
7
|
import { VariantProps } from 'class-variance-authority';
|
|
8
8
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
9
|
+
import * as CollapsiblePrimitives from '@radix-ui/react-collapsible';
|
|
10
|
+
import { CollapsibleTriggerProps } from '@radix-ui/react-collapsible';
|
|
9
11
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
10
12
|
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
11
13
|
import * as ProgressPrimitives from '@radix-ui/react-progress';
|
|
@@ -123,6 +125,18 @@ type CheckboxRef = HTMLButtonElement;
|
|
|
123
125
|
type CheckboxProps = ComponentProps<typeof CheckboxPrimitive.Root>;
|
|
124
126
|
declare const Checkbox: react.ForwardRefExoticComponent<Pick<CheckboxPrimitive.CheckboxProps & react.RefAttributes<HTMLButtonElement>, "form" | "slot" | "style" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "type" | "value" | "checked" | "asChild" | "required" | "onCheckedChange"> & react.RefAttributes<HTMLButtonElement>>;
|
|
125
127
|
|
|
128
|
+
type CollapsibleContentProps = ComponentProps<typeof CollapsiblePrimitives.Content>;
|
|
129
|
+
declare function Content({ className, ...delegated }: CollapsibleContentProps): JSX.Element;
|
|
130
|
+
type CollapsibleTriggerPropsExtendedProps = CollapsibleTriggerProps & {
|
|
131
|
+
arrowPosition?: 'left' | 'right';
|
|
132
|
+
};
|
|
133
|
+
declare function CollapsibleTrigger({ children, arrowPosition, className, ...delegated }: CollapsibleTriggerPropsExtendedProps): JSX.Element;
|
|
134
|
+
declare const Collapsible: {
|
|
135
|
+
Root: react.ForwardRefExoticComponent<CollapsiblePrimitives.CollapsibleProps & react.RefAttributes<HTMLDivElement>>;
|
|
136
|
+
Trigger: typeof CollapsibleTrigger;
|
|
137
|
+
Content: typeof Content;
|
|
138
|
+
};
|
|
139
|
+
|
|
126
140
|
type DialogFuncProps = {
|
|
127
141
|
afterClose?: () => void;
|
|
128
142
|
/**
|
|
@@ -595,4 +609,4 @@ declare const tokens: {
|
|
|
595
609
|
card: string;
|
|
596
610
|
};
|
|
597
611
|
|
|
598
|
-
export { ActionMenu, Avatar, Button, ButtonProps, Card, Checkbox, CheckboxProps, CheckboxRef, Container, CrystallizeRichText, CrystallizeRichTextActionMenuItem, Dialog, DropdownMenu, DropdownMenuRootProps, Icon, IconButton, IconButtonProps, InlineRadio, Input, InputWithLabel, Label, Progress, Radio, RichTextEditor, Select, Slider, Spinner, StackIcon, Switch, Tag, ToastProps, Tooltip, buttonTokens, cardToken, destroyAll, showConfirm, showDialog, showError, showInfo, showWarning, toast, tokens };
|
|
612
|
+
export { ActionMenu, Avatar, Button, ButtonProps, Card, Checkbox, CheckboxProps, CheckboxRef, Collapsible, CollapsibleTrigger, Container, CrystallizeRichText, CrystallizeRichTextActionMenuItem, Dialog, DropdownMenu, DropdownMenuRootProps, Icon, IconButton, IconButtonProps, InlineRadio, Input, InputWithLabel, Label, Progress, Radio, RichTextEditor, Select, Slider, Spinner, StackIcon, Switch, Tag, ToastProps, Tooltip, buttonTokens, cardToken, destroyAll, showConfirm, showDialog, showError, showInfo, showWarning, toast, tokens };
|