@stagewise/ui 0.6.0 → 0.8.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.6.0",
3
+ "version": "0.8.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}
@@ -3,17 +3,23 @@ import { Icon, type IconProps } from './Icon';
3
3
  export const IconGoogle: React.FC<IconProps> = ({ ...props }) => {
4
4
  return (
5
5
  <Icon size="32px" {...props}>
6
- <g fill="currentColor">
6
+ <g>
7
7
  <path
8
8
  d="M29.44 16.318c0-.993-.089-1.947-.255-2.864h-13.185v5.422h7.535c-.331 1.744-1.324 3.22-2.813 4.213v3.525h4.544c2.647-2.444 4.175-6.033 4.175-10.296Z"
9
- opacity=".4"
9
+ fill="#4285F4"
10
+ />
11
+ <path
12
+ fill="#34A853"
13
+ d="M16 30c3.78 0 6.949-1.247 9.265-3.385l-4.544-3.525c-1.247.84-2.838 1.349-4.722 1.349-3.64 0-6.733-2.456-7.84-5.765l-2.717 2.09-1.941 1.525c2.304 4.569 7.025 7.713 12.498 7.713Z"
10
14
  />
11
- <path d="M16 30c3.78 0 6.949-1.247 9.265-3.385l-4.544-3.525c-1.247.84-2.838 1.349-4.722 1.349-3.64 0-6.733-2.456-7.84-5.765l-2.717 2.09-1.941 1.525c2.304 4.569 7.025 7.713 12.498 7.713Z" />
12
15
  <path
13
16
  d="M8.16 18.66c-.28-.84-.445-1.731-.445-2.66s.165-1.82.445-2.66v-3.615H3.502c-.955 1.884-1.502 4.009-1.502 6.275s.547 4.391 1.502 6.275h3.332s1.327-3.615 1.327-3.615Z"
14
- opacity=".4"
17
+ fill="#FBBC05"
18
+ />
19
+ <path
20
+ fill="#EA4335"
21
+ d="M16 7.575c2.062 0 3.895.713 5.358 2.087l4.009-4.009c-2.431-2.265-5.587-3.653-9.367-3.653-5.473 0-10.195 3.144-12.498 7.725l4.658 3.615c1.107-3.309 4.2-5.765 7.84-5.765Z"
15
22
  />
16
- <path d="M16 7.575c2.062 0 3.895.713 5.358 2.087l4.009-4.009c-2.431-2.265-5.587-3.653-9.367-3.653-5.473 0-10.195 3.144-12.498 7.725l4.658 3.615c1.107-3.309 4.2-5.765 7.84-5.765Z" />
17
23
  </g>
18
24
  </Icon>
19
25
  );
@@ -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';
@@ -2,7 +2,7 @@ import type { SVGProps } from 'react';
2
2
 
3
3
  export function IconLinear(props: SVGProps<SVGSVGElement>) {
4
4
  return (
5
- <svg aria-hidden="true" viewBox="0 0 24 24" fill="currentColor" {...props}>
5
+ <svg aria-hidden="true" viewBox="0 0 24 24" fill="#5E6AD2" {...props}>
6
6
  <path d="M2.886 4.18A11.982 11.982 0 0 1 11.99 0C18.624 0 24 5.376 24 12.009c0 3.64-1.62 6.903-4.18 9.105L2.887 4.18ZM1.817 5.626l16.556 16.556c-.524.33-1.075.62-1.65.866L.951 7.277c.247-.575.537-1.126.866-1.65ZM.322 9.163l14.515 14.515c-.71.172-1.443.282-2.195.322L0 11.358a12 12 0 0 1 .322-2.195Zm-.17 4.862 9.823 9.824a12.02 12.02 0 0 1-9.824-9.824Z" />
7
7
  </svg>
8
8
  );
@@ -1,10 +1,30 @@
1
1
  import type { SVGProps } from 'react';
2
2
 
3
- // PostHog logo from Simple Icons, licensed under CC0.
3
+ // Source: https://svgl.app/library/posthog.svg
4
+ // The monochrome face follows the theme so it stays visible in dark mode.
4
5
  export function IconPostHog(props: SVGProps<SVGSVGElement>) {
5
6
  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" />
7
+ <svg aria-hidden="true" viewBox="0 0 50 30" fill="none" {...props}>
8
+ <path
9
+ fill="#1D4AFF"
10
+ d="M10.891 17.206a1 1 0 0 1-1.788 0l-.882-1.763a1 1 0 0 1 0-.894l.882-1.763a1 1 0 0 1 1.788 0l.882 1.763a1 1 0 0 1 0 .894l-.882 1.763zm0 9.997a1 1 0 0 1-1.788 0L8.22 25.44a1 1 0 0 1 0-.894l.882-1.763a1 1 0 0 1 1.788 0l.882 1.763a1 1 0 0 1 0 .894l-.882 1.763z"
11
+ />
12
+ <path
13
+ fill="#F9BD2B"
14
+ d="M0 23.408c0-.89 1.077-1.337 1.707-.707l4.583 4.583c.63.63.184 1.708-.707 1.708H1a1 1 0 0 1-1-1v-4.584zm0-4.828a1 1 0 0 0 .293.708l9.411 9.41a1 1 0 0 0 .707.294h5.17c.89 0 1.337-1.077.707-1.707l-14.58-14.58C1.077 12.074 0 12.52 0 13.41v5.17zm0-9.997a1 1 0 0 0 .293.707L19.7 28.7a1 1 0 0 0 .707.293h5.17c.89 0 1.337-1.078.707-1.708L1.707 2.707C1.077 2.077 0 2.523 0 3.414v5.17zm9.997 0a1 1 0 0 0 .293.707l17.994 17.995c.63.63 1.707.183 1.707-.708v-5.169a1 1 0 0 0-.293-.707L11.704 2.707c-.63-.63-1.707-.184-1.707.707v5.17zm11.704-5.876c-.63-.63-1.707-.184-1.707.707v5.17a1 1 0 0 0 .293.706l7.997 7.998c.63.63 1.707.183 1.707-.708v-5.169a1 1 0 0 0-.293-.707l-7.997-7.997z"
15
+ />
16
+ <path
17
+ fill="currentColor"
18
+ d="m42.525 23.53-9.413-9.412c-.63-.63-1.707-.184-1.707.707v13.167a1 1 0 0 0 1 1h14.58a1 1 0 0 0 1-1v-1.2c0-.552-.449-.993-.997-1.064a7.723 7.723 0 0 1-4.463-2.197zm-6.321 2.263a1.6 1.6 0 1 1 0-3.2 1.6 1.6 0 0 1 0 3.2z"
19
+ />
20
+ <path
21
+ fill="#1D4AFF"
22
+ d="M0 27.992a1 1 0 0 0 1 1h4.583c.891 0 1.337-1.078.707-1.708l-4.583-4.583c-.63-.63-1.707-.184-1.707.707v4.584zm9.997-16.995-8.29-8.29C1.077 2.077 0 2.523 0 3.414v5.17a1 1 0 0 0 .293.706l9.704 9.705v-7.998zm-8.29 1.707c-.63-.63-1.707-.184-1.707.707v5.17a1 1 0 0 0 .293.706l9.704 9.705v-7.998l-8.29-8.29z"
23
+ />
24
+ <path
25
+ fill="#F54E00"
26
+ d="M19.994 11.411a1 1 0 0 0-.293-.707l-7.997-7.997c-.63-.63-1.707-.184-1.707.707v5.17a1 1 0 0 0 .293.706l9.704 9.705V11.41zm-9.997 17.58h5.583c.891 0 1.337-1.077.707-1.707l-6.29-6.29v7.998zm0-17.994v7.583a1 1 0 0 0 .293.708l9.704 9.704v-7.584a1 1 0 0 0-.293-.707l-9.704-9.704z"
27
+ />
8
28
  </svg>
9
29
  );
10
30
  }