@heliosgraphics/ui 2.0.0-alpha.66 → 2.0.0-alpha.68

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.
@@ -11,6 +11,10 @@ export const meta: HeliosAttributeMeta<ConfirmProps> = {
11
11
  ],
12
12
  _status: "experimental",
13
13
  _category: "pattern",
14
+ buttonGroupAlign: {
15
+ type: "'left' | 'center' | 'right'",
16
+ isOptional: true,
17
+ },
14
18
  cancelText: {
15
19
  type: "string",
16
20
  },
@@ -3,21 +3,22 @@ import type { ConfirmProps } from "./Confirm.types"
3
3
  import type { FC } from "react"
4
4
 
5
5
  export const Confirm: FC<ConfirmProps> = ({
6
+ buttonGroupAlign,
7
+ cancelText,
8
+ confirmText,
9
+ description,
10
+ icon,
11
+ intent,
12
+ isOpen,
6
13
  onCancel,
7
14
  onConfirm,
8
- isOpen,
9
15
  title,
10
- intent,
11
- description,
12
- icon,
13
- cancelText,
14
- confirmText,
15
16
  }) => {
16
17
  return (
17
18
  <Dialog title={title} onClose={onCancel} isOpen={isOpen} isCentered={true}>
18
19
  <Flex gap={12} isColumn={true}>
19
20
  {!!description && <Text type="paragraph">{description}</Text>}
20
- <ButtonGroup>
21
+ <ButtonGroup align={buttonGroupAlign}>
21
22
  <Button intent={intent} value={confirmText} onClick={onConfirm} {...(icon && { icon })} />
22
23
  <Button intent="neutral" value={cancelText} onClick={onCancel} />
23
24
  </ButtonGroup>
@@ -1,8 +1,9 @@
1
- import type { HeliosIconType, HeliosIntentionType } from "../.."
1
+ import type { ButtonGroupProps, HeliosIconType, HeliosIntentionType } from "../.."
2
2
 
3
3
  export interface ConfirmProps {
4
4
  cancelText: string
5
5
  confirmText: string
6
+ buttonGroupAlign?: ButtonGroupProps["align"]
6
7
  description?: string
7
8
  icon?: HeliosIconType
8
9
  intent: HeliosIntentionType
@@ -9,7 +9,7 @@ import { getClasses } from "@heliosgraphics/utils"
9
9
  import { getColorMap } from "./Debug.utils"
10
10
 
11
11
  export const Debug: FC<DebugProps> = ({ color = "gray", appearance = "dark" }) => {
12
- const debugClasses: string = getClasses(styles.debug, "elevation-large")
12
+ const debugClasses: string = getClasses(styles.debug, "elevation-lg")
13
13
  const colorMap = getColorMap(color)
14
14
 
15
15
  const [isClosed, setIsClosed] = useState(false)
@@ -68,7 +68,7 @@ export const Dialog: FC<DialogProps> = ({ title, children, isNarrow, isOpen, isC
68
68
  return isDialog && onClose()
69
69
  }
70
70
 
71
- const dialogClasses: string = getClasses(styles.dialog, "helios-scrollbar", "elevation-large", {
71
+ const dialogClasses: string = getClasses(styles.dialog, "ui-scrollbar", "elevation-lg", {
72
72
  [styles.dialogCentered]: isCentered,
73
73
  [styles.dialogNarrow]: isNarrow,
74
74
  })
@@ -27,9 +27,9 @@ export const getFlexUtility = (props?: FlexProps): string => {
27
27
  if (props.onClick) flexClasses.add("cursor-pointer")
28
28
  if (props.isFullWidth) flexClasses.add("wp-100")
29
29
  if (props.isNoWrap) flexClasses.add("nowrap")
30
- if (props.elevation === "small") flexClasses.add("elevation-small")
31
- if (props.elevation === "medium") flexClasses.add("elevation-medium")
32
- if (props.elevation === "large") flexClasses.add("elevation-large")
30
+ if (props.elevation === "small") flexClasses.add("elevation-sm")
31
+ if (props.elevation === "medium") flexClasses.add("elevation-md")
32
+ if (props.elevation === "large") flexClasses.add("elevation-lg")
33
33
  if (flexGrow > 0 && flexGrow <= 8) flexClasses.add(`grow-${props.grow}`)
34
34
 
35
35
  if (props.withRadius) {
@@ -19,6 +19,27 @@
19
19
  backdrop-filter: blur(3px);
20
20
  }
21
21
 
22
+ /* radius utilities */
23
+ .radius-none {
24
+ border-radius: 0;
25
+ }
26
+
27
+ .radius-small {
28
+ border-radius: var(--radius-sm);
29
+ }
30
+
31
+ .radius-normal {
32
+ border-radius: var(--radius-md);
33
+ }
34
+
35
+ .radius-large {
36
+ border-radius: var(--radius-lg);
37
+ }
38
+
39
+ .radius-max {
40
+ border-radius: 9999px;
41
+ }
42
+
22
43
  /* scrollbar */
23
44
  .ui-scrollbar::-webkit-scrollbar {
24
45
  height: 10px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heliosgraphics/ui",
3
- "version": "2.0.0-alpha.66",
3
+ "version": "2.0.0-alpha.68",
4
4
  "type": "module",
5
5
  "author": "Chris Puska <chris@puska.org>",
6
6
  "private": false,