Skip to content

Commit 2ff3d5d

Browse files
committed
Apply the latests changes between 1.7.0-rc.2 ands 1.7.6
1 parent 4debda1 commit 2ff3d5d

File tree

887 files changed

+3065
-180
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

887 files changed

+3065
-180
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
/db
44
/deps
55
/*.ez
6-
/cover
6+
7+
# Temporary files
78
/tmp
9+
/cover
810

911
# Generated on crash by the VM
1012
erl_crash.dump

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ DOCKER_IMAGE_TAG ?= $(APP_VERSION)
88
DOCKER_REGISTRY ?=
99
DOCKER_LOCAL_IMAGE:= $(APP_NAME):$(DOCKER_IMAGE_TAG)
1010
DOCKER_REMOTE_IMAGE:= $(DOCKER_REGISTRY)/$(DOCKER_LOCAL_IMAGE)
11+
HEROICONS_VERSION := 2.0.18
1112

1213
# Linter and formatter configuration
1314
# ----------------------------------
@@ -90,6 +91,13 @@ sync-translations: ## Synchronize translations with Accent
9091
test: ## Run the test suite
9192
mix test
9293

94+
.PHONY: update-heroicons
95+
update-heroicons: ## Update Heroicons assets
96+
cd assets/vendor && \
97+
curl -L "https://github.com/tailwindlabs/heroicons/archive/refs/tags/v${HEROICONS_VERSION}.tar.gz" | \
98+
tar -xvz --strip-components=1 heroicons-${HEROICONS_VERSION}/optimized
99+
100+
93101
# Check, lint and format targets
94102
# ------------------------------
95103

assets/tailwind.config.js

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
// https://tailwindcss.com/docs/configuration
55

66
const plugin = require('tailwindcss/plugin');
7+
const fs = require('fs');
8+
const path = require('path');
79

810
module.exports = {
911
content: ['./js/**/*.js', '../lib/*_web.ex', '../lib/*_web/**/*.*ex'],
@@ -16,6 +18,11 @@ module.exports = {
1618
},
1719
plugins: [
1820
require('@tailwindcss/forms'),
21+
// Allows prefixing tailwind classes with LiveView classes to add rules
22+
// only when LiveView classes are applied, for example:
23+
//
24+
// <div class="phx-click-loading:animate-ping">
25+
//
1926
plugin(({addVariant}) =>
2027
addVariant('phx-no-feedback', ['.phx-no-feedback&', '.phx-no-feedback &'])
2128
),
@@ -36,6 +43,52 @@ module.exports = {
3643
'.phx-change-loading&',
3744
'.phx-change-loading &'
3845
])
39-
)
46+
),
47+
plugin(({addVariant}) =>
48+
addVariant('phx-change-loading', [
49+
'.phx-change-loading&',
50+
'.phx-change-loading &'
51+
])
52+
),
53+
54+
// Embeds Heroicons (https://heroicons.com) into your app.css bundle
55+
// See your `CoreComponents.icon/1` for more information.
56+
plugin(function ({matchComponents, theme}) {
57+
let iconsDir = path.join(__dirname, './vendor/heroicons/optimized');
58+
let values = {};
59+
let icons = [
60+
['', '/24/outline'],
61+
['-solid', '/24/solid'],
62+
['-mini', '/20/solid']
63+
];
64+
icons.forEach(([suffix, dir]) => {
65+
fs.readdirSync(path.join(iconsDir, dir)).map((file) => {
66+
let name = path.basename(file, '.svg') + suffix;
67+
values[name] = {name, fullPath: path.join(iconsDir, dir, file)};
68+
});
69+
});
70+
matchComponents(
71+
{
72+
hero: ({name, fullPath}) => {
73+
let content = fs
74+
.readFileSync(fullPath)
75+
.toString()
76+
.replace(/\r?\n|\r/g, '');
77+
return {
78+
[`--hero-${name}`]: `url('data:image/svg+xml;utf8,${content}')`,
79+
'-webkit-mask': `var(--hero-${name})`,
80+
mask: `var(--hero-${name})`,
81+
'mask-repeat': 'no-repeat',
82+
'background-color': 'currentColor',
83+
'vertical-align': 'middle',
84+
display: 'inline-block',
85+
width: theme('spacing.5'),
86+
height: theme('spacing.5')
87+
};
88+
}
89+
},
90+
{values}
91+
);
92+
})
4093
]
4194
};

assets/vendor/heroicons/LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 Refactoring UI Inc.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

assets/vendor/heroicons/UPGRADE.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
You are running heroicons v2.0.18. To upgrade in place, you can run the following command,
2+
where your `HERO_VSN` export is your desired version:
3+
4+
export HERO_VSN="2.0.18" ; \
5+
curl -L "https://github.com/tailwindlabs/heroicons/archive/refs/tags/v${HERO_VSN}.tar.gz" | \
6+
tar -xvz --strip-components=1 heroicons-${HERO_VSN}/optimized
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 4 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)