@stagewise/ui 0.5.0 → 0.7.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stagewise/ui",
3
- "version": "0.5.0",
3
+ "version": "0.7.0",
4
4
  "description": "Customized shadcn/ui components built on Base UI primitives, for use across stagewise projects.",
5
5
  "type": "module",
6
6
  "license": "MIT AND OFL-1.1",
@@ -96,12 +96,14 @@ function CommandDialog({
96
96
  children,
97
97
  className,
98
98
  showCloseButton = false,
99
+ keepMounted = false,
99
100
  ...props
100
101
  }: Omit<React.ComponentProps<typeof Dialog>, 'children'> & {
101
102
  title?: string;
102
103
  description?: string;
103
104
  className?: string;
104
105
  showCloseButton?: boolean;
106
+ keepMounted?: boolean;
105
107
  children: React.ReactNode;
106
108
  }) {
107
109
  return (
@@ -116,6 +118,7 @@ function CommandDialog({
116
118
  className,
117
119
  )}
118
120
  showCloseButton={showCloseButton}
121
+ keepMounted={keepMounted}
119
122
  >
120
123
  {children}
121
124
  </DialogContent>
@@ -43,12 +43,14 @@ function DialogContent({
43
43
  className,
44
44
  children,
45
45
  showCloseButton = true,
46
+ keepMounted = false,
46
47
  ...props
47
48
  }: DialogPrimitive.Popup.Props & {
48
49
  showCloseButton?: boolean;
50
+ keepMounted?: boolean;
49
51
  }) {
50
52
  return (
51
- <DialogPortal>
53
+ <DialogPortal keepMounted={keepMounted}>
52
54
  <DialogOverlay />
53
55
  <DialogPrimitive.Popup
54
56
  data-slot="dialog-content"
@@ -13,16 +13,18 @@ function PopoverTrigger({ ...props }: PopoverPrimitive.Trigger.Props) {
13
13
 
14
14
  function PopoverContent({
15
15
  className,
16
+ positionerClassName,
16
17
  align = 'center',
17
18
  alignOffset = 0,
18
19
  side = 'bottom',
19
20
  sideOffset = 4,
21
+ collisionAvoidance,
20
22
  ...props
21
23
  }: PopoverPrimitive.Popup.Props &
22
24
  Pick<
23
25
  PopoverPrimitive.Positioner.Props,
24
- 'align' | 'alignOffset' | 'side' | 'sideOffset'
25
- >) {
26
+ 'align' | 'alignOffset' | 'side' | 'sideOffset' | 'collisionAvoidance'
27
+ > & { positionerClassName?: string }) {
26
28
  return (
27
29
  <PopoverPrimitive.Portal>
28
30
  <PopoverPrimitive.Positioner
@@ -30,7 +32,8 @@ function PopoverContent({
30
32
  alignOffset={alignOffset}
31
33
  side={side}
32
34
  sideOffset={sideOffset}
33
- className="isolate z-50"
35
+ collisionAvoidance={collisionAvoidance}
36
+ className={cn('isolate z-50', positionerClassName)}
34
37
  >
35
38
  <PopoverPrimitive.Popup
36
39
  data-slot="popover-content"
@@ -119,7 +119,7 @@ function QuestionnaireChoice({
119
119
  <span
120
120
  aria-hidden="true"
121
121
  data-slot="questionnaire-choice-indicator"
122
- className="pointer-events-none relative flex size-4 shrink-0 translate-y-[--spacing(0.45)] items-center justify-center rounded-[4px] border border-derived-strong group-has-data-[slot=questionnaire-choice-description]/questionnaire-choice:translate-y-0.5 group-data-[type=radio]/questionnaire-choice:rounded-full group-data-checked/questionnaire-choice:border-primary group-data-checked/questionnaire-choice:bg-primary group-data-checked/questionnaire-choice:text-primary-foreground dark:bg-input/30 dark:group-data-checked/questionnaire-choice:bg-primary"
122
+ className="pointer-events-none relative flex size-4 shrink-0 translate-y-[--spacing(0.45)] items-center justify-center rounded-full border border-derived-strong group-has-data-[slot=questionnaire-choice-description]/questionnaire-choice:translate-y-0.5 group-data-[type=checkbox]/questionnaire-choice:rounded-[4px] group-data-checked/questionnaire-choice:border-primary group-data-checked/questionnaire-choice:bg-primary group-data-checked/questionnaire-choice:text-primary-foreground dark:bg-input/30 dark:group-data-checked/questionnaire-choice:bg-primary"
123
123
  >
124
124
  <span
125
125
  data-slot="questionnaire-choice-indicator-dot"
@@ -31,15 +31,20 @@ function TooltipContent({
31
31
  sideOffset = 4,
32
32
  align = 'center',
33
33
  alignOffset = 0,
34
+ container,
34
35
  children,
35
36
  ...props
36
37
  }: TooltipPrimitive.Popup.Props &
38
+ Pick<TooltipPrimitive.Portal.Props, 'container'> &
37
39
  Pick<
38
40
  TooltipPrimitive.Positioner.Props,
39
41
  'align' | 'alignOffset' | 'side' | 'sideOffset'
40
42
  >) {
41
43
  return (
42
- <TooltipPrimitive.Portal>
44
+ <TooltipPrimitive.Portal
45
+ container={container}
46
+ className={container ? 'contents' : undefined}
47
+ >
43
48
  <TooltipPrimitive.Positioner
44
49
  align={align}
45
50
  alignOffset={alignOffset}
@@ -83,6 +83,7 @@ export {
83
83
  IconNotion,
84
84
  IconOpenAI,
85
85
  IconOpenRouter,
86
+ IconPostHog,
86
87
  IconSlack,
87
88
  IconTelegram,
88
89
  IconWhatsapp,
@@ -0,0 +1,47 @@
1
+ import { Icon, type IconProps } from './Icon';
2
+
3
+ interface IconDiceOutline18Props extends IconProps {
4
+ strokeWidth?: number;
5
+ }
6
+
7
+ export function IconDiceOutline18({
8
+ strokeWidth = 1.5,
9
+ ...props
10
+ }: IconDiceOutline18Props) {
11
+ return (
12
+ <Icon size="18px" {...props}>
13
+ <path
14
+ d="M5 13.5C5.552 13.5 6 13.0523 6 12.5C6 11.9477 5.552 11.5 5 11.5C4.448 11.5 4 11.9477 4 12.5C4 13.0523 4.448 13.5 5 13.5Z"
15
+ fill="currentColor"
16
+ data-color="color-2"
17
+ />
18
+ <path
19
+ d="M9.5 9C10.052 9 10.5 8.5523 10.5 8C10.5 7.4477 10.052 7 9.5 7C8.948 7 8.5 7.4477 8.5 8C8.5 8.5523 8.948 9 9.5 9Z"
20
+ fill="currentColor"
21
+ data-color="color-2"
22
+ />
23
+ <path
24
+ d="M7.25 11.25C7.802 11.25 8.25 10.8023 8.25 10.25C8.25 9.6977 7.802 9.25 7.25 9.25C6.698 9.25 6.25 9.6977 6.25 10.25C6.25 10.8023 6.698 11.25 7.25 11.25Z"
25
+ fill="currentColor"
26
+ data-color="color-2"
27
+ />
28
+ <path
29
+ d="M3.75 15.75H10.75C11.855 15.75 12.75 14.8546 12.75 13.75V6.75C12.75 5.6454 11.855 4.75 10.75 4.75H3.75C2.645 4.75 1.75 5.6454 1.75 6.75V13.75C1.75 14.8546 2.645 15.75 3.75 15.75Z"
30
+ stroke="currentColor"
31
+ strokeWidth={strokeWidth}
32
+ strokeLinecap="round"
33
+ strokeLinejoin="round"
34
+ fill="none"
35
+ />
36
+ <path
37
+ d="M15.25 11.1549L16.228 4.57401C16.39 3.48101 15.636 2.46401 14.544 2.30201L7.62001 1.27201C6.78361 1.14741 5.99221 1.55961 5.59381 2.25001"
38
+ stroke="currentColor"
39
+ strokeWidth={strokeWidth}
40
+ strokeLinecap="round"
41
+ strokeLinejoin="round"
42
+ data-color="color-2"
43
+ fill="none"
44
+ />
45
+ </Icon>
46
+ );
47
+ }
@@ -0,0 +1,30 @@
1
+ import React from 'react';
2
+
3
+ import { Icon, type IconProps } from './Icon';
4
+
5
+ interface IconSquareChartSettingsOutline18Props extends IconProps {
6
+ strokeWidth?: number;
7
+ }
8
+
9
+ export const IconSquareChartSettingsOutline18: React.FC<
10
+ IconSquareChartSettingsOutline18Props
11
+ > = ({ strokeWidth = 1.5, ...props }) => (
12
+ <Icon size="18px" {...props}>
13
+ <path
14
+ d="M4.25 8.5v4.25m6.5-2v2m-3.25-6.5v6.5m6.25-11.75v1m2.298-.048-.707.707M17 4.25h-1m.048 2.298-.707-.707M13.75 7.5v-1m-2.298.048.707-.707M10.5 4.25h1m-.048-2.298.707.707M7.689 3.25H3.25a2 2 0 0 0-2 2v8.5a2 2 0 0 0 2 2h8.5a2 2 0 0 0 2-2V10.5"
15
+ fill="none"
16
+ stroke="currentColor"
17
+ strokeLinecap="round"
18
+ strokeLinejoin="round"
19
+ strokeWidth={strokeWidth}
20
+ />
21
+ <circle
22
+ cx="13.75"
23
+ cy="4.25"
24
+ r="2"
25
+ fill="none"
26
+ stroke="currentColor"
27
+ strokeWidth={strokeWidth}
28
+ />
29
+ </Icon>
30
+ );
@@ -41,6 +41,7 @@ export { IconConnection2Outline18 } from './IconConnection2Outline18';
41
41
  export { IconCopyIdOutline18 } from './IconCopyIdOutline18';
42
42
  export { IconCopyOutline18 } from './IconCopyOutline18';
43
43
  export { IconDatabaseSearchOutline18 } from './IconDatabaseSearchOutline18';
44
+ export { IconDiceOutline18 } from './IconDiceOutline18';
44
45
  export { IconDotsOutline18 } from './IconDotsOutline18';
45
46
  export { IconDownload4Outline18 } from './IconDownload4Outline18';
46
47
  export { IconEarthOutline18 } from './IconEarthOutline18';
@@ -117,6 +118,7 @@ export { IconSideProfileSparkleOutline18 } from './IconSideProfileSparkleOutline
117
118
  export { IconSparkleOutline18 } from './IconSparkleOutline18';
118
119
  export { IconSpeakerOutline18 } from './IconSpeakerOutline18';
119
120
  export { IconSplitViewOutline18 } from './IconSplitViewOutline18';
121
+ export { IconSquareChartSettingsOutline18 } from './IconSquareChartSettingsOutline18';
120
122
  export { IconSquareCodeOutline18 } from './IconSquareCodeOutline18';
121
123
  export { IconSquareDashedOutline18 } from './IconSquareDashedOutline18';
122
124
  export { IconSquareTerminalOutline18 } from './IconSquareTerminalOutline18';
@@ -0,0 +1,10 @@
1
+ import type { SVGProps } from 'react';
2
+
3
+ // PostHog logo from Simple Icons, licensed under CC0.
4
+ export function IconPostHog(props: SVGProps<SVGSVGElement>) {
5
+ return (
6
+ <svg aria-hidden="true" viewBox="0 0 24 24" fill="currentColor" {...props}>
7
+ <path d="M9.854 14.5 5 9.647.854 5.5A.5.5 0 0 0 0 5.854V8.44a.5.5 0 0 0 .146.353L5 13.647l.147.146L9.854 18.5l.146.147v-.049c.065.03.134.049.207.049h2.586a.5.5 0 0 0 .353-.854L9.854 14.5zm0-5-4-4a.487.487 0 0 0-.409-.144.515.515 0 0 0-.356.21.493.493 0 0 0-.089.288V8.44a.5.5 0 0 0 .147.353l9 9a.5.5 0 0 0 .853-.354v-2.585a.5.5 0 0 0-.146-.354l-5-5zm1-4a.5.5 0 0 0-.854.354V8.44a.5.5 0 0 0 .147.353l4 4a.5.5 0 0 0 .853-.354V9.854a.5.5 0 0 0-.146-.354l-4-4zm12.647 11.515a3.863 3.863 0 0 1-2.232-1.1l-4.708-4.707a.5.5 0 0 0-.854.354v6.585a.5.5 0 0 0 .5.5H23.5a.5.5 0 0 0 .5-.5v-.6c0-.276-.225-.497-.499-.532zm-5.394.032a.8.8 0 1 1 0-1.6.8.8 0 0 1 0 1.6zM.854 15.5a.5.5 0 0 0-.854.354v2.293a.5.5 0 0 0 .5.5h2.293c.222 0 .39-.135.462-.309a.493.493 0 0 0-.109-.545L.854 15.501zM5 14.647.854 10.5a.5.5 0 0 0-.854.353v2.586a.5.5 0 0 0 .146.353L4.854 18.5l.146.147h2.793a.5.5 0 0 0 .353-.854L5 14.647z" />
8
+ </svg>
9
+ );
10
+ }
@@ -7,6 +7,7 @@ export { IconLinear } from './IconLinear';
7
7
  export { IconNotion } from './IconNotion';
8
8
  export { IconOpenAI } from './IconOpenAI';
9
9
  export { IconOpenRouter } from './IconOpenRouter';
10
+ export { IconPostHog } from './IconPostHog';
10
11
  export { IconSlack } from './IconSlack';
11
12
  export { IconTelegram } from './IconTelegram';
12
13
  export { IconWhatsapp } from './IconWhatsapp';