@creativecodeco/ui 0.5.0 → 0.6.1

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.
@@ -1,23 +1,22 @@
1
- /// <reference types="react" />
2
- /// <reference types="react" />
3
1
  import type { ButtonEvent } from '../types';
4
2
  export default function useSafeButtonProps({ onClick, onSubmit, loading, ...props }: React.ComponentPropsWithoutRef<'button'> & {
5
3
  loading?: boolean;
6
4
  }): {
7
5
  onClick: (event: ButtonEvent) => void;
8
6
  onSubmit: (event: ButtonEvent) => void;
9
- name?: string | undefined;
7
+ children?: import("react").ReactNode | undefined;
10
8
  color?: string | undefined;
9
+ name?: string | undefined;
11
10
  disabled?: boolean | undefined;
12
11
  onChange?: import("react").FormEventHandler<HTMLButtonElement> | undefined;
13
- value?: string | number | readonly string[] | undefined;
12
+ value?: string | readonly string[] | number | undefined;
14
13
  form?: string | undefined;
15
- formAction?: string | undefined;
14
+ formAction?: string | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS] | undefined;
16
15
  formEncType?: string | undefined;
17
16
  formMethod?: string | undefined;
18
17
  formNoValidate?: boolean | undefined;
19
18
  formTarget?: string | undefined;
20
- type?: "button" | "reset" | "submit" | undefined;
19
+ type?: "submit" | "reset" | "button" | undefined;
21
20
  defaultChecked?: boolean | undefined;
22
21
  defaultValue?: string | number | readonly string[] | undefined;
23
22
  suppressContentEditableWarning?: boolean | undefined;
