@newtonschool/grauity 0.0.3 → 0.0.9
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/dist/fonts/grauity-icons.eot +0 -0
- package/dist/index.d.ts +170 -7
- package/dist/index.d.ts.map +1 -1
- package/package.json +7 -7
- package/ui/fonts/grauity-icons.eot +0 -0
- package/ui/core/colors/colorTypes.d.ts.map +0 -1
- package/ui/core/colors/index.d.ts.map +0 -1
- package/ui/core/icons/iconTags.d.ts.map +0 -1
- package/ui/core/icons/iconTypes.d.ts.map +0 -1
- package/ui/core/icons/index.d.ts.map +0 -1
- package/ui/core/index.d.ts.map +0 -1
|
Binary file
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,170 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
type grauityIconSizeName = '4' | '8' | '12' | '16' | '20' | '24' | '28' | '32' | '36' | '40';
|
|
3
|
+
type grauityIconColorName = 'white' | 'black' | 'grey' | 'blue' | 'red' | 'green' | 'orange' | 'yellow' | 'purple';
|
|
4
|
+
type grauityIconName = 'school-left' | 'school' | 'code' | 'today' | 'person';
|
|
5
|
+
export const ICON_TAGS: {
|
|
6
|
+
"school-left": string[];
|
|
7
|
+
school: string[];
|
|
8
|
+
code: string[];
|
|
9
|
+
today: string[];
|
|
10
|
+
person: string[];
|
|
11
|
+
};
|
|
12
|
+
export const TAG_ICONS: {
|
|
13
|
+
buildings: string[];
|
|
14
|
+
code: string[];
|
|
15
|
+
objects: string[];
|
|
16
|
+
states: string[];
|
|
17
|
+
calendar: string[];
|
|
18
|
+
usersAndPeople: string[];
|
|
19
|
+
};
|
|
20
|
+
type grauityFlippedChoiceName = 'vertically' | 'horizontally';
|
|
21
|
+
type grauityRotatedChoiceName = 'clockwise' | 'counterclockwise';
|
|
22
|
+
export interface GrauityInitProps {
|
|
23
|
+
/**
|
|
24
|
+
* An element type to render as (string or function).
|
|
25
|
+
* */
|
|
26
|
+
as: React.ElementType;
|
|
27
|
+
/**
|
|
28
|
+
* The font size to be applied on this element and so will act as standard for the `ems` of all grauity components.
|
|
29
|
+
* */
|
|
30
|
+
fontSize: string;
|
|
31
|
+
/**
|
|
32
|
+
* The multiplier is multiplied will all the `ems` of the grauity components.
|
|
33
|
+
* */
|
|
34
|
+
multiplier?: number;
|
|
35
|
+
/**
|
|
36
|
+
* The children to be rendered inside this component.
|
|
37
|
+
* */
|
|
38
|
+
children?: React.ReactNode;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* This component is used to initialize the Grauity library. Ideally, it should be the root component of your application.
|
|
42
|
+
* But nonetheless all the grauity components should be the children of this component.
|
|
43
|
+
* */
|
|
44
|
+
export function GrauityInit({ as, fontSize, multiplier, children }: GrauityInitProps): JSX.Element;
|
|
45
|
+
declare namespace GrauityInit {
|
|
46
|
+
var propTypes: {
|
|
47
|
+
as: PropTypes.Requireable<PropTypes.ReactComponentLike>;
|
|
48
|
+
fontSize: PropTypes.Requireable<string>;
|
|
49
|
+
multiplier: PropTypes.Requireable<number>;
|
|
50
|
+
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
51
|
+
};
|
|
52
|
+
var defaultProps: {
|
|
53
|
+
as: string;
|
|
54
|
+
fontSize: string;
|
|
55
|
+
multiplier: number;
|
|
56
|
+
children: any;
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
export interface IconProps {
|
|
60
|
+
/**
|
|
61
|
+
* Icon can have the aria hidden attribute
|
|
62
|
+
* */
|
|
63
|
+
ariaHidden?: string;
|
|
64
|
+
/**
|
|
65
|
+
* Icon can have the aria label attribute
|
|
66
|
+
* */
|
|
67
|
+
ariaLabel?: string;
|
|
68
|
+
/**
|
|
69
|
+
* An element type to render as (string or function).
|
|
70
|
+
* */
|
|
71
|
+
as?: React.ElementType;
|
|
72
|
+
/**
|
|
73
|
+
* Format the icon to appear bordered
|
|
74
|
+
* */
|
|
75
|
+
bordered?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Format the icon to appear circular
|
|
78
|
+
* */
|
|
79
|
+
circular?: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Color of the icon
|
|
82
|
+
* */
|
|
83
|
+
color?: grauityIconColorName;
|
|
84
|
+
/**
|
|
85
|
+
* Additional classes to be added to the component
|
|
86
|
+
* */
|
|
87
|
+
className?: string;
|
|
88
|
+
/**
|
|
89
|
+
* Show that the icon is inactive
|
|
90
|
+
* */
|
|
91
|
+
disabled?: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* Fitted, without space to left or right of Icon
|
|
94
|
+
* */
|
|
95
|
+
fitted?: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* Icon can be flipped
|
|
98
|
+
* */
|
|
99
|
+
flipped?: grauityFlippedChoiceName;
|
|
100
|
+
/**
|
|
101
|
+
* The colors of the icon can be inverted in case of used with border
|
|
102
|
+
* * */
|
|
103
|
+
inverted?: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* Icon can be formatted as a link
|
|
106
|
+
* */
|
|
107
|
+
link?: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* Icon can be used as a simple loader
|
|
110
|
+
* */
|
|
111
|
+
loading?: boolean;
|
|
112
|
+
/**
|
|
113
|
+
* Name of the icon
|
|
114
|
+
* */
|
|
115
|
+
name: grauityIconName;
|
|
116
|
+
/**
|
|
117
|
+
* Icon can be rotated
|
|
118
|
+
* */
|
|
119
|
+
rotated?: grauityRotatedChoiceName;
|
|
120
|
+
/**
|
|
121
|
+
* Size of the icon
|
|
122
|
+
* */
|
|
123
|
+
size?: grauityIconSizeName;
|
|
124
|
+
/**
|
|
125
|
+
* Additional styles to be used over the element
|
|
126
|
+
* */
|
|
127
|
+
style?: React.CSSProperties;
|
|
128
|
+
}
|
|
129
|
+
export function Icon({ ariaHidden, ariaLabel, as, bordered, circular, color, className, disabled, fitted, flipped, inverted, link, loading, name, rotated, size, style, ...props }: IconProps): JSX.Element;
|
|
130
|
+
declare namespace Icon {
|
|
131
|
+
var propTypes: {
|
|
132
|
+
ariaHidden: PropTypes.Requireable<string>;
|
|
133
|
+
ariaLabel: PropTypes.Requireable<string>;
|
|
134
|
+
as: PropTypes.Requireable<PropTypes.ReactComponentLike>;
|
|
135
|
+
bordered: PropTypes.Requireable<boolean>;
|
|
136
|
+
circular: PropTypes.Requireable<boolean>;
|
|
137
|
+
color: PropTypes.Requireable<import("core").GRAUITY_COLOR>;
|
|
138
|
+
className: PropTypes.Requireable<string>;
|
|
139
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
140
|
+
fitted: PropTypes.Requireable<boolean>;
|
|
141
|
+
flipped: PropTypes.Requireable<import("core/miscellaneous-choices").GRAUITY_FLIPPED_CHOICES>;
|
|
142
|
+
inverted: PropTypes.Requireable<boolean>;
|
|
143
|
+
link: PropTypes.Requireable<boolean>;
|
|
144
|
+
loading: PropTypes.Requireable<boolean>;
|
|
145
|
+
name: PropTypes.Validator<string>;
|
|
146
|
+
rotated: PropTypes.Requireable<import("core/miscellaneous-choices").GRAUITY_ROTATED_CHOICES>;
|
|
147
|
+
size: PropTypes.Requireable<import("core").GRAUITY_SIZE>;
|
|
148
|
+
style: PropTypes.Requireable<object>;
|
|
149
|
+
};
|
|
150
|
+
var defaultProps: {
|
|
151
|
+
ariaHidden: string;
|
|
152
|
+
ariaLabel: any;
|
|
153
|
+
as: string;
|
|
154
|
+
bordered: boolean;
|
|
155
|
+
circular: boolean;
|
|
156
|
+
color: string;
|
|
157
|
+
className: any;
|
|
158
|
+
disabled: boolean;
|
|
159
|
+
fitted: boolean;
|
|
160
|
+
flipped: any;
|
|
161
|
+
inverted: boolean;
|
|
162
|
+
link: boolean;
|
|
163
|
+
loading: boolean;
|
|
164
|
+
rotated: any;
|
|
165
|
+
size: string;
|
|
166
|
+
style: any;
|
|
167
|
+
};
|
|
168
|
+
}
|
|
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C,EAAE,oBAAoB,CAAC;IAE7B;;SAEK;IACL,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;SAEK;IACL,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;SAEK;IACL,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;SAEK;IACL,OAAO,CAAC,EAAE,wBAAwB,CAAC;IAEnC;;WAEO;IACP,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;SAEK;IACL,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf;;SAEK;IACL,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;SAEK;IACL,IAAI,EAAE,eAAe,CAAC;IAEtB;;SAEK;IACL,OAAO,CAAC,EAAE,wBAAwB,CAAC;IAEnC;;SAEK;IACL,IAAI,CAAC,EAAE,mBAAmB,CAAC;IAE3B;;SAEK;IACL,KAAK,CAAC,EAAE,MAAM,aAAa,CAAC;CAC/B;AAED,qBAAc,EACV,UAAU,EACV,SAAS,EACT,EAAE,EACF,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,SAAS,EACT,QAAQ,EACR,MAAM,EACN,OAAO,EACP,QAAQ,EACR,IAAI,EACJ,OAAO,EACP,IAAI,EACJ,OAAO,EACP,IAAI,EACJ,KAAK,EACL,GAAG,KAAK,EACX,EAAE,SAAS,eA0DX;kBA7EQ,IAAI","sources":["ui/ui/core/sizes/sizeTypes.ts","ui/ui/core/sizes/index.ts","ui/ui/core/colors/colorTypes.ts","ui/ui/core/colors/index.ts","ui/ui/core/icons/iconTypes.ts","ui/ui/core/icons/iconTags.ts","ui/ui/core/icons/index.ts","ui/ui/core/miscellaneous-choices/miscellaneousTypes.ts","ui/ui/core/miscellaneous-choices/index.ts","ui/ui/core/index.ts","ui/ui/helpers/getElementTypeFromProps.ts","ui/ui/helpers/classNameBuilders.ts","ui/ui/helpers/index.ts","ui/ui/init/GrauityInit.tsx","ui/ui/init/index.ts","ui/ui/elements/Icon/Icon.tsx","ui/ui/elements/Icon/index.ts","ui/ui/elements/index.ts","ui/ui/index.ts","ui/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"import './css/index.scss';\n\nexport { ICON_TAGS, TAG_ICONS } from './core';\n\nexport type { GrauityInitProps } from './init';\nexport { GrauityInit } from './init';\n\nexport type { IconProps } from './elements';\nexport { Icon } from './elements';\n"],"names":[],"version":3,"file":"index.d.ts.map","sourceRoot":"../"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@newtonschool/grauity",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Newton School",
|
|
@@ -129,6 +129,8 @@
|
|
|
129
129
|
"path": "^0.12.7",
|
|
130
130
|
"pre-commit": "^1.2.2",
|
|
131
131
|
"prettier": "2.8.1",
|
|
132
|
+
"react": "^16.8.0 || ^17.0.0",
|
|
133
|
+
"react-dom": "^16.8.0 || ^17.0.0",
|
|
132
134
|
"rimraf": "^3.0.2",
|
|
133
135
|
"sass": "^1.57.1",
|
|
134
136
|
"sass-loader": "^13.2.0",
|
|
@@ -136,16 +138,14 @@
|
|
|
136
138
|
"storybook": "^6.5.15",
|
|
137
139
|
"storybook-addon-code-editor": "^0.3.7",
|
|
138
140
|
"style-loader": "^3.3.1",
|
|
141
|
+
"styled-components": "^5.3.6",
|
|
139
142
|
"svgo": "^3.0.2",
|
|
140
|
-
"typescript": "^4.9.4"
|
|
141
|
-
"react": "^16.8.0 || ^17.0.0",
|
|
142
|
-
"react-dom": "^16.8.0 || ^17.0.0",
|
|
143
|
-
"styled-components": "^5.3.6"
|
|
143
|
+
"typescript": "^4.9.4"
|
|
144
144
|
},
|
|
145
145
|
"dependencies": {
|
|
146
146
|
"classnames": "^2.3.2",
|
|
147
|
-
"
|
|
148
|
-
"
|
|
147
|
+
"lodash": "^4.17.21",
|
|
148
|
+
"prop-types": "^15.8.1"
|
|
149
149
|
},
|
|
150
150
|
"peerDependencies": {
|
|
151
151
|
"react": "^16.8.0 || ^17.0.0",
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"colorTypes.d.ts","sourceRoot":"","sources":["colorTypes.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GACf,SAAS,GACT,WAAW,GACX,UAAU,GACV,KAAK,GACL,QAAQ,GACR,QAAQ,GACR,OAAO,GACP,OAAO,GACP,MAAM,GACN,MAAM,GACN,QAAQ,GACR,QAAQ,GACR,MAAM,GACN,OAAO,GACP,MAAM,GACN,OAAO,GACP,OAAO,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,eAAO,MAAM,MAAM,UAkBlB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"iconTags.d.ts","sourceRoot":"","sources":["iconTags.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;;;;;;CAMrB,CAAC;AACF,eAAO,MAAM,SAAS;;;;;;;CAOrB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"iconTypes.d.ts","sourceRoot":"","sources":["iconTypes.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GACjB,aAAa,GACb,QAAQ,GACR,MAAM,GACN,OAAO,GACP,QAAQ,CAAC;AAEf,MAAM,MAAM,UAAU,GAAG,YAAY,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE/E,oBAAY,SAAS;IACjB,UAAU,gBAAgB;IAC1B,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,KAAK,UAAU;IACf,MAAM,WAAW;CACpB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAElD,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC"}
|
package/ui/core/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACvD,YAAY,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC"}
|