@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.
- package/lib/hooks/use-safe-button-props.hook.d.ts +15 -19
- package/lib/theme/css/badge.css +45 -0
- package/lib/theme/css/button.css +4 -2
- package/lib/theme/css/main.css +1 -0
- package/lib/theme/main.css +694 -262
- package/lib/types/helpers/controller.types.d.ts +0 -1
- package/lib/types/ui/base/dom.types.d.ts +0 -1
- package/lib/types/ui/components/accordion.types.d.ts +0 -1
- package/lib/types/ui/components/badge.types.d.ts +11 -0
- package/lib/types/ui/components/badge.types.js +1 -0
- package/lib/types/ui/components/button.types.d.ts +4 -2
- package/lib/types/ui/components/index.d.ts +1 -0
- package/lib/types/ui/forms/dropdown.types.d.ts +0 -1
- package/lib/types/ui/forms/text-box.types.d.ts +0 -1
- package/lib/ui/components/badge/badge.component.d.ts +3 -0
- package/lib/ui/components/badge/badge.component.js +19 -0
- package/lib/ui/components/badge/index.d.ts +2 -0
- package/lib/ui/components/badge/index.js +2 -0
- package/lib/ui/components/button/button.component.js +4 -3
- package/lib/ui/components/index.d.ts +1 -0
- package/lib/ui/components/index.js +1 -0
- package/package.json +43 -42
|
@@ -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
|
-
|
|
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 |
|
|
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?: "
|
|
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?: "
|
|
66
|
-
inputMode?: "
|
|
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"?: "
|
|
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 | "
|
|
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 | "
|
|
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"?: "
|
|
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 | "
|
|
89
|
+
"aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined;
|
|
91
90
|
"aria-hidden"?: (boolean | "true" | "false") | undefined;
|
|
92
|
-
"aria-invalid"?: boolean | "
|
|
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 | "
|
|
104
|
+
"aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined;
|
|
106
105
|
"aria-readonly"?: (boolean | "true" | "false") | undefined;
|
|
107
|
-
"aria-relevant"?: "
|
|
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
|
+
}
|
package/lib/theme/css/button.css
CHANGED