@@ -62,34 +61,34 @@ export default function useSafeButtonProps({ onClick, onSubmit, loading, ...prop
62
61
  itemRef?: string | undefined;
63
62
  results?: number | undefined;
64
63
  security?: string | undefined;
65
- unselectable?: "off" | "on" | undefined;
66
- inputMode?: "search" | "email" | "tel" | "text" | "url" | "none" | "numeric" | "decimal" | undefined;
64
+ unselectable?: "on" | "off" | undefined;
65
+ inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined;
67
66
  is?: string | undefined;
68
67
  "aria-activedescendant"?: string | undefined;
69
68
  "aria-atomic"?: (boolean | "true" | "false") | undefined;
70
- "aria-autocomplete"?: "list" | "none" | "inline" | "both" | undefined;
69
+ "aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined;
71
70
  "aria-braillelabel"?: string | undefined;
72
71
  "aria-brailleroledescription"?: string | undefined;
73
72
  "aria-busy"?: (boolean | "true" | "false") | undefined;
74
- "aria-checked"?: boolean | "true" | "false" | "mixed" | undefined;
73
+ "aria-checked"?: boolean | "false" | "mixed" | "true" | undefined;
75
74
  "aria-colcount"?: number | undefined;
76
75
  "aria-colindex"?: number | undefined;
77
76
  "aria-colindextext"?: string | undefined;
78
77
  "aria-colspan"?: number | undefined;
79
78
  "aria-controls"?: string | undefined;
80
- "aria-current"?: boolean | "step" | "date" | "time" | "true" | "false" | "page" | "location" | undefined;
79
+ "aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined;
81
80
  "aria-describedby"?: string | undefined;
82
81
  "aria-description"?: string | undefined;
83
82
  "aria-details"?: string | undefined;
84
83
  "aria-disabled"?: (boolean | "true" | "false") | undefined;
85
- "aria-dropeffect"?: "link" | "none" | "copy" | "execute" | "move" | "popup" | undefined;
84
+ "aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined;
86
85
  "aria-errormessage"?: string | undefined;
87
86
  "aria-expanded"?: (boolean | "true" | "false") | undefined;
88
87
  "aria-flowto"?: string | undefined;
89
88
  "aria-grabbed"?: (boolean | "true" | "false") | undefined;
90
- "aria-haspopup"?: boolean | "true" | "false" | "dialog" | "grid" | "listbox" | "menu" | "tree" | undefined;
89
+ "aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined;
91
90
  "aria-hidden"?: (boolean | "true" | "false") | undefined;
92
- "aria-invalid"?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
91
+ "aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
93
92
  "aria-keyshortcuts"?: string | undefined;
94
93
  "aria-label"?: string | undefined;
95
94
  "aria-labelledby"?: string | undefined;
@@ -102,9 +101,9 @@ export default function useSafeButtonProps({ onClick, onSubmit, loading, ...prop
102
101
  "aria-owns"?: string | undefined;
103
102
  "aria-placeholder"?: string | undefined;
104
103
  "aria-posinset"?: number | undefined;
105
- "aria-pressed"?: boolean | "true" | "false" | "mixed" | undefined;
104
+ "aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined;
106
105
  "aria-readonly"?: (boolean | "true" | "false") | undefined;
107
- "aria-relevant"?: "text" | "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
106
+ "aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined;
108
107
  "aria-required"?: (boolean | "true" | "false") | undefined;
109
108
  "aria-roledescription"?: string | undefined;
110
109
  "aria-rowcount"?: number | undefined;
@@ -118,7 +117,6 @@ export default function useSafeButtonProps({ onClick, onSubmit, loading, ...prop
118
117
  "aria-valuemin"?: number | undefined;
119
118
  "aria-valuenow"?: number | undefined;
120
119
  "aria-valuetext"?: string | undefined;
121
- children?: import("react").ReactNode;
122
120
  dangerouslySetInnerHTML?: {
123
121
  __html: string | TrustedHTML;
124
122
  } | undefined;
@@ -258,9 +256,7 @@ export default function useSafeButtonProps({ onClick, onSubmit, loading, ...prop
258
256
  onPointerCancel?: import("react").PointerEventHandler<HTMLButtonElement> | undefined;
259
257
  onPointerCancelCapture?: import("react").PointerEventHandler<HTMLButtonElement> | undefined;
260
258
  onPointerEnter?: import("react").PointerEventHandler<HTMLButtonElement> | undefined;
261
- onPointerEnterCapture?: import("react").PointerEventHandler<HTMLButtonElement> | undefined;
262
259
  onPointerLeave?: import("react").PointerEventHandler<HTMLButtonElement> | undefined;
263
- onPointerLeaveCapture?: import("react").PointerEventHandler<HTMLButtonElement> | undefined;
264
260
  onPointerOver?: import("react").PointerEventHandler<HTMLButtonElement> | undefined;
265
261
  onPointerOverCapture?: import("react").PointerEventHandler<HTMLButtonElement> | undefined;
266
262
  onPointerOut?: import("react").PointerEventHandler<HTMLButtonElement> | undefined;
@@ -0,0 +1,45 @@
1
+ .badge {
2
+ &-size {
3
+ &-lg {
4
+ @apply badge-lg;
5
+ }
6
+
7
+ &-sm {
8
+ @apply badge-sm;
9
+ }
10
+
11
+ &-xs {
12
+ @apply badge-xs;
13
+ }
14
+ }
15
+
16
+ &-color {
17
+ &-primary {
18
+ @apply badge-primary;
19
+ }
20
+
21
+ &-secondary {
22
+ @apply badge-secondary;
23
+ }
24
+
25
+ &-accent {
26
+ @apply badge-accent;
27
+ }
28
+
29
+ &-success {
30
+ @apply badge-success;
31
+ }
32
+
33
+ &-warning {
34
+ @apply badge-warning;
35
+ }
36
+
37
+ &-info {
38
+ @apply badge-info;
39
+ }
40
+
41
+ &-error {
42
+ @apply badge-error;
43
+ }
44
+ }
45
+ }
@@ -1,6 +1,4 @@
1
1
  .button {
2
- @apply btn;
3
-
4
2
  &-link {
5
3
  @apply btn-link;
6
4
  }
@@ -41,6 +39,10 @@
41
39
  &-error {
42
40
  @apply btn-error;
43
41
  }
42
+
43
+ &-ghost {
44
+ @apply btn-ghost;
45
+ }
44
46
  }
45
47
 
46
48
  &-size {
@@ -4,6 +4,7 @@
4
4
 
5
5
  @import './accordion.css';
6
6
  @import './avatar.css';
7
+ @import './badge.css';
7
8
  @import './button.css';
8
9
  @import './checkbox.css';
9
10
  @import './radio.css';