@crystallize/design-system 1.23.5 → 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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @crystallize/design-system
2
2
 
3
+ ## 1.24.0
4
+
5
+ ### Minor Changes
6
+
7
+ - c57336b: This PR adds collapsible component
8
+
9
+ ## 1.23.6
10
+
11
+ ### Patch Changes
12
+
13
+ - 162a582: This PR is fixng dropdown story, that was not showing the ContentWithIcon in storybook code preview
14
+
3
15
  ## 1.23.5
4
16
 
5
17
  ### Patch Changes
@@ -2064,7 +2064,8 @@ var Folder = forwardRef41((delegated, ref) => {
2064
2064
  children: [
2065
2065
  /* @__PURE__ */ jsx47("path", {
2066
2066
  d: "M2.604 4.108v13.146a.6.6 0 00.6.6h11.968c.59 0 1.166-.255 1.429-.784 1.374-2.77 1.642-8.38 1.166-10.692-.114-.555-.706-.927-1.272-.927l-7.091.067-2-1.41h-4.8z",
2067
- fill: "#BFF6F8"
2067
+ fill: "#BFF6F8",
2068
+ className: "c-icon-fill"
2068
2069
  }),
2069
2070
  /* @__PURE__ */ jsx47("path", {
2070
2071
  fillRule: "evenodd",
@@ -2074,7 +2075,8 @@ var Folder = forwardRef41((delegated, ref) => {
2074
2075
  }),
2075
2076
  /* @__PURE__ */ jsx47("path", {
2076
2077
  d: "M4.659 10.021L3.502 17.17a.6.6 0 00.594.685h12.076c.59 0 1.164-.254 1.46-.765 1.419-2.445 2.065-6 1.765-7.956-.086-.56-.617-.829-1.184-.829H6.64a2 2 0 00-1.98 1.717z",
2077
- fill: "#BFF6F8"
2078
+ fill: "#BFF6F8",
2079
+ className: "c-icon-fill"
2078
2080
  }),
2079
2081
  /* @__PURE__ */ jsx47("path", {
2080
2082
  fillRule: "evenodd",
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 };