@redgate/brand-web-toolkit 0.0.2 → 0.0.4
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/components/icons/Icon.d.ts +11 -1
- package/components/icons/Icon.js +6 -3
- package/components/icons/Icon.js.map +1 -1
- package/components/icons/Icons.d.ts +59 -59
- package/components/testing/Test.d.ts +1 -0
- package/package.json +1 -1
- package/tailwindcss/pass.css +560 -0
- package/tailwindcss/{output.css → redgate.css} +142 -47
- package/tailwindcss/sql-server-central.css +560 -0
- package/tailwindcss/src/global/base.css +39 -0
- package/tailwindcss/src/global/colours.css +112 -0
- package/tailwindcss/src/global/containers.css +6 -0
- package/tailwindcss/src/global/radius.css +15 -0
- package/tailwindcss/src/global/spacing.css +54 -0
- package/tailwindcss/src/global/theme.css +1 -0
- package/tailwindcss/src/global/typography.css +146 -0
- package/tailwindcss/src/global/widths.css +15 -0
- package/tailwindcss/src/pass/input.css +381 -0
- package/tailwindcss/src/redgate/input.css +330 -0
- package/tailwindcss/src/sql-server-central/input.css +347 -0
|
@@ -2,12 +2,22 @@ import Icons from './Icons';
|
|
|
2
2
|
export type IIcon = {
|
|
3
3
|
icon: keyof typeof Icons;
|
|
4
4
|
size?: number | string;
|
|
5
|
+
/**
|
|
6
|
+
* Label is the accessible name for the icon. Only pass this when the icon is used
|
|
7
|
+
* on its own (e.g. an icon-only button/link) and needs to convey
|
|
8
|
+
* meaning to assistive tech.
|
|
9
|
+
*/
|
|
10
|
+
label?: string;
|
|
5
11
|
};
|
|
6
12
|
export type IIconSvg = {
|
|
7
13
|
width: number | string;
|
|
8
14
|
height: number | string;
|
|
15
|
+
role?: string;
|
|
16
|
+
'aria-label'?: string;
|
|
17
|
+
'aria-hidden'?: boolean;
|
|
18
|
+
focusable?: boolean;
|
|
9
19
|
};
|
|
10
20
|
export declare const defaults: {
|
|
11
21
|
size: string;
|
|
12
22
|
};
|
|
13
|
-
export default function Icon(props: IIcon): import("react").JSX.Element | undefined;
|
|
23
|
+
export default function Icon(props: IIcon): import("react/jsx-runtime").JSX.Element | undefined;
|
package/components/icons/Icon.js
CHANGED
|
@@ -8,12 +8,15 @@ function Icon(props) {
|
|
|
8
8
|
return;
|
|
9
9
|
// Filter out any empty or blank values from props, so that defaults are
|
|
10
10
|
// applied.
|
|
11
|
-
const filteredProps = Object.entries(props).reduce((a, [k, v]) => (v !== '' && v !== null ? (
|
|
11
|
+
const filteredProps = Object.entries(props).reduce((a, [k, v]) => (v !== '' && v !== null ? (a[k] = v, a) : a), {});
|
|
12
12
|
const p = { ...defaults, ...filteredProps };
|
|
13
13
|
// Map the props to SVG props.
|
|
14
14
|
const svgProps = {
|
|
15
|
-
width: p.size,
|
|
16
|
-
height: p.size,
|
|
15
|
+
width: p.size ?? defaults.size,
|
|
16
|
+
height: p.size ?? defaults.size,
|
|
17
|
+
...(p.label
|
|
18
|
+
? { role: 'img', 'aria-label': p.label }
|
|
19
|
+
: { 'aria-hidden': true, focusable: false }),
|
|
17
20
|
};
|
|
18
21
|
return Icons[props.icon](svgProps);
|
|
19
22
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.js","sources":["../../../../components/icons/Icon.tsx"],"sourcesContent":["import Icons from './Icons';\n\nexport type IIcon = {\n icon: keyof typeof Icons;\n size?: number | string;\n};\n\nexport type IIconSvg = {\n width: number | string;\n height: number | string;\n};\n\nexport const defaults = {\n size: '100%',\n};\n\nexport default function Icon(props: IIcon) {\n if (!props.icon) return;\n\n // Filter out any empty or blank values from props, so that defaults are\n // applied.\n const filteredProps = Object.entries(props).reduce<
|
|
1
|
+
{"version":3,"file":"Icon.js","sources":["../../../../components/icons/Icon.tsx"],"sourcesContent":["import Icons from './Icons';\n\nexport type IIcon = {\n icon: keyof typeof Icons;\n size?: number | string;\n /**\n * Label is the accessible name for the icon. Only pass this when the icon is used\n * on its own (e.g. an icon-only button/link) and needs to convey\n * meaning to assistive tech.\n */\n label?: string;\n};\n\nexport type IIconSvg = {\n width: number | string;\n height: number | string;\n role?: string;\n 'aria-label'?: string;\n 'aria-hidden'?: boolean;\n focusable?: boolean;\n};\n\nexport const defaults = {\n size: '100%',\n};\n\nexport default function Icon(props: IIcon) {\n if (!props.icon) return;\n\n // Filter out any empty or blank values from props, so that defaults are\n // applied.\n const filteredProps = Object.entries(props).reduce<Partial<IIcon>>(\n (a, [k, v]) => (v !== '' && v !== null ? ((a as any)[k] = v, a) : a),\n {},\n );\n\n const p: Partial<IIcon> = { ...defaults, ...filteredProps };\n\n // Map the props to SVG props.\n const svgProps: IIconSvg = {\n width: p.size ?? defaults.size,\n height: p.size ?? defaults.size,\n ...(p.label\n ? { role: 'img', 'aria-label': p.label }\n : { 'aria-hidden': true, focusable: false }),\n };\n\n return Icons[props.icon](svgProps);\n}\n"],"names":[],"mappings":";;AAsBO,MAAM,QAAQ,GAAG;AACpB,IAAA,IAAI,EAAE,MAAM;;AAGF,SAAU,IAAI,CAAC,KAAY,EAAA;IACrC,IAAI,CAAC,KAAK,CAAC,IAAI;QAAE;;;IAIjB,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,CAC9C,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,IAAI,IAAK,CAAS,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,EACpE,EAAE,CACL;IAED,MAAM,CAAC,GAAmB,EAAE,GAAG,QAAQ,EAAE,GAAG,aAAa,EAAE;;AAG3D,IAAA,MAAM,QAAQ,GAAa;AACvB,QAAA,KAAK,EAAE,CAAC,CAAC,IAAI,IAAI,QAAQ,CAAC,IAAI;AAC9B,QAAA,MAAM,EAAE,CAAC,CAAC,IAAI,IAAI,QAAQ,CAAC,IAAI;QAC/B,IAAI,CAAC,CAAC;cACA,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,CAAC,KAAK;cACpC,EAAE,aAAa,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;KACnD;IAED,OAAO,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC;AACtC;;;;"}
|
|
@@ -1,63 +1,63 @@
|
|
|
1
1
|
import { IIconSvg } from './Icon';
|
|
2
2
|
declare const _default: {
|
|
3
|
-
AddIn: (props?: IIconSvg) => import("react").JSX.Element;
|
|
4
|
-
Alert: (props?: IIconSvg) => import("react").JSX.Element;
|
|
5
|
-
ArrowDownCircle: (props?: IIconSvg) => import("react").JSX.Element;
|
|
6
|
-
ArrowDown: (props?: IIconSvg) => import("react").JSX.Element;
|
|
7
|
-
ArrowLeftCircle: (props?: IIconSvg) => import("react").JSX.Element;
|
|
8
|
-
ArrowLeft: (props?: IIconSvg) => import("react").JSX.Element;
|
|
9
|
-
ArrowRightCircle: (props?: IIconSvg) => import("react").JSX.Element;
|
|
10
|
-
ArrowRight: (props?: IIconSvg) => import("react").JSX.Element;
|
|
11
|
-
ArrowUpCircle: (props?: IIconSvg) => import("react").JSX.Element;
|
|
12
|
-
ArrowUp: (props?: IIconSvg) => import("react").JSX.Element;
|
|
13
|
-
Bookmark: (props?: IIconSvg) => import("react").JSX.Element;
|
|
14
|
-
Bookmarked: (props?: IIconSvg) => import("react").JSX.Element;
|
|
15
|
-
ChevronDown: (props?: IIconSvg) => import("react").JSX.Element;
|
|
16
|
-
ChevronLeft: (props?: IIconSvg) => import("react").JSX.Element;
|
|
17
|
-
ChevronRight: (props?: IIconSvg) => import("react").JSX.Element;
|
|
18
|
-
ChevronUp: (props?: IIconSvg) => import("react").JSX.Element;
|
|
19
|
-
Clock: (props?: IIconSvg) => import("react").JSX.Element;
|
|
20
|
-
CloseCircle: (props?: IIconSvg) => import("react").JSX.Element;
|
|
21
|
-
CloudDatabase: (props?: IIconSvg) => import("react").JSX.Element;
|
|
22
|
-
CloudServer: (props?: IIconSvg) => import("react").JSX.Element;
|
|
23
|
-
Cloud: (props?: IIconSvg) => import("react").JSX.Element;
|
|
24
|
-
Copy: (props?: IIconSvg) => import("react").JSX.Element;
|
|
25
|
-
DatabaseCopy: (props?: IIconSvg) => import("react").JSX.Element;
|
|
26
|
-
DatabaseImage: (props?: IIconSvg) => import("react").JSX.Element;
|
|
27
|
-
Database: (props?: IIconSvg) => import("react").JSX.Element;
|
|
28
|
-
Databases: (props?: IIconSvg) => import("react").JSX.Element;
|
|
29
|
-
Doc: (props?: IIconSvg) => import("react").JSX.Element;
|
|
30
|
-
DotsHorizontal: (props?: IIconSvg) => import("react").JSX.Element;
|
|
31
|
-
DotsVertical: (props?: IIconSvg) => import("react").JSX.Element;
|
|
32
|
-
Download: (props?: IIconSvg) => import("react").JSX.Element;
|
|
33
|
-
Edit: (props?: IIconSvg) => import("react").JSX.Element;
|
|
34
|
-
Expand: (props?: IIconSvg) => import("react").JSX.Element;
|
|
35
|
-
Export: (props?: IIconSvg) => import("react").JSX.Element;
|
|
36
|
-
Flag: (props?: IIconSvg) => import("react").JSX.Element;
|
|
37
|
-
Globe: (props?: IIconSvg) => import("react").JSX.Element;
|
|
38
|
-
Home: (props?: IIconSvg) => import("react").JSX.Element;
|
|
39
|
-
Import: (props?: IIconSvg) => import("react").JSX.Element;
|
|
40
|
-
Instance: (props?: IIconSvg) => import("react").JSX.Element;
|
|
41
|
-
LinkExternal: (props?: IIconSvg) => import("react").JSX.Element;
|
|
42
|
-
LogIn: (props?: IIconSvg) => import("react").JSX.Element;
|
|
43
|
-
LogOut: (props?: IIconSvg) => import("react").JSX.Element;
|
|
44
|
-
Map: (props?: IIconSvg) => import("react").JSX.Element;
|
|
45
|
-
MinusCircle: (props?: IIconSvg) => import("react").JSX.Element;
|
|
46
|
-
Minus: (props?: IIconSvg) => import("react").JSX.Element;
|
|
47
|
-
PlayCircle: (props?: IIconSvg) => import("react").JSX.Element;
|
|
48
|
-
PlayVideo: (props?: IIconSvg) => import("react").JSX.Element;
|
|
49
|
-
Play: (props?: IIconSvg) => import("react").JSX.Element;
|
|
50
|
-
PlusCircle: (props?: IIconSvg) => import("react").JSX.Element;
|
|
51
|
-
Plus: (props?: IIconSvg) => import("react").JSX.Element;
|
|
52
|
-
Rss: (props?: IIconSvg) => import("react").JSX.Element;
|
|
53
|
-
Search: (props?: IIconSvg) => import("react").JSX.Element;
|
|
54
|
-
ServerCluster: (props?: IIconSvg) => import("react").JSX.Element;
|
|
55
|
-
Server: (props?: IIconSvg) => import("react").JSX.Element;
|
|
56
|
-
Share: (props?: IIconSvg) => import("react").JSX.Element;
|
|
57
|
-
Stop: (props?: IIconSvg) => import("react").JSX.Element;
|
|
58
|
-
Tag: (props?: IIconSvg) => import("react").JSX.Element;
|
|
59
|
-
TickCircle: (props?: IIconSvg) => import("react").JSX.Element;
|
|
60
|
-
Tick: (props?: IIconSvg) => import("react").JSX.Element;
|
|
61
|
-
VerifiedTickBadge: (props?: IIconSvg) => import("react").JSX.Element;
|
|
3
|
+
AddIn: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
Alert: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
ArrowDownCircle: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
ArrowDown: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
ArrowLeftCircle: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
ArrowLeft: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
ArrowRightCircle: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
ArrowRight: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
ArrowUpCircle: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
ArrowUp: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
Bookmark: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
Bookmarked: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
ChevronDown: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
ChevronLeft: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
ChevronRight: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
ChevronUp: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
Clock: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
CloseCircle: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
CloudDatabase: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
CloudServer: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
Cloud: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
Copy: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
DatabaseCopy: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
DatabaseImage: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
Database: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
Databases: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
Doc: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
DotsHorizontal: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
DotsVertical: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
Download: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
Edit: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
Expand: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
Export: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
Flag: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
Globe: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
Home: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
Import: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
Instance: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
LinkExternal: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
LogIn: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
LogOut: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
Map: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
MinusCircle: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
Minus: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
47
|
+
PlayCircle: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
48
|
+
PlayVideo: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
49
|
+
Play: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
50
|
+
PlusCircle: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
51
|
+
Plus: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
52
|
+
Rss: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
53
|
+
Search: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
54
|
+
ServerCluster: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
55
|
+
Server: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
56
|
+
Share: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
57
|
+
Stop: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
58
|
+
Tag: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
59
|
+
TickCircle: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
60
|
+
Tick: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
61
|
+
VerifiedTickBadge: (props?: IIconSvg) => import("react/jsx-runtime").JSX.Element;
|
|
62
62
|
};
|
|
63
63
|
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function Test(): import("react/jsx-runtime").JSX.Element;
|