Skip to content

Commit 4b60c6a

Browse files
authored
feat(remix)!: remove direct Material usage from published packages (#134)
1 parent 3cbe686 commit 4b60c6a

434 files changed

Lines changed: 19258 additions & 251 deletions

File tree

Some content is hidden

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

.github/workflows/ci.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,18 @@ jobs:
1414
with:
1515
flutter-version: "3.44.0"
1616
run-dcm: false
17+
18+
fortal-icons:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
- uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9
23+
with:
24+
version: "0.11.24"
25+
python-version: "3.13"
26+
enable-cache: true
27+
cache-dependency-glob: packages/remix_fortal/tool/radix_icons/uv.lock
28+
- name: Verify generated Fortal icons
29+
run: uv run --frozen --project packages/remix_fortal/tool/radix_icons glyphpact --config packages/remix_fortal/tool/radix_icons/glyphpact.json --check
30+
- name: Verify icon integrity contract
31+
run: uv run --frozen --project packages/remix_fortal/tool/radix_icons python packages/remix_fortal/tool/radix_icons/verify.py

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ pubspec.lock
127127
# When unpinning packages, Using lockfiles ensures that failures in PRs are
128128
# actually due to those PRs, not due to a package being updated.
129129
!/pubspec.lock
130+
!/packages/remix_fortal/tool/radix_icons/uv.lock
130131

131132
# IntelliJ related
132133
*.iml
@@ -291,3 +292,4 @@ app.*.symbols
291292
# Analysis and development artifacts
292293
component_patterns_analysis.md
293294
/.cursor
295+
**/.venv/

docs/components/button.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ Configures the icon style using an IconStyler.
291291

292292
Configures the loading spinner style.
293293

294-
#### `iconAlignment(IconAlignment value)`
294+
#### `iconAlignment(RemixIconAlignment value)`
295295

296296
Overrides placement when the button has exactly one icon. Buttons with both
297297
`leadingIcon` and `trailingIcon` keep those explicit positions.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Third-Party Notices
2+
3+
## Radix Icons
4+
5+
Some default control glyph paths are derived from Radix Icons 1.3.2:
6+
https://github.com/radix-ui/icons/tree/%40radix-ui%2Freact-icons%401.3.2
7+
8+
MIT License
9+
10+
Copyright (c) 2022 WorkOS
11+
12+
Permission is hereby granted, free of charge, to any person obtaining a copy
13+
of this software and associated documentation files (the "Software"), to deal
14+
in the Software without restriction, including without limitation the rights
15+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16+
copies of the Software, and to permit persons to whom the Software is
17+
furnished to do so, subject to the following conditions:
18+
19+
The above copyright notice and this permission notice shall be included in all
20+
copies or substantial portions of the Software.
21+
22+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28+
SOFTWARE.

packages/remix/lib/src/components/accordion/accordion.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
library remix_accordion;
22

33
import 'package:flutter/foundation.dart';
4-
import 'package:flutter/material.dart';
4+
import 'package:flutter/widgets.dart';
55
import 'package:flutter/services.dart';
66
import 'package:mix/mix.dart';
77
import 'package:mix_annotations/mix_annotations.dart';
88
import 'package:naked_ui/naked_ui.dart';
99

1010
import '../../utilities/remix_style.dart';
11+
import '../../utilities/remix_path_icon.dart';
1112

1213
part 'accordion_spec.dart';
1314
part 'accordion_style.dart';

packages/remix/lib/src/components/accordion/accordion_widget.dart

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,15 @@ class RemixAccordion<T> extends StatelessWidget {
187187
if (title != null)
188188
// ignore: avoid-flexible-outside-flex
189189
Expanded(child: StyledText(title!, styleSpec: spec.title)),
190-
StyledIcon(
191-
icon:
192-
trailingIcon ?? (state.isExpanded ? Icons.remove : Icons.add),
193-
styleSpec: spec.trailingIcon,
194-
),
190+
if (trailingIcon case final icon?)
191+
StyledIcon(icon: icon, styleSpec: spec.trailingIcon)
192+
else
193+
RemixPathIcon(
194+
glyph: state.isExpanded
195+
? RemixPathGlyph.minus
196+
: RemixPathGlyph.plus,
197+
styleSpec: spec.trailingIcon,
198+
),
195199
],
196200
);
197201
},

packages/remix/lib/src/components/avatar/avatar.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
library remix_avatar;
22

33
import 'package:flutter/foundation.dart';
4-
import 'package:flutter/material.dart';
4+
import 'package:flutter/widgets.dart';
55
import 'package:mix/mix.dart';
66
import 'package:mix_annotations/mix_annotations.dart';
77

packages/remix/lib/src/components/badge/badge.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
library remix_badge;
22

33
import 'package:flutter/foundation.dart';
4-
import 'package:flutter/material.dart';
4+
import 'package:flutter/widgets.dart';
55
import 'package:mix/mix.dart';
66
import 'package:mix_annotations/mix_annotations.dart';
77

packages/remix/lib/src/components/button/button.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
library remix_button;
22

33
import 'package:flutter/foundation.dart';
4-
import 'package:flutter/material.dart';
4+
import 'package:flutter/widgets.dart';
55
import 'package:mix/mix.dart';
66
import 'package:mix_annotations/mix_annotations.dart';
77
import 'package:naked_ui/naked_ui.dart';

packages/remix/lib/src/components/button/button.g.dart

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)