@planningcenter/organization-avatars 0.1.0-pre → 1.0.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/dist/style.css +123 -0
- package/package.json +23 -17
package/dist/style.css
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
.pco-org-avatar {
|
|
2
|
+
align-items: center;
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
gap: var(--t-spacing-1);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.pco-org-avatar__button {
|
|
9
|
+
background: transparent;
|
|
10
|
+
border: var(--t-border-width) dashed var(--t-border-color);
|
|
11
|
+
border-radius: var(--t-border-radius-lg);
|
|
12
|
+
color: var(--t-icon-color-dim);
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
height: 100px;
|
|
15
|
+
padding: var(--t-spacing-1);
|
|
16
|
+
position: relative;
|
|
17
|
+
width: 175px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.pco-org-avatar__button img {
|
|
21
|
+
height: 100%;
|
|
22
|
+
width: 100%;
|
|
23
|
+
object-fit: contain;
|
|
24
|
+
vertical-align: middle;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.pco-org-avatar__button span {
|
|
28
|
+
background: var(--t-fill-color-interaction);
|
|
29
|
+
border-radius: var(--t-border-radius-md);
|
|
30
|
+
bottom: var(--t-spacing-1);
|
|
31
|
+
box-shadow: 0 var(--t-spacing-half) var(--t-spacing-1)
|
|
32
|
+
var(--t-fill-color-transparency-dark-static-020);
|
|
33
|
+
color: var(--t-icon-color-inverted);
|
|
34
|
+
opacity: 0;
|
|
35
|
+
padding: var(--t-spacing-1);
|
|
36
|
+
position: absolute;
|
|
37
|
+
right: var(--t-spacing-1);
|
|
38
|
+
transition: all 0.1s linear;
|
|
39
|
+
visibility: hidden;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.pco-org-avatar__button:hover span,
|
|
43
|
+
.pco-org-avatar__button:focus-within span {
|
|
44
|
+
opacity: 1;
|
|
45
|
+
visibility: visible;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.pco-org-avatar__label {
|
|
49
|
+
color: var(--t-text-color-secondary);
|
|
50
|
+
font-size: var(--t-font-size-sm);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.pco-org-avatar__dropzone {
|
|
54
|
+
aspect-ratio: 16 / 9;
|
|
55
|
+
border: var(--t-border-width-thick) dashed var(--t-border-color);
|
|
56
|
+
border-radius: var(--t-border-radius-md);
|
|
57
|
+
display: flex;
|
|
58
|
+
flex-direction: column;
|
|
59
|
+
gap: var(--t-spacing-1);
|
|
60
|
+
justify-content: center;
|
|
61
|
+
padding: var(--t-spacing-4);
|
|
62
|
+
place-items: center;
|
|
63
|
+
text-align: center;
|
|
64
|
+
text-wrap: balance;
|
|
65
|
+
user-select: none;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.pco-org-avatar__dropzone svg {
|
|
69
|
+
fill: var(--t-icon-color-status-info);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.pco-org-avatar__dropzone h2 {
|
|
73
|
+
color: var(--t-text-color-headline);
|
|
74
|
+
font-size: var(--t-font-size-md);
|
|
75
|
+
font-weight: var(--t-font-weight-normal);
|
|
76
|
+
margin: 0;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.pco-org-avatar__dropzone p {
|
|
80
|
+
color: var(--t-text-color-placeholder);
|
|
81
|
+
font-size: var(--t-font-size-sm);
|
|
82
|
+
margin: 0;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.pco-org-avatar__dropzone img {
|
|
86
|
+
max-height: 100%;
|
|
87
|
+
max-width: 100%;
|
|
88
|
+
object-fit: contain;
|
|
89
|
+
vertical-align: middle;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.pco-org-avatar__dropzone--focused {
|
|
93
|
+
outline: 2px solid var(--t-fill-color-interaction);
|
|
94
|
+
outline-offset: 1px;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.pco-org-avatar__dropzone--accepted {
|
|
98
|
+
background: var(--t-fill-color-status-info-dim);
|
|
99
|
+
border-color: var(--t-border-color-button-info);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.pco-org-avatar__dropzone--rejected {
|
|
103
|
+
background: var(--t-fill-color-status-error-dim);
|
|
104
|
+
border-color: var(--t-border-color-status-error);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.pco-org-avatar__dropzone--rejected svg {
|
|
108
|
+
fill: var(--t-fill-color-status-error);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/* Light mode background - static regardless of UI theme */
|
|
112
|
+
.pco-org-avatar__button--light:has(img),
|
|
113
|
+
.pco-org-avatar__dropzone--light:has(img) {
|
|
114
|
+
background: hsl(0, 0%, 100%);
|
|
115
|
+
border-color: transparent;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/* Dark mode background - static regardless of UI theme */
|
|
119
|
+
.pco-org-avatar__button--dark:has(img),
|
|
120
|
+
.pco-org-avatar__dropzone--dark:has(img) {
|
|
121
|
+
background: hsl(0, 0%, 12%);
|
|
122
|
+
border-color: transparent;
|
|
123
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@planningcenter/organization-avatars",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Organization avatar upload components for Planning Center apps",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"packageManager": "yarn@1.22.22",
|
|
@@ -20,29 +20,35 @@
|
|
|
20
20
|
"README.md"
|
|
21
21
|
],
|
|
22
22
|
"scripts": {
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
"devDependencies": {
|
|
28
|
-
"@planningcenter/icons": "^15.28.0",
|
|
29
|
-
"@planningcenter/tapestry": "^2.8.0",
|
|
30
|
-
"@types/react": "^19.2.10",
|
|
31
|
-
"@types/react-dom": "^19.2.3",
|
|
32
|
-
"react": "^19.2.4",
|
|
33
|
-
"react-dom": "^19.2.4",
|
|
34
|
-
"typescript": "^5.9.3",
|
|
35
|
-
"vite": "^7.3.1"
|
|
23
|
+
"build": "rm -rf dist/ && vite build && tsc && cp src/organization_avatar.css dist/style.css",
|
|
24
|
+
"lint": "eslint src",
|
|
25
|
+
"lint:fix": "eslint src --fix",
|
|
26
|
+
"test": "exit 0"
|
|
36
27
|
},
|
|
37
28
|
"dependencies": {
|
|
38
29
|
"clsx": "^2.1.1"
|
|
39
30
|
},
|
|
40
31
|
"peerDependencies": {
|
|
41
|
-
"@planningcenter/icons": "^15.
|
|
32
|
+
"@planningcenter/icons": "^15.28.0",
|
|
42
33
|
"@planningcenter/tapestry": "^2.7.0",
|
|
43
34
|
"@planningcenter/url": "^3.1.0",
|
|
44
|
-
"react": "^18.
|
|
45
|
-
"react-dom": "^18.
|
|
35
|
+
"react": "^18.3.0",
|
|
36
|
+
"react-dom": "^18.3.0",
|
|
46
37
|
"react-dropzone": "^14.0.0"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@planningcenter/icons": "^15.28.0",
|
|
41
|
+
"@planningcenter/tapestry": "^2.7.0",
|
|
42
|
+
"@planningcenter/url": "^3.1.0",
|
|
43
|
+
"@types/react": "^18.3.0",
|
|
44
|
+
"@types/react-dom": "^18.3.0",
|
|
45
|
+
"@typescript-eslint/eslint-plugin": "^8.54.0",
|
|
46
|
+
"@typescript-eslint/parser": "^8.54.0",
|
|
47
|
+
"eslint": "^9.39.2",
|
|
48
|
+
"react": "^18.3.0",
|
|
49
|
+
"react-dom": "^18.3.0",
|
|
50
|
+
"react-dropzone": "^14.0.0",
|
|
51
|
+
"typescript": "^5.9.3",
|
|
52
|
+
"vite": "^7.3.1"
|
|
47
53
|
}
|
|
48
54
|
}
|