Compare commits
81 Commits
main
...
features/n
Author | SHA1 | Date | |
---|---|---|---|
![]() |
38d5bd0149 | ||
![]() |
9832ec01d8 | ||
![]() |
323c66fecd | ||
![]() |
671b8f6a44 | ||
![]() |
d43eca816c | ||
![]() |
77a30b5cfe | ||
![]() |
dea04afcd4 | ||
![]() |
edb2249a43 | ||
![]() |
457df20346 | ||
![]() |
943579faec | ||
![]() |
d8a7e0c5cd | ||
![]() |
d0370a6be4 | ||
![]() |
1dabf54e39 | ||
![]() |
3c256f989f | ||
![]() |
1a424571ad | ||
![]() |
b178bbb9b0 | ||
![]() |
c3b267dfc4 | ||
![]() |
46c396e33f | ||
![]() |
3ea88592ce | ||
![]() |
ccbff06090 | ||
![]() |
853e0c5988 | ||
![]() |
fbab389f66 | ||
![]() |
0f946cabe8 | ||
![]() |
dc49cac63a | ||
![]() |
c5e97f9600 | ||
![]() |
272d19fe8a | ||
![]() |
1b35631693 | ||
![]() |
cbdd376e91 | ||
![]() |
edcc8661e3 | ||
![]() |
b7db83fe15 | ||
![]() |
a04a0f07e2 | ||
25606b926b | |||
![]() |
9f1214fd9f | ||
![]() |
b01b4e42df | ||
![]() |
56cef22d26 | ||
![]() |
f4c89aed85 | ||
![]() |
f79cc037a8 | ||
![]() |
366f2bae6c | ||
![]() |
51bbce3407 | ||
e190dc9ddf | |||
cfddc25b1c | |||
a0b6b82efd | |||
5ab2444fbc | |||
5e4b7e2028 | |||
![]() |
9a1a62537e | ||
![]() |
8b48fe5959 | ||
![]() |
cdff1f4ec4 | ||
![]() |
8c61578623 | ||
![]() |
8d5445a509 | ||
![]() |
7c8ca6fc47 | ||
![]() |
63a84810f5 | ||
![]() |
d042b55ac6 | ||
![]() |
d7fe9a8908 | ||
![]() |
7752e9a3fa | ||
![]() |
371a79545c | ||
![]() |
c33820a8a7 | ||
![]() |
52a577df0d | ||
a32c588e82 | |||
f2bbe04eb5 | |||
f5bfb347af | |||
![]() |
88710e4e3b | ||
![]() |
3b6045c3e1 | ||
![]() |
663103f1d7 | ||
![]() |
1110bbf850 | ||
![]() |
580161eb25 | ||
![]() |
12798c20f7 | ||
![]() |
fe1ef0fbc9 | ||
![]() |
53dd3bec33 | ||
2630b4eddd | |||
d261bc0a4e | |||
![]() |
dfe628ffce | ||
2126cb7644 | |||
![]() |
4d44867ff4 | ||
![]() |
c4ece6e9b7 | ||
![]() |
be914e4b2e | ||
![]() |
6f91dacb0c | ||
![]() |
f3ae953772 | ||
![]() |
2daf5b6c1e | ||
![]() |
82594cff34 | ||
![]() |
f62c1f267e | ||
![]() |
08a8a5338f |
226
.editorconfig
Normal file
226
.editorconfig
Normal file
@ -0,0 +1,226 @@
|
||||
# Remove the line below if you want to inherit .editorconfig settings from higher directories
|
||||
root = true
|
||||
|
||||
# C# files
|
||||
[*.cs]
|
||||
|
||||
#### Core EditorConfig Options ####
|
||||
|
||||
# Indentation and spacing
|
||||
indent_size = 3
|
||||
indent_style = tab
|
||||
tab_width = 3
|
||||
|
||||
# New line preferences
|
||||
end_of_line = crlf
|
||||
insert_final_newline = false
|
||||
|
||||
#### .NET Coding Conventions ####
|
||||
|
||||
# Organize usings
|
||||
dotnet_separate_import_directive_groups = false
|
||||
dotnet_sort_system_directives_first = false
|
||||
file_header_template = unset
|
||||
|
||||
# this. and Me. preferences
|
||||
dotnet_style_qualification_for_event = false:suggestion
|
||||
dotnet_style_qualification_for_field = false:suggestion
|
||||
dotnet_style_qualification_for_method = false:suggestion
|
||||
dotnet_style_qualification_for_property = false:suggestion
|
||||
|
||||
# Language keywords vs BCL types preferences
|
||||
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
|
||||
dotnet_style_predefined_type_for_member_access = true:suggestion
|
||||
|
||||
# Parentheses preferences
|
||||
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:suggestion
|
||||
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:suggestion
|
||||
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:suggestion
|
||||
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:suggestion
|
||||
|
||||
# Modifier preferences
|
||||
dotnet_style_require_accessibility_modifiers = for_non_interface_members
|
||||
|
||||
# Expression-level preferences
|
||||
dotnet_style_coalesce_expression = true
|
||||
dotnet_style_collection_initializer = true
|
||||
dotnet_style_explicit_tuple_names = true
|
||||
dotnet_style_namespace_match_folder = true
|
||||
dotnet_style_null_propagation = true
|
||||
dotnet_style_object_initializer = true
|
||||
dotnet_style_operator_placement_when_wrapping = beginning_of_line
|
||||
dotnet_style_prefer_auto_properties = true:suggestion
|
||||
dotnet_style_prefer_compound_assignment = true
|
||||
dotnet_style_prefer_conditional_expression_over_assignment = true:suggestion
|
||||
dotnet_style_prefer_conditional_expression_over_return = true:suggestion
|
||||
dotnet_style_prefer_foreach_explicit_cast_in_source = when_strongly_typed
|
||||
dotnet_style_prefer_inferred_anonymous_type_member_names = true
|
||||
dotnet_style_prefer_inferred_tuple_names = false
|
||||
dotnet_style_prefer_is_null_check_over_reference_equality_method = true
|
||||
dotnet_style_prefer_simplified_boolean_expressions = true
|
||||
dotnet_style_prefer_simplified_interpolation = true
|
||||
|
||||
# Field preferences
|
||||
dotnet_style_readonly_field = true
|
||||
|
||||
# Parameter preferences
|
||||
dotnet_code_quality_unused_parameters = all
|
||||
|
||||
# Suppression preferences
|
||||
dotnet_remove_unnecessary_suppression_exclusions = 0
|
||||
|
||||
# New line preferences
|
||||
dotnet_style_allow_multiple_blank_lines_experimental = false:suggestion
|
||||
dotnet_style_allow_statement_immediately_after_block_experimental = false:suggestion
|
||||
|
||||
#### C# Coding Conventions ####
|
||||
|
||||
# var preferences
|
||||
csharp_style_var_elsewhere = true:warning
|
||||
csharp_style_var_for_built_in_types = true:warning
|
||||
csharp_style_var_when_type_is_apparent = true:warning
|
||||
|
||||
# Expression-bodied members
|
||||
csharp_style_expression_bodied_accessors = when_on_single_line:suggestion
|
||||
csharp_style_expression_bodied_constructors = when_on_single_line:suggestion
|
||||
csharp_style_expression_bodied_indexers = when_on_single_line:suggestion
|
||||
csharp_style_expression_bodied_lambdas = when_on_single_line:suggestion
|
||||
csharp_style_expression_bodied_local_functions = when_on_single_line:suggestion
|
||||
csharp_style_expression_bodied_methods = when_on_single_line:suggestion
|
||||
csharp_style_expression_bodied_operators = when_on_single_line:suggestion
|
||||
csharp_style_expression_bodied_properties = when_on_single_line:suggestion
|
||||
|
||||
# Pattern matching preferences
|
||||
csharp_style_pattern_matching_over_as_with_null_check = true
|
||||
csharp_style_pattern_matching_over_is_with_cast_check = true
|
||||
csharp_style_prefer_extended_property_pattern = true
|
||||
csharp_style_prefer_not_pattern = true
|
||||
csharp_style_prefer_pattern_matching = true:suggestion
|
||||
csharp_style_prefer_switch_expression = true
|
||||
|
||||
# Null-checking preferences
|
||||
csharp_style_conditional_delegate_call = true
|
||||
|
||||
# Modifier preferences
|
||||
csharp_prefer_static_local_function = true
|
||||
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async
|
||||
csharp_style_prefer_readonly_struct = true
|
||||
|
||||
# Code-block preferences
|
||||
csharp_prefer_braces = when_multiline:suggestion
|
||||
csharp_prefer_simple_using_statement = true
|
||||
csharp_style_namespace_declarations = file_scoped:warning
|
||||
csharp_style_prefer_method_group_conversion = true:suggestion
|
||||
csharp_style_prefer_top_level_statements = false:suggestion
|
||||
|
||||
# Expression-level preferences
|
||||
csharp_prefer_simple_default_expression = true
|
||||
csharp_style_deconstructed_variable_declaration = true
|
||||
csharp_style_implicit_object_creation_when_type_is_apparent = true
|
||||
csharp_style_inlined_variable_declaration = true
|
||||
csharp_style_prefer_index_operator = true
|
||||
csharp_style_prefer_local_over_anonymous_function = true
|
||||
csharp_style_prefer_null_check_over_type_check = true
|
||||
csharp_style_prefer_range_operator = true
|
||||
csharp_style_prefer_tuple_swap = true
|
||||
csharp_style_prefer_utf8_string_literals = true
|
||||
csharp_style_throw_expression = true
|
||||
csharp_style_unused_value_assignment_preference = discard_variable
|
||||
csharp_style_unused_value_expression_statement_preference = discard_variable:suggestion
|
||||
|
||||
# 'using' directive preferences
|
||||
csharp_using_directive_placement = outside_namespace:suggestion
|
||||
|
||||
# New line preferences
|
||||
csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true:suggestion
|
||||
csharp_style_allow_blank_lines_between_consecutive_braces_experimental = false:suggestion
|
||||
csharp_style_allow_embedded_statements_on_same_line_experimental = false:suggestion
|
||||
|
||||
#### C# Formatting Rules ####
|
||||
|
||||
# New line preferences
|
||||
csharp_new_line_before_catch = true
|
||||
csharp_new_line_before_else = true
|
||||
csharp_new_line_before_finally = true
|
||||
csharp_new_line_before_members_in_anonymous_types = true
|
||||
csharp_new_line_before_members_in_object_initializers = true
|
||||
csharp_new_line_before_open_brace = all
|
||||
csharp_new_line_between_query_expression_clauses = true
|
||||
|
||||
# Indentation preferences
|
||||
csharp_indent_block_contents = true
|
||||
csharp_indent_braces = false
|
||||
csharp_indent_case_contents = true
|
||||
csharp_indent_case_contents_when_block = true
|
||||
csharp_indent_labels = no_change
|
||||
csharp_indent_switch_labels = true
|
||||
|
||||
# Space preferences
|
||||
csharp_space_after_cast = false
|
||||
csharp_space_after_colon_in_inheritance_clause = true
|
||||
csharp_space_after_comma = true
|
||||
csharp_space_after_dot = false
|
||||
csharp_space_after_keywords_in_control_flow_statements = true
|
||||
csharp_space_after_semicolon_in_for_statement = true
|
||||
csharp_space_around_binary_operators = before_and_after
|
||||
csharp_space_around_declaration_statements = false
|
||||
csharp_space_before_colon_in_inheritance_clause = true
|
||||
csharp_space_before_comma = false
|
||||
csharp_space_before_dot = false
|
||||
csharp_space_before_open_square_brackets = false
|
||||
csharp_space_before_semicolon_in_for_statement = false
|
||||
csharp_space_between_empty_square_brackets = false
|
||||
csharp_space_between_method_call_empty_parameter_list_parentheses = false
|
||||
csharp_space_between_method_call_name_and_opening_parenthesis = false
|
||||
csharp_space_between_method_call_parameter_list_parentheses = false
|
||||
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
|
||||
csharp_space_between_method_declaration_name_and_open_parenthesis = false
|
||||
csharp_space_between_method_declaration_parameter_list_parentheses = false
|
||||
csharp_space_between_parentheses = false
|
||||
csharp_space_between_square_brackets = false
|
||||
|
||||
# Wrapping preferences
|
||||
csharp_preserve_single_line_blocks = true
|
||||
csharp_preserve_single_line_statements = true
|
||||
|
||||
#### Naming styles ####
|
||||
|
||||
# Naming rules
|
||||
|
||||
dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion
|
||||
dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
|
||||
dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
|
||||
|
||||
dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion
|
||||
dotnet_naming_rule.types_should_be_pascal_case.symbols = types
|
||||
dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case
|
||||
|
||||
dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion
|
||||
dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
|
||||
dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case
|
||||
|
||||
# Symbol specifications
|
||||
|
||||
dotnet_naming_symbols.interface.applicable_kinds = interface
|
||||
dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||
dotnet_naming_symbols.interface.required_modifiers =
|
||||
|
||||
dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
|
||||
dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||
dotnet_naming_symbols.types.required_modifiers =
|
||||
|
||||
dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
|
||||
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||
dotnet_naming_symbols.non_field_members.required_modifiers =
|
||||
|
||||
# Naming styles
|
||||
|
||||
dotnet_naming_style.pascal_case.required_prefix =
|
||||
dotnet_naming_style.pascal_case.required_suffix =
|
||||
dotnet_naming_style.pascal_case.word_separator =
|
||||
dotnet_naming_style.pascal_case.capitalization = pascal_case
|
||||
|
||||
dotnet_naming_style.begins_with_i.required_prefix = I
|
||||
dotnet_naming_style.begins_with_i.required_suffix =
|
||||
dotnet_naming_style.begins_with_i.word_separator =
|
||||
dotnet_naming_style.begins_with_i.capitalization = pascal_case
|
19
.gitignore
vendored
19
.gitignore
vendored
@ -412,3 +412,22 @@ FodyWeavers.xsd
|
||||
# Built Visual Studio Code Extensions
|
||||
*.vsix
|
||||
|
||||
# Css files
|
||||
**.css
|
||||
|
||||
# Minified css files
|
||||
**.min.css
|
||||
|
||||
# css files directly in the wwwroot folder
|
||||
**/wwwroot/**.css
|
||||
|
||||
# Minified js files
|
||||
**.min.js
|
||||
|
||||
# js files directly in the wwwroot folder
|
||||
**/wwwroot/**.js
|
||||
|
||||
# any project with runner in its name
|
||||
**.Runner/**
|
||||
|
||||
**.DS_Store
|
||||
|
37
Connected.Components.sln
Normal file
37
Connected.Components.sln
Normal file
@ -0,0 +1,37 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.4.33020.496
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Connected.Components", "src\connected.components\Connected.Components.csproj", "{70BF497D-6519-401B-A0EE-2E9856B13D96}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Connected.Components.Showcase", "src\Connected.Components.Showcase\Connected.Components.Showcase.csproj", "{EBB24FD8-A554-427C-A93B-B48C047D34CC}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Connected.Components.Showcase.Runner", "src\Connected.Components.Showcase.Runner\Connected.Components.Showcase.Runner.csproj", "{347B526C-39A0-43CE-B0F9-79E61B4897C6}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{70BF497D-6519-401B-A0EE-2E9856B13D96}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{70BF497D-6519-401B-A0EE-2E9856B13D96}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{70BF497D-6519-401B-A0EE-2E9856B13D96}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{70BF497D-6519-401B-A0EE-2E9856B13D96}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{EBB24FD8-A554-427C-A93B-B48C047D34CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{EBB24FD8-A554-427C-A93B-B48C047D34CC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{EBB24FD8-A554-427C-A93B-B48C047D34CC}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{EBB24FD8-A554-427C-A93B-B48C047D34CC}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{347B526C-39A0-43CE-B0F9-79E61B4897C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{347B526C-39A0-43CE-B0F9-79E61B4897C6}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{347B526C-39A0-43CE-B0F9-79E61B4897C6}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{347B526C-39A0-43CE-B0F9-79E61B4897C6}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {CBDD97EC-4855-4005-97A7-29FE298FB057}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
661
LICENSE
Normal file
661
LICENSE
Normal file
@ -0,0 +1,661 @@
|
||||
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
Version 3, 19 November 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU Affero General Public License is a free, copyleft license for
|
||||
software and other kinds of works, specifically designed to ensure
|
||||
cooperation with the community in the case of network server software.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
our General Public Licenses are intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
Developers that use our General Public Licenses protect your rights
|
||||
with two steps: (1) assert copyright on the software, and (2) offer
|
||||
you this License which gives you legal permission to copy, distribute
|
||||
and/or modify the software.
|
||||
|
||||
A secondary benefit of defending all users' freedom is that
|
||||
improvements made in alternate versions of the program, if they
|
||||
receive widespread use, become available for other developers to
|
||||
incorporate. Many developers of free software are heartened and
|
||||
encouraged by the resulting cooperation. However, in the case of
|
||||
software used on network servers, this result may fail to come about.
|
||||
The GNU General Public License permits making a modified version and
|
||||
letting the public access it on a server without ever releasing its
|
||||
source code to the public.
|
||||
|
||||
The GNU Affero General Public License is designed specifically to
|
||||
ensure that, in such cases, the modified source code becomes available
|
||||
to the community. It requires the operator of a network server to
|
||||
provide the source code of the modified version running there to the
|
||||
users of that server. Therefore, public use of a modified version, on
|
||||
a publicly accessible server, gives the public access to the source
|
||||
code of the modified version.
|
||||
|
||||
An older license, called the Affero General Public License and
|
||||
published by Affero, was designed to accomplish similar goals. This is
|
||||
a different license, not a version of the Affero GPL, but Affero has
|
||||
released a new version of the Affero GPL which permits relicensing under
|
||||
this license.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU Affero General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Remote Network Interaction; Use with the GNU General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, if you modify the
|
||||
Program, your modified version must prominently offer all users
|
||||
interacting with it remotely through a computer network (if your version
|
||||
supports such interaction) an opportunity to receive the Corresponding
|
||||
Source of your version by providing access to the Corresponding Source
|
||||
from a network server at no charge, through some standard or customary
|
||||
means of facilitating copying of software. This Corresponding Source
|
||||
shall include the Corresponding Source for any work covered by version 3
|
||||
of the GNU General Public License that is incorporated pursuant to the
|
||||
following paragraph.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the work with which it is combined will remain governed by version
|
||||
3 of the GNU General Public License.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU Affero General Public License from time to time. Such new versions
|
||||
will be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU Affero General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU Affero General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU Affero General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If your software can interact with users remotely through a computer
|
||||
network, you should also make sure that it provides a way for users to
|
||||
get its source. For example, if your program is a web application, its
|
||||
interface could display a "Source" link that leads users to an archive
|
||||
of the code. There are many ways you could offer source, and different
|
||||
solutions will be better for different programs; see section 13 for the
|
||||
specific requirements.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU AGPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
0
build/.gitkeep
Normal file
0
build/.gitkeep
Normal file
2
build/buildProjects.bat
Normal file
2
build/buildProjects.bat
Normal file
@ -0,0 +1,2 @@
|
||||
dotnet build ../src/Connected.Components/Connected.Components.csproj
|
||||
dotnet build ../src/Connected.Components.Showcase/Connected.Components.Showcase.csproj
|
1
build/startWatch.ps1
Normal file
1
build/startWatch.ps1
Normal file
@ -0,0 +1 @@
|
||||
dotnet watch webcompiler ./Styles/Connected.Components.scss -c ./excubowebcompiler.json --project ../src/Connected.Components/Connected.Components.csproj
|
1
build/startWatch.sh
Normal file
1
build/startWatch.sh
Normal file
@ -0,0 +1 @@
|
||||
dotnet watch webcompiler ./Styles/Connected.Components.scss -c ./excubowebcompiler.json --project ../src/Connected.Components/Connected.Components.csproj
|
17
nuget.config
Normal file
17
nuget.config
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<config>
|
||||
<add key="repositoryPath" value="%PACKAGEHOME%/External" />
|
||||
</config>
|
||||
|
||||
<packageRestore>
|
||||
<add key="enabled" value="True" />
|
||||
<add key="automatic" value="True" />
|
||||
</packageRestore>
|
||||
<packageSources>
|
||||
<add key="NuGet official package source" value="https://api.nuget.org/v3/index.json" />
|
||||
<add key="LocalNugetServer" value="%LOCAL_NUGET_SERVER%" />
|
||||
<add key="Local file repository" value="%LOCAL_NUGET%" />
|
||||
</packageSources>
|
||||
<disabledPackageSources />
|
||||
</configuration>
|
20
src/Connected.Components.Showcase.Runner/App.razor
Normal file
20
src/Connected.Components.Showcase.Runner/App.razor
Normal file
@ -0,0 +1,20 @@
|
||||
@using System.Reflection;
|
||||
<Router AppAssembly="@typeof(App).Assembly" AdditionalAssemblies="@additionalAssemblies">
|
||||
<Found Context="routeData">
|
||||
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
|
||||
<FocusOnNavigate RouteData="@routeData" Selector="h1" />
|
||||
</Found>
|
||||
<NotFound>
|
||||
<PageTitle>Not found</PageTitle>
|
||||
<LayoutView Layout="@typeof(MainLayout)">
|
||||
<p role="alert">Sorry, there's nothing at this address.</p>
|
||||
</LayoutView>
|
||||
</NotFound>
|
||||
</Router>
|
||||
|
||||
@code {
|
||||
private List<Assembly> additionalAssemblies { get; set; } = new()
|
||||
{
|
||||
//typeof(Connected.Components.Showcase.Pages.AlertShowcase).Assembly
|
||||
};
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.*" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.*" PrivateAssets="all" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Connected.Components.Showcase\Connected.Components.Showcase.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
@ -0,0 +1,5 @@
|
||||
@inherits LayoutComponentBase
|
||||
|
||||
<main>
|
||||
@Body
|
||||
</main>
|
731
src/Connected.Components.Showcase.Runner/Pages/Demo.razor
Normal file
731
src/Connected.Components.Showcase.Runner/Pages/Demo.razor
Normal file
@ -0,0 +1,731 @@
|
||||
@page "/demo"
|
||||
|
||||
<body>
|
||||
<div class="document-container d-flex">
|
||||
|
||||
<aside>
|
||||
<div class="sidebar @sidebarClosed">
|
||||
|
||||
|
||||
<div class="profile-details">
|
||||
<div class="avatar">
|
||||
<img src="http://sys-app/core/app/sys/avatar/1733c1cf-a588-4a45-9773-dcd320bee57f/1" title="Janko Jordan">
|
||||
</div>
|
||||
<div class="name-job">
|
||||
<div class="profile-name">Janko Jordan</div>
|
||||
<div class="profile-job">Web Designer</div>
|
||||
</div>
|
||||
<i class='bx bx-log-out'></i>
|
||||
</div>
|
||||
|
||||
<ul class="nav-links">
|
||||
<li class="@NavClosed">
|
||||
<div @onclick="ToggleNav" class="iocn-link">
|
||||
<a href="#">
|
||||
<i class='bx bx-collection' @onclick="ToggleNav"></i>
|
||||
<span class="link_name">Proizvodni nalogi</span>
|
||||
</a>
|
||||
<i class='bx bxs-chevron-down arrow'></i>
|
||||
</div>
|
||||
<ul class="sub-menu">
|
||||
<li><a class="link_name" href="#">Proizvodni nalogi</a></li>
|
||||
<li><a href="#">Osnutek</a></li>
|
||||
<li><a href="#">V obdelavi</a></li>
|
||||
<li><a href="#">Aktiven</a></li>
|
||||
<li><a href="#">Zaprt</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">
|
||||
<i class='bx bx-grid-alt'></i>
|
||||
<span class="link_name">Izvedba</span>
|
||||
</a>
|
||||
<ul class="sub-menu blank">
|
||||
<li><a class="link_name" href="#">Izvedba</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<section class="main @sidebarClosed">
|
||||
|
||||
|
||||
<div class="color-picker-container">
|
||||
|
||||
<form class="color-picker" action="">
|
||||
<fieldset>
|
||||
<legend class="visually-hidden">Pick a color scheme</legend>
|
||||
|
||||
<label for="light" class="visually-hidden">Light</label>
|
||||
<input type="radio" id="light" name="theme" checked>
|
||||
|
||||
<label for="pink" class="visually-hidden">Pink theme</label>
|
||||
<input type="radio" id="pink" name="theme">
|
||||
|
||||
<label for="dark" class="visually-hidden">Dark theme</label>
|
||||
<input type="radio" id="dark" name="theme">
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="">
|
||||
<i class='bx bx-menu' @onclick="ToggleSidebar"></i>
|
||||
<span class="text">Open Sidebar</span>
|
||||
|
||||
<section id="borders" class="mt-3 b-1 b-r-4 p-5">
|
||||
<h2>Borders</h2>
|
||||
<p>Use border utilities to quickly style the border, border color and border-radius of an element.
|
||||
Great for images, buttons, or any other element. Responsive classes are available that use the
|
||||
same viewport width breakpoints as the grid system.
|
||||
</p>
|
||||
<div>
|
||||
<h4 class="text-core mt-5">Position</h4>
|
||||
<div class="d-flex flex-wrap gap-3 square">
|
||||
<div class="b-1">b-1</div>
|
||||
<span class="bt-1">bt-1</span>
|
||||
<span class="br-1">br-1</span>
|
||||
<span class="bb-1">bb-1</span>
|
||||
<span class="bl-1">bl-1</span>
|
||||
<span class="bx-1">bx-1</span>
|
||||
<span class="by-1">by-1</span>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="mt-4 mb-4">
|
||||
<div>
|
||||
<h4 class="text-core mt-5">Color</h4>
|
||||
<div class="d-flex flex-wrap gap-3 square">
|
||||
<span class="b-1 b-c-core">b-1 <br> b-c-core</span>
|
||||
<span class="b-1 b-c-primary">b-1 <br> b-c-primary</span>
|
||||
<span class="b-1 b-c-secondary">b-1 <br> b-c-secondary</span>
|
||||
<span class="b-1 b-c-success">b-1 <br> b-c-success</span>
|
||||
<span class="b-1 b-c-info">b-1 <br> b-c-info</span>
|
||||
<span class="b-1 b-c-warning">b-1 <br> b-c-warning</span>
|
||||
<span class="b-1 b-c-danger">b-1 <br> b-c-danger</span>
|
||||
<span class="b-1 b-c-white">b-1 <br> b-c-white</span>
|
||||
<span class="b-1 b-c-light">b-1 <br> b-c-light</span>
|
||||
<span class="b-1 b-c-dark">b-1 <br> b-c-dark</span>
|
||||
<span class="b-1 b-c-black">b-1 <br> b-c-black</span>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="mt-4 mb-4">
|
||||
<div>
|
||||
<h4 class="text-core mt-5">Border-radius</h4>
|
||||
<div class="d-flex flex-wrap gap-3 square">
|
||||
<span class="b-1 b-r-0">b-1 b-r-0</span>
|
||||
<span class="b-1 b-r-1">b-1 b-r-1</span>
|
||||
<span class="b-1 b-r-2">b-1 b-r-2</span>
|
||||
<span class="b-1 b-r-3">b-1 b-r-3</span>
|
||||
<span class="b-1 b-r-4">b-1 b-r-4</span>
|
||||
<span class="b-1 b-r-5">b-1 b-r-5</span>
|
||||
<span class="b-1 b-r-circle">b-1 b-r-circle</span>
|
||||
<span style="width:100px;" class="b-1 b-r-pill">b-1 b-r-pill</span>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
<section id="text" class="mt-3 b-1 b-r-4 p-5">
|
||||
<h2>Colors</h2>
|
||||
<p>Convey meaning through color with a handful of color utility classes. Includes support for
|
||||
styling links with hover states, too.
|
||||
</p>
|
||||
<h4 class="text-core mt-5">Color</h4>
|
||||
<div class="grid test grid-col-6 gap-3">
|
||||
<span class="p-3 text-core">text-core </span>
|
||||
<span class="p-3 text-primary">text-primary </span>
|
||||
<span class="p-3 text-secondary">text-secondary </span>
|
||||
<span class="p-3 text-success">text-success</span>
|
||||
<span class="p-3 text-info">text-info</span>
|
||||
<span class="p-3 text-warning">text-warning</span>
|
||||
<span class="p-3 text-danger">text-danger</span>
|
||||
<span class="p-3 text-white">text-white</span>
|
||||
<span class="p-3 text-light">text-light</span>
|
||||
<span class="p-3 text-dark">text-dark</span>
|
||||
<span class="p-3 text-black">text-black</span>
|
||||
</div>
|
||||
|
||||
<div class="mt-4 b-1 b-r-3 px-4 element-fg-core">
|
||||
<pre>
|
||||
<code id="htmlViewer" style="display:block;overflow-x:auto;">
|
||||
<span style="color:rgb(0, 0, 128); font-weight:400;"><<span style="color:rgb(0, 0, 128); font-weight:400;">span</span> <span style="color:rgb(0, 128, 128); font-weight:400;">class</span>=<span style="color:rgb(221, 17, 68); font-weight:400;">"text-core"</span>></span>text-core<span style="color:rgb(0, 0, 128); font-weight:400;"></<span style="color:rgb(0, 0, 128); font-weight:400;">span</span>></span>
|
||||
<span style="color:rgb(0, 0, 128); font-weight:400;"><<span style="color:rgb(0, 0, 128); font-weight:400;">span</span> <span style="color:rgb(0, 128, 128); font-weight:400;">class</span>=<span style="color:rgb(221, 17, 68); font-weight:400;">"text-primary"</span>></span>text-primary<span style="color:rgb(0, 0, 128); font-weight:400;"></<span style="color:rgb(0, 0, 128); font-weight:400;">span</span>></span>
|
||||
<span style="color:rgb(0, 0, 128); font-weight:400;"><<span style="color:rgb(0, 0, 128); font-weight:400;">span</span> <span style="color:rgb(0, 128, 128); font-weight:400;">class</span>=<span style="color:rgb(221, 17, 68); font-weight:400;">"text-secondary"</span>></span>text-secondary<span style="color:rgb(0, 0, 128); font-weight:400;"></<span style="color:rgb(0, 0, 128); font-weight:400;">span</span>></span>
|
||||
<span style="color:rgb(0, 0, 128); font-weight:400;"><<span style="color:rgb(0, 0, 128); font-weight:400;">span</span> <span style="color:rgb(0, 128, 128); font-weight:400;">class</span>=<span style="color:rgb(221, 17, 68); font-weight:400;">"text-success"</span>></span>text-success<span style="color:rgb(0, 0, 128); font-weight:400;"></<span style="color:rgb(0, 0, 128); font-weight:400;">span</span>></span>
|
||||
<span style="color:rgb(0, 0, 128); font-weight:400;"><<span style="color:rgb(0, 0, 128); font-weight:400;">span</span> <span style="color:rgb(0, 128, 128); font-weight:400;">class</span>=<span style="color:rgb(221, 17, 68); font-weight:400;">"text-info"</span>></span>text-info<span style="color:rgb(0, 0, 128); font-weight:400;"></<span style="color:rgb(0, 0, 128); font-weight:400;">span</span>></span>
|
||||
<span style="color:rgb(0, 0, 128); font-weight:400;"><<span style="color:rgb(0, 0, 128); font-weight:400;">span</span> <span style="color:rgb(0, 128, 128); font-weight:400;">class</span>=<span style="color:rgb(221, 17, 68); font-weight:400;">"text-warning"</span>></span>text-warning<span style="color:rgb(0, 0, 128); font-weight:400;"></<span style="color:rgb(0, 0, 128); font-weight:400;">span</span>></span>
|
||||
<span style="color:rgb(0, 0, 128); font-weight:400;"><<span style="color:rgb(0, 0, 128); font-weight:400;">span</span> <span style="color:rgb(0, 128, 128); font-weight:400;">class</span>=<span style="color:rgb(221, 17, 68); font-weight:400;">"text-danger"</span>></span>text-danger<span style="color:rgb(0, 0, 128); font-weight:400;"></<span style="color:rgb(0, 0, 128); font-weight:400;">span</span>></span>
|
||||
<span style="color:rgb(0, 0, 128); font-weight:400;"><<span style="color:rgb(0, 0, 128); font-weight:400;">span</span> <span style="color:rgb(0, 128, 128); font-weight:400;">class</span>=<span style="color:rgb(221, 17, 68); font-weight:400;">"text-white"</span>></span>text-white<span style="color:rgb(0, 0, 128); font-weight:400;"></<span style="color:rgb(0, 0, 128); font-weight:400;">span</span>></span>
|
||||
<span style="color:rgb(0, 0, 128); font-weight:400;"><<span style="color:rgb(0, 0, 128); font-weight:400;">span</span> <span style="color:rgb(0, 128, 128); font-weight:400;">class</span>=<span style="color:rgb(221, 17, 68); font-weight:400;">"text-light"</span>></span>text-light<span style="color:rgb(0, 0, 128); font-weight:400;"></<span style="color:rgb(0, 0, 128); font-weight:400;">span</span>></span>
|
||||
<span style="color:rgb(0, 0, 128); font-weight:400;"><<span style="color:rgb(0, 0, 128); font-weight:400;">span</span> <span style="color:rgb(0, 128, 128); font-weight:400;">class</span>=<span style="color:rgb(221, 17, 68); font-weight:400;">"text-dark"</span>></span>text-dark<span style="color:rgb(0, 0, 128); font-weight:400;"></<span style="color:rgb(0, 0, 128); font-weight:400;">span</span>></span>
|
||||
<span style="color:rgb(0, 0, 128); font-weight:400;"><<span style="color:rgb(0, 0, 128); font-weight:400;">span</span> <span style="color:rgb(0, 128, 128); font-weight:400;">class</span>=<span style="color:rgb(221, 17, 68); font-weight:400;">"text-black"</span>></span>text-black<span style="color:rgb(0, 0, 128); font-weight:400;"></<span style="color:rgb(0, 0, 128); font-weight:400;">span</span>></span>
|
||||
</code></pre>
|
||||
</div>
|
||||
<hr class="mt-4 mb-4">
|
||||
<h4 class="text-core mt-5">Background color</h4>
|
||||
<div class="grid test grid-col-6 gap-3">
|
||||
<div class="p-3 bg-core">bg-core</div>
|
||||
<div class="p-3 bg-primary">bg-primary</div>
|
||||
<div class="p-3 bg-secondary">bg-secondary</div>
|
||||
<div class="p-3 bg-success">bg-success</div>
|
||||
<div class="p-3 bg-info">bg-info</div>
|
||||
<div class="p-3 bg-warning">bg-warning</div>
|
||||
<div class="p-3 bg-danger">bg-danger</div>
|
||||
<div class="p-3 bg-white">bg-white</div>
|
||||
<div class="p-3 bg-light">bg-light</div>
|
||||
<div class="p-3 bg-dark">bg-dark</div>
|
||||
<div class="p-3 bg-black">bg-black</div>
|
||||
</div>
|
||||
<hr class="mt-4 mb-4">
|
||||
|
||||
<h4 class="text-core mt-5">Link color</h4>
|
||||
<div class="grid test grid-col-6 gap-3">
|
||||
<a href="#" class="p-3 text-core">text-core </a>
|
||||
<a href="#" class="p-3 text-primary">text-primary </a>
|
||||
<a href="#" class="p-3 text-secondary">text-secondary </a>
|
||||
<a href="#" class="p-3 text-success">text-success</a>
|
||||
<a href="#" class="p-3 text-info">text-info</a>
|
||||
<a href="#" class="p-3 text-warning">text-warning</a>
|
||||
<a href="#" class="p-3 text-danger">text-danger</a>
|
||||
<a href="#" class="p-3 text-white">text-white</a>
|
||||
<a href="#" class="p-3 text-light">text-light</a>
|
||||
<a href="#" class="p-3 text-dark">text-dark</a>
|
||||
<a href="#" class="p-3 text-black">text-black</a>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
<section id="text" class="mt-3 b-1 b-r-4 p-5">
|
||||
<h2>Text</h2>
|
||||
<p>Documentation and examples for common text utilities to control size, alignment, wrapping,
|
||||
weight, and
|
||||
more.
|
||||
</p>
|
||||
|
||||
<!-- text sizes -->
|
||||
<h4 class="text-core mt-5">Text sizes</h4>
|
||||
<div class="grid test grid-col-1 gap-3">
|
||||
<div>
|
||||
<h5>This is h5 </h5>
|
||||
<p class="text-small"><span class="text-semibold">text-small</span><br>This is small font
|
||||
size<br>
|
||||
Lorem
|
||||
ipsum dolor sit, amet
|
||||
consectetur
|
||||
adipisicing
|
||||
elit. Eum quis neque ullam, eos eaque nam voluptate veniam dolor ex ratione?
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
<h4>This is h4 </h4>
|
||||
<p><span class="text-semibold">No class required</span><br>This is base font size <br>Lorem
|
||||
ipsum
|
||||
dolor sit amet consectetur,
|
||||
adipisicing elit.
|
||||
Explicabo modi dicta eveniet quia, repudiandae perspiciatis omnis vitae nihil vero
|
||||
ratione.
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
<h3>This is h3 </h3>
|
||||
<p class="text-medium"><span class="text-semibold">text-medium</span><br>This is medium font
|
||||
<br>
|
||||
Lorem
|
||||
ipsum
|
||||
dolor sit, amet consectetur
|
||||
adipisicing
|
||||
elit. Alias praesentium quo est pariatur sed nobis maiores rem aperiam ut voluptas?
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
<h2>This is h2 </h2>
|
||||
<p class="text-large"><span class="text-semibold">text-large</span><br>This is large font
|
||||
<br>
|
||||
Lorem
|
||||
ipsum
|
||||
dolor sit, amet consectetur
|
||||
adipisicing
|
||||
elit. Obcaecati nihil totam, modi minus excepturi laboriosam maiores. Provident quos est
|
||||
maiores.
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
<h1>This is h1 </h1>
|
||||
<p class="text-extralarge"><span class="text-semibold">text-extralarge</span><br>This is
|
||||
extra
|
||||
large
|
||||
font <br>
|
||||
Lorem
|
||||
ipsum dolor sit amet,
|
||||
consectetur adipisicing elit. Beatae, modi!
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
<p class="text-sm-medium"><span class="text-semibold">text-sm-medium</span>
|
||||
<br>Medium size text on viewports sized SM (small) or wider.
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
<p class="text-md-medium"><span class="text-semibold">text-md-medium</span>
|
||||
<br>Medium size text on viewports sized MD (medium) or wider.
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
<p class="text-lg-medium"><span class="text-semibold">text-lg-medium</span>
|
||||
<br>Medium size text on viewports sized LG (large) or wider.
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
<p class="text-xl-medium"><span class="text-semibold">text-xl-medium</span>
|
||||
<br>Medium size text on viewports sized XL (extra-large) or wider.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h4 class="text-core mt-5">Text alignment</h4>
|
||||
<p>Easily realign text to components with text alignment classes.
|
||||
</p>
|
||||
<div class="b-1 b-r-3 p-5 border-core">
|
||||
<div class="text-left">
|
||||
<p class="text-semibold">text-left</p>
|
||||
<p>Left aligned text on all viewport sizes</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="text-center">
|
||||
<p class="text-semibold">text-center</p>
|
||||
<p>Center aligned text on all viewport sizes.</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="text-right">
|
||||
<p class="text-semibold">text-right</p>
|
||||
<p>Right aligned text on all viewport sizes.</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="text-justify">
|
||||
<p class="text-semibold">text-justify</p>
|
||||
<p>Justified text on all viewport sizes. Lorem ipsum dolor sit, amet consectetur
|
||||
adipisicing elit. Temporibus consequatur nisi amet modi in voluptatum facere
|
||||
reprehenderit, aut assumenda. Velit.</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="text-sm-right">
|
||||
<p class="text-semibold">text-sm-right</p>
|
||||
<p>Right aligned text on viewports sized SM (small) or wider.</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="text-md-right">
|
||||
<p class="text-semibold">text-md-right</p>
|
||||
<p>Right aligned text on viewports sized MD (medium) or wider.</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="text-lg-right">
|
||||
<p class="text-semibold">text-lg-right</p>
|
||||
<p>Right aligned text on viewports sized LG (large) or wider.</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="text-xl-right">
|
||||
<p class="text-semibold">text-xl-right</p>
|
||||
<p>Right aligned text on viewports sized XL (extra-large) or wider.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div>
|
||||
<h4 class="text-core mt-5">Font weight</h4>
|
||||
<p>Quickly change the weight (boldness).
|
||||
</p>
|
||||
<div class="b-1 b-r-3 p-5 border-core">
|
||||
<p class="text-semibold">text-thin</p>
|
||||
<div class="text-thin">
|
||||
<p>This is thin text</p>
|
||||
</div>
|
||||
<hr>
|
||||
<p class="text-semibold">text-regular</p>
|
||||
<div class="text-regular">
|
||||
<p>This is normal weight text - no class required</p>
|
||||
</div>
|
||||
<hr>
|
||||
<p class="text-semibold">text-semibold</p>
|
||||
<div class="text-semibold">
|
||||
<p>This is semibold text</p>
|
||||
</div>
|
||||
<hr>
|
||||
<p class="text-semibold">text-bold</p>
|
||||
<div class="text-bold">
|
||||
<p>This is bold text</p>
|
||||
</div>
|
||||
<hr>
|
||||
<p class="text-semibold">text-extrabold</p>
|
||||
<div class="text-extrabold">
|
||||
<p>This is extra bold text</p>
|
||||
</div>
|
||||
<hr>
|
||||
<p class="text-semibold">text-sm-bold</p>
|
||||
<div class="text-sm-bold">
|
||||
<p>Bold text on viewports sized SM (small) or wider.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div>
|
||||
<h4 class="text-core mt-5">Text transform</h4>
|
||||
<p>Transform text in components with text capitalization classes or italicize text.
|
||||
</p>
|
||||
<div class="b-1 b-r-3 p-5 border-core">
|
||||
<p class="text-semibold">text-italic</p>
|
||||
<div class="text-italic">
|
||||
<p>This is italic text</p>
|
||||
</div>
|
||||
<hr>
|
||||
<p class="text-semibold">text-lowercase</p>
|
||||
<div class="text-lowercase">
|
||||
<p>This is lowercased text</p>
|
||||
</div>
|
||||
<hr>
|
||||
<p class="text-semibold">text-uppercase</p>
|
||||
<div class="text-uppercase">
|
||||
<p>This is uppercased text</p>
|
||||
</div>
|
||||
<hr>
|
||||
<p class="text-semibold">text-capitalize</p>
|
||||
<div class="text-capitalize">
|
||||
<p>This is capitalized text</p>
|
||||
</div>
|
||||
<hr>
|
||||
<p class="text-semibold">text-nowrap</p>
|
||||
<div style="width:150px; background:yellow;" class="text-nowrap">
|
||||
This text should overflow the parent.
|
||||
</div>
|
||||
<hr>
|
||||
<p class="text-semibold">text-truncate</p>
|
||||
<div style="width:150px; background:yellow;" class="text-truncate">
|
||||
<span>
|
||||
This is text is truncated
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
<section id="buttons" class="mt-3 b-1 b-r-4 p-5">
|
||||
<h2>Buttons</h2>
|
||||
<p>Use custom button styles for actions in forms, dialogs, and more with support for multiple sizes,
|
||||
states, and more.
|
||||
</p>
|
||||
<div>
|
||||
<h4 class="text-core mt-5">Examples</h4>
|
||||
<div class="d-flex flex-wrap gap-3 ">
|
||||
<button type="button" href="#" class="btn btn-core">click me</button>
|
||||
<button type="button" href="#" class="btn btn-primary">click me</button>
|
||||
<button type="button" href="#" class="btn btn-secondary">click me</button>
|
||||
<button type="button" href="#" class="btn btn-success">click me</button>
|
||||
<button type="button" href="#" class="btn btn-info">click me</button>
|
||||
<button type="button" href="#" class="btn btn-warning">click me</button>
|
||||
<button type="button" href="#" class="btn btn-danger">click me</button>
|
||||
<button type="button" href="#" class="btn btn-white">click me</button>
|
||||
<button type="button" href="#" class="btn btn-light">click me</button>
|
||||
<button type="button" href="#" class="btn btn-dark">click me</button>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="mt-4 mb-4">
|
||||
<div>
|
||||
<h4 class="text-core mt-5">Outline buttons</h4>
|
||||
<div class="d-flex flex-wrap gap-3 ">
|
||||
<button type="button" href="#" class="btn btn-outline-core">click me</button>
|
||||
<button type="button" href="#" class="btn btn-outline-primary">click me</button>
|
||||
<button type="button" href="#" class="btn btn-outline-secondary">click me</button>
|
||||
<button type="button" href="#" class="btn btn-outline-success">click me</button>
|
||||
<button type="button" href="#" class="btn btn-outline-info">click me</button>
|
||||
<button type="button" href="#" class="btn btn-outline-warning">click me</button>
|
||||
<button type="button" href="#" class="btn btn-outline-danger">click me</button>
|
||||
<button type="button" href="#" class="btn btn-outline-white">click me</button>
|
||||
<button type="button" href="#" class="btn btn-outline-light">click me</button>
|
||||
<button type="button" href="#" class="btn btn-outline-dark">click me</button>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="mt-4 mb-4">
|
||||
<div>
|
||||
<h4 class="text-core mt-5">Sizes</h4>
|
||||
<div class="">
|
||||
<button type="button" href="#" class="btn btn-sm btn-core">small button</button>
|
||||
<button type="button" href="#" class="btn btn-sm btn-light">small button</button>
|
||||
</div>
|
||||
<div class="mt-4 ">
|
||||
<button type="button" href="#" class="btn btn-lg btn-core">large button</button>
|
||||
<button type="button" href="#" class="btn btn-lg btn-light">large button</button>
|
||||
</div>
|
||||
<div class="mt-4 ">
|
||||
<button type="button" href="#" class="btn btn-block btn-core">full width button</button>
|
||||
<button type="button" href="#" class="mt-4 btn btn-block btn-light">full width
|
||||
button</button>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="mt-4 mb-4">
|
||||
<div>
|
||||
<h4 class="text-core mt-5">Button states</h4>
|
||||
<div class="">
|
||||
<button type="button" href="#" class="btn btn-core active" aria-pressed="true">active
|
||||
button</button>
|
||||
<button type="button" href="#" class="btn btn-core">normal button</button>
|
||||
<button type="button" href="#" class="btn btn-core disabled" aria-disabled="true">disabled
|
||||
button</button>
|
||||
</div>
|
||||
<div class="mt-4">
|
||||
<button type="button" href="#" class="btn btn-outline-core active" aria-pressed="true">active button</button>
|
||||
<button type="button" href="#" class="btn btn-outline-core">normal button</button>
|
||||
<button type="button" href="#" class="btn btn-outline-core disabled" aria-disabled="true">disabled
|
||||
button</button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id="buttons" class="mt-3 b-1 b-r-4 p-5">
|
||||
<h2>Radio
|
||||
</h2>
|
||||
<p>Radio buttons allow the user to select a single choice from a group of options.
|
||||
|
||||
|
||||
</p>
|
||||
<div>
|
||||
<div class="container">
|
||||
|
||||
<div class="checkbox-group">
|
||||
<input id="checkbox-1" name="checkbox" type="checkbox" checked>
|
||||
<label for="checkbox-1" class="checkbox-label">Checked</label>
|
||||
</div>
|
||||
|
||||
<div class="checkbox-group">
|
||||
<input id="checkbox-2" name="checkbox" type="checkbox">
|
||||
<label for="checkbox-2" class="checkbox-label">Unchecked</label>
|
||||
</div>
|
||||
|
||||
<div class="checkbox-group">
|
||||
<input id="checkbox-1" name="checkbox" type="checkbox" disabled>
|
||||
<label for="checkbox-1" class="checkbox-label">Checked disabled</label>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="radio-group">
|
||||
<input id="radio-1" name="radio" type="radio" checked>
|
||||
<label for="radio-1" class="radio-label">Checked</label>
|
||||
</div>
|
||||
|
||||
<div class="radio-group">
|
||||
<input id="radio-2" name="radio" type="radio">
|
||||
<label for="radio-2" class="radio-label">Unchecked</label>
|
||||
</div>
|
||||
|
||||
<div class="radio-group">
|
||||
<input id="radio-3" name="radio" type="radio" disabled>
|
||||
<label for="radio-3" class="radio-label">Disabled</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id="inputs" class="mt-3 b-1 b-r-4 p-5">
|
||||
<h2>Input
|
||||
</h2>
|
||||
<p>Inputs buttons allow the user to select a single choice from a group of options.
|
||||
</p>
|
||||
|
||||
|
||||
<form>
|
||||
<div class="d-flex flex-wrap gap-3">
|
||||
|
||||
|
||||
<div class="form-group error">
|
||||
<input type="text" required="required" /><span class="highlight"></span><span class="bar"></span>
|
||||
<label class="label-animated">Name</label>
|
||||
<div class="input-helper-text">Some helping Text</div>
|
||||
<div class="input-error-text">At least 6 characters required</div>
|
||||
<span class="input-glyph-wraper">
|
||||
<span class="input-glyph">
|
||||
<span class="input-glyph button">
|
||||
<i class='bx bx-x-circle'></i>
|
||||
</span>
|
||||
<span class="input-glyph error">
|
||||
<i class='bx bx-error-circle'></i>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<input type="text" required="required" /><span class="highlight"></span><span class="bar"></span>
|
||||
<label class="label-animated">Email</label>
|
||||
<div class="input-helper-text">Some helping Text</div>
|
||||
<div class="input-error-text">At least 6 characters required</div>
|
||||
<span class="input-glyph-wraper">
|
||||
<span class="input-glyph">
|
||||
<span class="input-glyph button">
|
||||
<i class='bx bx-x-circle'></i>
|
||||
</span>
|
||||
<span class="input-glyph error">
|
||||
<i class='bx bx-error-circle'></i>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<input type="password" required="required" /><span class="highlight"></span><span class="bar"></span>
|
||||
<label class="label-animated">Password</label>
|
||||
<div class="input-helper-text">Some helping Text</div>
|
||||
<div class="input-error-text">At least 6 characters required</div>
|
||||
<span class="input-glyph-wraper">
|
||||
<span class="input-glyph">
|
||||
<span class="input-glyph button">
|
||||
<i class='bx bx-x-circle'></i>
|
||||
</span>
|
||||
<span class="input-glyph error">
|
||||
<i class='bx bx-error-circle'></i>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<input type="number" required="required" /><span class="highlight"></span><span class="bar"></span>
|
||||
<label class="label-animated">Number</label>
|
||||
<div class="input-helper-text">Some helping Text</div>
|
||||
<div class="input-error-text">At least 6 characters required</div>
|
||||
<span class="input-glyph-wraper">
|
||||
<span class="input-glyph">
|
||||
<span class="input-glyph button">
|
||||
<i class='bx bx-x-circle'></i>
|
||||
</span>
|
||||
<span class="input-glyph error">
|
||||
<i class='bx bx-error-circle'></i>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<select type="textarea" required="required">
|
||||
<option value="" disabled selected hidden></option>
|
||||
<option value="1">Twitter </option>
|
||||
<option value="2">Facebook</option>
|
||||
</select>
|
||||
<span class="highlight"></span><span class="bar"></span>
|
||||
<label class="label-animated">Select</label>
|
||||
<span class="input-glyph-wraper">
|
||||
<span class="input-glyph"><i class='bx bx-caret-down'></i></span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group error">
|
||||
<select type="textarea" required="required">
|
||||
</select>
|
||||
<span class="highlight"></span><span class="bar"></span>
|
||||
<label class="label-animated">Select</label>
|
||||
<span class="input-glyph-wraper">
|
||||
<span class="input-glyph button">
|
||||
<i class='bx bx-x-circle'></i>
|
||||
</span>
|
||||
<span class="input-glyph">
|
||||
<i class='bx bx-caret-down'></i>
|
||||
</span>
|
||||
<span class="input-glyph error">
|
||||
<i class='bx bx-error-circle'></i>
|
||||
</span>
|
||||
</span>
|
||||
<div class="drop-down">
|
||||
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
|
||||
<div class="dropdown-header">Header</div>
|
||||
|
||||
<a class="dropdown-item" href="#">Action</a>
|
||||
<a class="dropdown-item" href="#">Another action</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" href="#">Something else here</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<textarea type="textarea" rows="5" required="required"></textarea><span class="highlight"></span><span class="bar"></span>
|
||||
<label class="label-animated">Message</label>
|
||||
<div class="input-helper-text">Some helping Text</div>
|
||||
<div class="input-error-text">At least 6 characters required</div>
|
||||
<span class="input-glyph-wraper">
|
||||
<span class="input-glyph">
|
||||
<span class="input-glyph button">
|
||||
<i class='bx bx-x-circle'></i>
|
||||
</span>
|
||||
<span class="input-glyph error">
|
||||
<i class='bx bx-error-circle'></i>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="btn-box">
|
||||
<button type="button" href="#" class="btn btn-core " aria-pressed="true">active
|
||||
button</button>
|
||||
<button type="button" href="#" class="btn btn-outline-core " aria-pressed="true">active
|
||||
button</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
<hr class="mt-4 mb-4">
|
||||
|
||||
<h2 class="mb-2">Grid</h2>
|
||||
<div class="grid test grid-col-4 gap-3">
|
||||
<div class="col-span-23">1</div>
|
||||
<div>2</div>
|
||||
<div>3</div>
|
||||
<div>4</div>
|
||||
<div>5</div>
|
||||
<div>6</div>
|
||||
<div>7</div>
|
||||
<div>8</div>
|
||||
<div>9</div>
|
||||
<div>10</div>
|
||||
<div>11</div>
|
||||
<div>12</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@code {
|
||||
private string sidebarClosed { get; set; } = "close";
|
||||
|
||||
private void ToggleSidebar()
|
||||
{
|
||||
sidebarClosed = string.IsNullOrWhiteSpace(sidebarClosed) ? "close" : "";
|
||||
}
|
||||
|
||||
|
||||
private string NavClosed { get; set; } = "showMenu";
|
||||
|
||||
private void ToggleNav()
|
||||
{
|
||||
NavClosed = string.IsNullOrWhiteSpace(NavClosed) ? "showMenu" : "";
|
||||
}
|
||||
|
||||
}
|
114
src/Connected.Components.Showcase.Runner/Pages/Index.razor
Normal file
114
src/Connected.Components.Showcase.Runner/Pages/Index.razor
Normal file
@ -0,0 +1,114 @@
|
||||
@page "/"
|
||||
@using Connected.Models;
|
||||
|
||||
<h1 style="text-align:center;">Component Sandbox</h1>
|
||||
|
||||
<p>ValueDouble: @inputValueDouble.ToString()</p>
|
||||
<p>ValueInt: @inputValueInt.ToString()</p>
|
||||
<p>ValueText: @inputValueText</p>
|
||||
<p>SimpleSelectValue: @SelectedItemValue</p>
|
||||
|
||||
<InputNumber
|
||||
Clearable="false"
|
||||
DisableMouseWheel="false"
|
||||
Disabled="false"
|
||||
Readonly="false"
|
||||
Placeholder="Double"
|
||||
Label="Double"
|
||||
Required="true"
|
||||
Step="0.000516"
|
||||
DecimalPlaces=5
|
||||
Class="m-2"
|
||||
@bind-Value="@inputValueDouble">
|
||||
</InputNumber>
|
||||
|
||||
<InputNumber
|
||||
Clearable="true"
|
||||
DisableMouseWheel="false"
|
||||
Disabled="false"
|
||||
Readonly="false"
|
||||
Placeholder="Double"
|
||||
Label="Integer"
|
||||
Required="true"
|
||||
Step="0.001"
|
||||
DecimalPlaces="2"
|
||||
Class="m-4"
|
||||
@bind-Value="@inputValueInt">
|
||||
</InputNumber>
|
||||
|
||||
<InputText
|
||||
Label="String"
|
||||
Required="true"
|
||||
ErrorText="@errorText"
|
||||
@bind-Value="@inputValueText">
|
||||
</InputText>
|
||||
|
||||
<InputText
|
||||
Label="Password"
|
||||
IsPassword="true"
|
||||
Required="true"
|
||||
ErrorText="@errorText"
|
||||
@bind-Value="@inputValueText">
|
||||
</InputText>
|
||||
|
||||
<SimpleSelect
|
||||
Label="Simple Select"
|
||||
|
||||
ValueType="string"
|
||||
@bind-Value="@SelectedItemValue"
|
||||
Items="@SelectFieldItems">
|
||||
</SimpleSelect>
|
||||
|
||||
|
||||
@code {
|
||||
|
||||
|
||||
List<SelectItem<string>> SelectFieldItems = new();
|
||||
string SelectedItemValue = "";
|
||||
|
||||
int counter { get; set; } = 0;
|
||||
|
||||
private string _inputText = string.Empty;
|
||||
string inputValueText
|
||||
{
|
||||
get
|
||||
{
|
||||
return _inputText;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value.Length > 0) errorText = "Error!!!";
|
||||
else errorText = "";
|
||||
_inputText = value;
|
||||
StateHasChanged();
|
||||
}
|
||||
}
|
||||
double inputValueDouble = 12.756;
|
||||
int inputValueInt = 12;
|
||||
|
||||
DateTime inputValueDate = DateTime.Now.AddDays(-10);
|
||||
|
||||
public void CounterIncrement()
|
||||
{
|
||||
counter++;
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
string errorText = "Error!!";
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
SelectFieldItems.Add(new SelectItem<string>() { DisplayedText = "Item 1", Value = "select item value 1", Enabled = true });
|
||||
SelectFieldItems.Add(new SelectItem<string>() { DisplayedText = "Item 2", Value = "select item value 2", Enabled = true });
|
||||
SelectFieldItems.Add(new SelectItem<string>() { DisplayedText = "Item 3", Value = "select item value 3", Enabled = true });
|
||||
SelectFieldItems.Add(new SelectItem<string>() { DisplayedText = "Item 4", Value = "select item value 4", Enabled = true });
|
||||
SelectFieldItems.Add(new SelectItem<string>() { DisplayedText = "Item 5", Value = "select item value 5", Enabled = false });
|
||||
SelectFieldItems.Add(new SelectItem<string>() { DisplayedText = "Item 6", Value = "select item value 6", Enabled = true });
|
||||
SelectFieldItems.Add(new SelectItem<string>() { DisplayedText = "Item 7", Value = "select item value 7", Enabled = true });
|
||||
SelectFieldItems.Add(new SelectItem<string>() { DisplayedText = "Item 8", Value = "select item value 8", Enabled = false });
|
||||
SelectFieldItems.Add(new SelectItem<string>() { DisplayedText = "Item 9", Value = "select item value 9", Enabled = true });
|
||||
SelectFieldItems.Add(new SelectItem<string>() { DisplayedText = "Item 10", Value = "select item value 10", Enabled = true });
|
||||
SelectedItemValue = SelectFieldItems[0].Value;
|
||||
}
|
||||
|
||||
}
|
17
src/Connected.Components.Showcase.Runner/Program.cs
Normal file
17
src/Connected.Components.Showcase.Runner/Program.cs
Normal file
@ -0,0 +1,17 @@
|
||||
using Connected.Components.Showcase.Runner;
|
||||
using Microsoft.AspNetCore.Components.Web;
|
||||
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
|
||||
|
||||
internal class Program
|
||||
{
|
||||
private static async global::System.Threading.Tasks.Task Main(string[] args)
|
||||
{
|
||||
var builder = WebAssemblyHostBuilder.CreateDefault(args);
|
||||
builder.RootComponents.Add<App>("#app");
|
||||
builder.RootComponents.Add<HeadOutlet>("head::after");
|
||||
|
||||
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
|
||||
|
||||
await builder.Build().RunAsync();
|
||||
}
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
{
|
||||
"iisSettings": {
|
||||
"iisExpress": {
|
||||
"applicationUrl": "http://localhost:47832",
|
||||
"sslPort": 44313
|
||||
}
|
||||
},
|
||||
"profiles": {
|
||||
"http": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": true,
|
||||
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
|
||||
"applicationUrl": "http://localhost:5225",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"https": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": true,
|
||||
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
|
||||
"applicationUrl": "https://localhost:7045;http://localhost:5225",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"IIS Express": {
|
||||
"commandName": "IISExpress",
|
||||
"launchBrowser": true,
|
||||
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
8
src/Connected.Components.Showcase.Runner/_Imports.razor
Normal file
8
src/Connected.Components.Showcase.Runner/_Imports.razor
Normal file
@ -0,0 +1,8 @@
|
||||
@using System.Net.Http
|
||||
@using System.Net.Http.Json
|
||||
@using Microsoft.AspNetCore.Components.Routing
|
||||
@using Microsoft.AspNetCore.Components.Web
|
||||
@using Microsoft.AspNetCore.Components.WebAssembly.Http
|
||||
@using Microsoft.JSInterop
|
||||
@using Connected.Components.Showcase.Runner
|
||||
@using Connected.Components.Showcase;
|
30
src/Connected.Components.Showcase.Runner/wwwroot/index.html
Normal file
30
src/Connected.Components.Showcase.Runner/wwwroot/index.html
Normal file
@ -0,0 +1,30 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Connected.Components.Showcase.Runner</title>
|
||||
<base href="/" />
|
||||
<link href="css/app.css" rel="stylesheet" />
|
||||
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" rel="stylesheet" />
|
||||
<link href="_content/Connected.Components/Connected.Components.min.css" rel="stylesheet" />
|
||||
<script src="_content/Connected.Components/Connected.Components.min.js"></script>
|
||||
|
||||
<link href='https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css' rel='stylesheet'>
|
||||
|
||||
<!-- If you add any scoped CSS files, uncomment the following to load them
|
||||
<link href="Connected.Components.Showcase.Runner.styles.css" rel="stylesheet" /> -->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app">Loading...</div>
|
||||
|
||||
<div id="blazor-error-ui">
|
||||
An unhandled error has occurred.
|
||||
<a href="" class="reload">Reload</a>
|
||||
<a class="dismiss">🗙</a>
|
||||
</div>
|
||||
<script src="_framework/blazor.webassembly.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
23
src/Connected.Components.Showcase/ClientStartup.cs
Normal file
23
src/Connected.Components.Showcase/ClientStartup.cs
Normal file
@ -0,0 +1,23 @@
|
||||
using Connected.Startup;
|
||||
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Connected.Services;
|
||||
|
||||
namespace Connected.Components.Showcase;
|
||||
|
||||
public class ClientStartup : IStartup
|
||||
{
|
||||
public static IServiceProvider Services { get; private set; } = default!;
|
||||
|
||||
public async Task Configure(WebAssemblyHost host)
|
||||
{
|
||||
Services = host.Services;
|
||||
|
||||
await Task.CompletedTask;
|
||||
}
|
||||
|
||||
public async Task ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
await Task.CompletedTask;
|
||||
}
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Razor">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
|
||||
<Title>$(AssemblyName)</Title>
|
||||
<Authors>Tom PIT ltd</Authors>
|
||||
<Copyright>2022 Tom PIT ltd</Copyright>
|
||||
<PackageProjectUrl>https://git.tompit.com/Connected/Info</PackageProjectUrl>
|
||||
<PackageReadmeFile>README.md</PackageReadmeFile>
|
||||
<PackageTags>connected;platform;</PackageTags>
|
||||
<IncludeSymbols>True</IncludeSymbols>
|
||||
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
|
||||
<PackageLicenseFile>LICENSE</PackageLicenseFile>
|
||||
<PackageOutputPath>$(OutputPath)</PackageOutputPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.*-*" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.*-*" PrivateAssets="all" />
|
||||
<PackageReference Include="Connected.Client" Version="1.0.*-*" />
|
||||
<PackageReference Include="Nerdbank.GitVersioning" Version="3.5.119" PrivateAssets="all" Condition="!Exists('packages.config')" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\..\LICENSE">
|
||||
<Pack>True</Pack>
|
||||
<PackagePath>\</PackagePath>
|
||||
</None>
|
||||
<None Include="..\..\README.md">
|
||||
<Pack>True</Pack>
|
||||
<PackagePath>\</PackagePath>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Pages\" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\connected.components\Connected.Components.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="CopyPackages" AfterTargets="Pack">
|
||||
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
||||
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
||||
</Target>
|
||||
|
||||
<Target Name="UploadLocalPackages" AfterTargets="CopyPackages">
|
||||
<Exec Command="dotnet nuget push -s LocalNugetServer $(OutputPath)..\$(PackageId).$(PackageVersion).nupkg --api-key $([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET_SERVER_TOKEN'))" IgnoreExitCode="true"></Exec>
|
||||
<Exec Command="dotnet nuget push -s LocalNugetServer $(OutputPath)..\$(PackageId).$(PackageVersion).snupkg --api-key $([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET_SERVER_TOKEN'))" IgnoreExitCode="true"></Exec>
|
||||
</Target>
|
||||
</Project>
|
@ -0,0 +1,38 @@
|
||||
{
|
||||
"iisSettings": {
|
||||
"iisExpress": {
|
||||
"applicationUrl": "http://localhost:30375",
|
||||
"sslPort": 44321
|
||||
}
|
||||
},
|
||||
"profiles": {
|
||||
"http": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": true,
|
||||
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
|
||||
"applicationUrl": "http://localhost:5035",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"https": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": true,
|
||||
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
|
||||
"applicationUrl": "https://localhost:0;http://localhost:5035",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"IIS Express": {
|
||||
"commandName": "IISExpress",
|
||||
"launchBrowser": true,
|
||||
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
7
src/Connected.Components.Showcase/_Imports.razor
Normal file
7
src/Connected.Components.Showcase/_Imports.razor
Normal file
@ -0,0 +1,7 @@
|
||||
@using System.Net.Http
|
||||
@using System.Net.Http.Json
|
||||
@using Microsoft.AspNetCore.Components.Routing
|
||||
@using Microsoft.AspNetCore.Components.Web
|
||||
@using Microsoft.AspNetCore.Components.WebAssembly.Http
|
||||
@using Microsoft.JSInterop
|
||||
@using Connected.Components.Showcase
|
14
src/Connected.Components.Showcase/version.json
Normal file
14
src/Connected.Components.Showcase/version.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/main/src/NerdBank.GitVersioning/version.schema.json",
|
||||
"version": "1.0-prerelease",
|
||||
"semVer1NumericIdentifierPadding": 4,
|
||||
"nugetPackageVersion": {
|
||||
"semVer": 2, // optional. Set to either 1 or 2 to control how the NuGet package version string is generated. Default is 1.
|
||||
"precision": "build" // optional. Use when you want to use a more or less precise package version than the default major.minor.build.
|
||||
},
|
||||
"cloudBuild": {
|
||||
"buildNumber": {
|
||||
"enabled": true
|
||||
}
|
||||
}
|
||||
}
|
32
src/Connected.Components.Showcase/wwwroot/css/app.css
Normal file
32
src/Connected.Components.Showcase/wwwroot/css/app.css
Normal file
@ -0,0 +1,32 @@
|
||||
h1:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
#blazor-error-ui {
|
||||
background: lightyellow;
|
||||
bottom: 0;
|
||||
box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
|
||||
display: none;
|
||||
left: 0;
|
||||
padding: 0.6rem 1.25rem 0.7rem 1.25rem;
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
#blazor-error-ui .dismiss {
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
right: 0.75rem;
|
||||
top: 0.5rem;
|
||||
}
|
||||
|
||||
.blazor-error-boundary {
|
||||
background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
|
||||
padding: 1rem 1rem 1rem 3.7rem;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.blazor-error-boundary::after {
|
||||
content: "An error has occurred."
|
||||
}
|
21
src/Connected.Components.Showcase/wwwroot/index.html
Normal file
21
src/Connected.Components.Showcase/wwwroot/index.html
Normal file
@ -0,0 +1,21 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<base href="/" />
|
||||
<link href="css/app.css" rel="stylesheet" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app">Loading...</div>
|
||||
|
||||
<div id="blazor-error-ui">
|
||||
An unhandled error has occurred.
|
||||
<a href="" class="reload">Reload</a>
|
||||
<a class="dismiss">🗙</a>
|
||||
</div>
|
||||
<script src="_framework/blazor.webassembly.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
12
src/Connected.Components/.config/dotnet-tools.json
Normal file
12
src/Connected.Components/.config/dotnet-tools.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"version": 1,
|
||||
"isRoot": true,
|
||||
"tools": {
|
||||
"connected.webcompiler": {
|
||||
"version": "1.0.7-prerelease.g67169cf2c5",
|
||||
"commands": [
|
||||
"webcompiler"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
343
src/Connected.Components/Colors.cs
Normal file
343
src/Connected.Components/Colors.cs
Normal file
@ -0,0 +1,343 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace Connected;
|
||||
|
||||
[ExcludeFromCodeCoverage]
|
||||
public static class Colors
|
||||
{
|
||||
public static partial class Red
|
||||
{
|
||||
public static string Default { get; } = "#F44336";
|
||||
public static string Lighten5 { get; } = "#FFEBEE";
|
||||
public static string Lighten4 { get; } = "#FFCDD2";
|
||||
public static string Lighten3 { get; } = "#EF9A9A";
|
||||
public static string Lighten2 { get; } = "#E57373";
|
||||
public static string Lighten1 { get; } = "#EF5350";
|
||||
public static string Darken1 { get; } = "#E53935";
|
||||
public static string Darken2 { get; } = "#D32F2F";
|
||||
public static string Darken3 { get; } = "#C62828";
|
||||
public static string Darken4 { get; } = "#B71C1C";
|
||||
public static string Accent1 { get; } = "#FF8A80";
|
||||
public static string Accent2 { get; } = "#FF5252";
|
||||
public static string Accent3 { get; } = "#FF1744";
|
||||
public static string Accent4 { get; } = "#D50000";
|
||||
}
|
||||
|
||||
public static class Pink
|
||||
{
|
||||
public static string Default { get; } = "#E91E63";
|
||||
public static string Lighten5 { get; } = "#FCE4EC";
|
||||
public static string Lighten4 { get; } = "#F8BBD0";
|
||||
public static string Lighten3 { get; } = "#F48FB1";
|
||||
public static string Lighten2 { get; } = "#F06292";
|
||||
public static string Lighten1 { get; } = "#EC407A";
|
||||
public static string Darken1 { get; } = "#D81B60";
|
||||
public static string Darken2 { get; } = "#C2185B";
|
||||
public static string Darken3 { get; } = "#AD1457";
|
||||
public static string Darken4 { get; } = "#880E4F";
|
||||
public static string Accent1 { get; } = "#FF80AB";
|
||||
public static string Accent2 { get; } = "#FF4081";
|
||||
public static string Accent3 { get; } = "#F50057";
|
||||
public static string Accent4 { get; } = "#C51162";
|
||||
}
|
||||
|
||||
public static class Purple
|
||||
{
|
||||
public static string Default { get; } = "#9C27B0";
|
||||
public static string Lighten5 { get; } = "#F3E5F5";
|
||||
public static string Lighten4 { get; } = "#E1BEE7";
|
||||
public static string Lighten3 { get; } = "#CE93D8";
|
||||
public static string Lighten2 { get; } = "#BA68C8";
|
||||
public static string Lighten1 { get; } = "#AB47BC";
|
||||
public static string Darken1 { get; } = "#8E24AA";
|
||||
public static string Darken2 { get; } = "#7B1FA2";
|
||||
public static string Darken3 { get; } = "#6A1B9A";
|
||||
public static string Darken4 { get; } = "#4A148C";
|
||||
public static string Accent1 { get; } = "#EA80FC";
|
||||
public static string Accent2 { get; } = "#E040FB";
|
||||
public static string Accent3 { get; } = "#D500F9";
|
||||
public static string Accent4 { get; } = "#AA00FF";
|
||||
}
|
||||
|
||||
public static class DeepPurple
|
||||
{
|
||||
public static string Default { get; } = "#673AB7";
|
||||
public static string Lighten5 { get; } = "#EDE7F6";
|
||||
public static string Lighten4 { get; } = "#D1C4E9";
|
||||
public static string Lighten3 { get; } = "#B39DDB";
|
||||
public static string Lighten2 { get; } = "#9575CD";
|
||||
public static string Lighten1 { get; } = "#7E57C2";
|
||||
public static string Darken1 { get; } = "#5E35B1";
|
||||
public static string Darken2 { get; } = "#512DA8";
|
||||
public static string Darken3 { get; } = "#4527A0";
|
||||
public static string Darken4 { get; } = "#311B92";
|
||||
public static string Accent1 { get; } = "#B388FF";
|
||||
public static string Accent2 { get; } = "#7C4DFF";
|
||||
public static string Accent3 { get; } = "#651FFF";
|
||||
public static string Accent4 { get; } = "#6200EA";
|
||||
}
|
||||
|
||||
public static class Indigo
|
||||
{
|
||||
public static string Default { get; } = "#3F51B5";
|
||||
public static string Lighten5 { get; } = "#E8EAF6";
|
||||
public static string Lighten4 { get; } = "#C5CAE9";
|
||||
public static string Lighten3 { get; } = "#9FA8DA";
|
||||
public static string Lighten2 { get; } = "#7986CB";
|
||||
public static string Lighten1 { get; } = "#5C6BC0";
|
||||
public static string Darken1 { get; } = "#3949AB";
|
||||
public static string Darken2 { get; } = "#303F9F";
|
||||
public static string Darken3 { get; } = "#283593";
|
||||
public static string Darken4 { get; } = "#1A237E";
|
||||
public static string Accent1 { get; } = "#8C9EFF";
|
||||
public static string Accent2 { get; } = "#536DFE";
|
||||
public static string Accent3 { get; } = "#3D5AFE";
|
||||
public static string Accent4 { get; } = "#304FFE";
|
||||
}
|
||||
|
||||
public static class Blue
|
||||
{
|
||||
public static string Default { get; } = "#2196F3";
|
||||
public static string Lighten5 { get; } = "#E3F2FD";
|
||||
public static string Lighten4 { get; } = "#BBDEFB";
|
||||
public static string Lighten3 { get; } = "#90CAF9";
|
||||
public static string Lighten2 { get; } = "#64B5F6";
|
||||
public static string Lighten1 { get; } = "#42A5F5";
|
||||
public static string Darken1 { get; } = "#1E88E5";
|
||||
public static string Darken2 { get; } = "#1976D2";
|
||||
public static string Darken3 { get; } = "#1565C0";
|
||||
public static string Darken4 { get; } = "#0D47A1";
|
||||
public static string Accent1 { get; } = "#82B1FF";
|
||||
public static string Accent2 { get; } = "#448AFF";
|
||||
public static string Accent3 { get; } = "#2979FF";
|
||||
public static string Accent4 { get; } = "#2962FF";
|
||||
}
|
||||
|
||||
public static class LightBlue
|
||||
{
|
||||
public static string Default { get; } = "#03A9F4";
|
||||
public static string Lighten5 { get; } = "#E1F5FE";
|
||||
public static string Lighten4 { get; } = "#B3E5FC";
|
||||
public static string Lighten3 { get; } = "#81D4FA";
|
||||
public static string Lighten2 { get; } = "#4FC3F7";
|
||||
public static string Lighten1 { get; } = "#29B6F6";
|
||||
public static string Darken1 { get; } = "#039BE5";
|
||||
public static string Darken2 { get; } = "#0288D1";
|
||||
public static string Darken3 { get; } = "#0277BD";
|
||||
public static string Darken4 { get; } = "#01579B";
|
||||
public static string Accent1 { get; } = "#80D8FF";
|
||||
public static string Accent2 { get; } = "#40C4FF";
|
||||
public static string Accent3 { get; } = "#00B0FF";
|
||||
public static string Accent4 { get; } = "#0091EA";
|
||||
}
|
||||
|
||||
public static class Cyan
|
||||
{
|
||||
public static string Default { get; } = "#00BCD4";
|
||||
public static string Lighten5 { get; } = "#E0F7FA";
|
||||
public static string Lighten4 { get; } = "#B2EBF2";
|
||||
public static string Lighten3 { get; } = "#80DEEA";
|
||||
public static string Lighten2 { get; } = "#4DD0E1";
|
||||
public static string Lighten1 { get; } = "#26C6DA";
|
||||
public static string Darken1 { get; } = "#00ACC1";
|
||||
public static string Darken2 { get; } = "#0097A7";
|
||||
public static string Darken3 { get; } = "#00838F";
|
||||
public static string Darken4 { get; } = "#006064";
|
||||
public static string Accent1 { get; } = "#84FFFF";
|
||||
public static string Accent2 { get; } = "#18FFFF";
|
||||
public static string Accent3 { get; } = "#00E5FF";
|
||||
public static string Accent4 { get; } = "#00B8D4";
|
||||
}
|
||||
|
||||
public static class Teal
|
||||
{
|
||||
public static string Default { get; } = "#009688";
|
||||
public static string Lighten5 { get; } = "#E0F2F1";
|
||||
public static string Lighten4 { get; } = "#B2DFDB";
|
||||
public static string Lighten3 { get; } = "#80CBC4";
|
||||
public static string Lighten2 { get; } = "#4DB6AC";
|
||||
public static string Lighten1 { get; } = "#26A69A";
|
||||
public static string Darken1 { get; } = "#00897B";
|
||||
public static string Darken2 { get; } = "#00796B";
|
||||
public static string Darken3 { get; } = "#00695C";
|
||||
public static string Darken4 { get; } = "#004D40";
|
||||
public static string Accent1 { get; } = "#A7FFEB";
|
||||
public static string Accent2 { get; } = "#64FFDA";
|
||||
public static string Accent3 { get; } = "#1DE9B6";
|
||||
public static string Accent4 { get; } = "#00BFA5";
|
||||
}
|
||||
|
||||
public static class Green
|
||||
{
|
||||
public static string Default { get; } = "#4CAF50";
|
||||
public static string Lighten5 { get; } = "#E8F5E9";
|
||||
public static string Lighten4 { get; } = "#C8E6C9";
|
||||
public static string Lighten3 { get; } = "#A5D6A7";
|
||||
public static string Lighten2 { get; } = "#81C784";
|
||||
public static string Lighten1 { get; } = "#66BB6A";
|
||||
public static string Darken1 { get; } = "#43A047";
|
||||
public static string Darken2 { get; } = "#388E3C";
|
||||
public static string Darken3 { get; } = "#2E7D32";
|
||||
public static string Darken4 { get; } = "#1B5E20";
|
||||
public static string Accent1 { get; } = "#B9F6CA";
|
||||
public static string Accent2 { get; } = "#69F0AE";
|
||||
public static string Accent3 { get; } = "#00E676";
|
||||
public static string Accent4 { get; } = "#00C853";
|
||||
}
|
||||
|
||||
public static class LightGreen
|
||||
{
|
||||
public static string Default { get; } = "#8BC34A";
|
||||
public static string Lighten5 { get; } = "#F1F8E9";
|
||||
public static string Lighten4 { get; } = "#DCEDC8";
|
||||
public static string Lighten3 { get; } = "#C5E1A5";
|
||||
public static string Lighten2 { get; } = "#AED581";
|
||||
public static string Lighten1 { get; } = "#9CCC65";
|
||||
public static string Darken1 { get; } = "#7CB342";
|
||||
public static string Darken2 { get; } = "#689F38";
|
||||
public static string Darken3 { get; } = "#558B2F";
|
||||
public static string Darken4 { get; } = "#33691E";
|
||||
public static string Accent1 { get; } = "#CCFF90";
|
||||
public static string Accent2 { get; } = "#B2FF59";
|
||||
public static string Accent3 { get; } = "#76FF03";
|
||||
public static string Accent4 { get; } = "#64DD17";
|
||||
}
|
||||
|
||||
public static class Lime
|
||||
{
|
||||
public static string Default { get; } = "#CDDC39";
|
||||
public static string Lighten5 { get; } = "#F9FBE7";
|
||||
public static string Lighten4 { get; } = "#F0F4C3";
|
||||
public static string Lighten3 { get; } = "#E6EE9C";
|
||||
public static string Lighten2 { get; } = "#DCE775";
|
||||
public static string Lighten1 { get; } = "#D4E157";
|
||||
public static string Darken1 { get; } = "#C0CA33";
|
||||
public static string Darken2 { get; } = "#AFB42B";
|
||||
public static string Darken3 { get; } = "#9E9D24";
|
||||
public static string Darken4 { get; } = "#827717";
|
||||
public static string Accent1 { get; } = "#F4FF81";
|
||||
public static string Accent2 { get; } = "#EEFF41";
|
||||
public static string Accent3 { get; } = "#C6FF00";
|
||||
public static string Accent4 { get; } = "#AEEA00";
|
||||
}
|
||||
|
||||
public static class Yellow
|
||||
{
|
||||
public static string Default { get; } = "#FFEB3B";
|
||||
public static string Lighten5 { get; } = "#FFFDE7";
|
||||
public static string Lighten4 { get; } = "#FFF9C4";
|
||||
public static string Lighten3 { get; } = "#FFF59D";
|
||||
public static string Lighten2 { get; } = "#FFF176";
|
||||
public static string Lighten1 { get; } = "#FFEE58";
|
||||
public static string Darken1 { get; } = "#FDD835";
|
||||
public static string Darken2 { get; } = "#FBC02D";
|
||||
public static string Darken3 { get; } = "#F9A825";
|
||||
public static string Darken4 { get; } = "#F57F17";
|
||||
public static string Accent1 { get; } = "#FFFF8D";
|
||||
public static string Accent2 { get; } = "#FFFF00";
|
||||
public static string Accent3 { get; } = "#FFEA00";
|
||||
public static string Accent4 { get; } = "#FFD600";
|
||||
}
|
||||
|
||||
public static class Amber
|
||||
{
|
||||
public static string Default { get; } = "#FFC107";
|
||||
public static string Lighten5 { get; } = "#FFF8E1";
|
||||
public static string Lighten4 { get; } = "#FFECB3";
|
||||
public static string Lighten3 { get; } = "#FFE082";
|
||||
public static string Lighten2 { get; } = "#FFD54F";
|
||||
public static string Lighten1 { get; } = "#FFCA28";
|
||||
public static string Darken1 { get; } = "#FFB300";
|
||||
public static string Darken2 { get; } = "#FFA000";
|
||||
public static string Darken3 { get; } = "#FF8F00";
|
||||
public static string Darken4 { get; } = "#FF6F00";
|
||||
public static string Accent1 { get; } = "#FFE57F";
|
||||
public static string Accent2 { get; } = "#FFD740";
|
||||
public static string Accent3 { get; } = "#FFC400";
|
||||
public static string Accent4 { get; } = "#FFAB00";
|
||||
}
|
||||
|
||||
public static class Orange
|
||||
{
|
||||
public static string Default { get; } = "#FF9800";
|
||||
public static string Lighten5 { get; } = "#FFF3E0";
|
||||
public static string Lighten4 { get; } = "#FFE0B2";
|
||||
public static string Lighten3 { get; } = "#FFCC80";
|
||||
public static string Lighten2 { get; } = "#FFB74D";
|
||||
public static string Lighten1 { get; } = "#FFA726";
|
||||
public static string Darken1 { get; } = "#FB8C00";
|
||||
public static string Darken2 { get; } = "#F57C00";
|
||||
public static string Darken3 { get; } = "#EF6C00";
|
||||
public static string Darken4 { get; } = "#E65100";
|
||||
public static string Accent1 { get; } = "#FFD180";
|
||||
public static string Accent2 { get; } = "#FFAB40";
|
||||
public static string Accent3 { get; } = "#FF9100";
|
||||
public static string Accent4 { get; } = "#FF6D00";
|
||||
}
|
||||
|
||||
public static class DeepOrange
|
||||
{
|
||||
public static string Default { get; } = "#FF5722";
|
||||
public static string Lighten5 { get; } = "#FBE9E7";
|
||||
public static string Lighten4 { get; } = "#FFCCBC";
|
||||
public static string Lighten3 { get; } = "#FFAB91";
|
||||
public static string Lighten2 { get; } = "#FF8A65";
|
||||
public static string Lighten1 { get; } = "#FF7043";
|
||||
public static string Darken1 { get; } = "#F4511E";
|
||||
public static string Darken2 { get; } = "#E64A19";
|
||||
public static string Darken3 { get; } = "#D84315";
|
||||
public static string Darken4 { get; } = "#BF360C";
|
||||
public static string Accent1 { get; } = "#FF9E80";
|
||||
public static string Accent2 { get; } = "#FF6E40";
|
||||
public static string Accent3 { get; } = "#FF3D00";
|
||||
public static string Accent4 { get; } = "#DD2C00";
|
||||
}
|
||||
|
||||
public static class Brown
|
||||
{
|
||||
public static string Default { get; } = "#795548";
|
||||
public static string Lighten5 { get; } = "#EFEBE9";
|
||||
public static string Lighten4 { get; } = "#D7CCC8";
|
||||
public static string Lighten3 { get; } = "#BCAAA4";
|
||||
public static string Lighten2 { get; } = "#A1887F";
|
||||
public static string Lighten1 { get; } = "#8D6E63";
|
||||
public static string Darken1 { get; } = "#6D4C41";
|
||||
public static string Darken2 { get; } = "#5D4037";
|
||||
public static string Darken3 { get; } = "#4E342E";
|
||||
public static string Darken4 { get; } = "#3E2723";
|
||||
}
|
||||
|
||||
public static class BlueGrey
|
||||
{
|
||||
public static string Default { get; } = "#607D8B";
|
||||
public static string Lighten5 { get; } = "#ECEFF1";
|
||||
public static string Lighten4 { get; } = "#CFD8DC";
|
||||
public static string Lighten3 { get; } = "#B0BEC5";
|
||||
public static string Lighten2 { get; } = "#90A4AE";
|
||||
public static string Lighten1 { get; } = "#78909C";
|
||||
public static string Darken1 { get; } = "#546E7A";
|
||||
public static string Darken2 { get; } = "#455A64";
|
||||
public static string Darken3 { get; } = "#37474F";
|
||||
public static string Darken4 { get; } = "#263238";
|
||||
}
|
||||
public static class Grey
|
||||
{
|
||||
public static string Default { get; } = "#9E9E9E";
|
||||
public static string Lighten5 { get; } = "#FAFAFA";
|
||||
public static string Lighten4 { get; } = "#F5F5F5";
|
||||
public static string Lighten3 { get; } = "#EEEEEE";
|
||||
public static string Lighten2 { get; } = "#E0E0E0";
|
||||
public static string Lighten1 { get; } = "#BDBDBD";
|
||||
public static string Darken1 { get; } = "#757575";
|
||||
public static string Darken2 { get; } = "#616161";
|
||||
public static string Darken3 { get; } = "#424242";
|
||||
public static string Darken4 { get; } = "#212121";
|
||||
}
|
||||
|
||||
public static class Shades
|
||||
{
|
||||
public static string Black { get; } = "#000000";
|
||||
public static string White { get; } = "#FFFFFF";
|
||||
public static string Transparent { get; } = "transparent";
|
||||
}
|
||||
}
|
44
src/Connected.Components/Components/Button.razor
Normal file
44
src/Connected.Components/Components/Button.razor
Normal file
@ -0,0 +1,44 @@
|
||||
<button
|
||||
type="button"
|
||||
href="#"
|
||||
@onclick="@OnClick"
|
||||
disabled=@Disabled
|
||||
style="@Style"
|
||||
class="@ClassList">
|
||||
<div class="@ContentClassList">
|
||||
@if (!string.IsNullOrEmpty(Glyph))
|
||||
{
|
||||
@if (GlyphPosition == Position.Top || GlyphPosition == Position.Bottom)
|
||||
{
|
||||
<div style="align-items:center">
|
||||
@if (GlyphPosition == Position.Top)
|
||||
{
|
||||
<Glyph SVG="@Glyph" Color="@GlyphColor"/>
|
||||
}
|
||||
@ChildContent
|
||||
@if (GlyphPosition == Position.Bottom)
|
||||
{
|
||||
<Glyph SVG="@Glyph" Color="@GlyphColor"/>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
@if (GlyphPosition == Position.Left || GlyphPosition == Position.Right)
|
||||
{
|
||||
<div style="display:flex; align-items:center">
|
||||
@if (GlyphPosition == Position.Left)
|
||||
{
|
||||
<Glyph SVG="@Glyph" Color="@GlyphColor" Class="m-1" />
|
||||
}
|
||||
@ChildContent
|
||||
@if (GlyphPosition == Position.Right)
|
||||
{
|
||||
<Glyph SVG="@Glyph" Color="@GlyphColor" Class="m-1" />
|
||||
}
|
||||
</div>
|
||||
}
|
||||
} else
|
||||
{
|
||||
@ChildContent
|
||||
}
|
||||
</div>
|
||||
</button>
|
150
src/Connected.Components/Components/Button.razor.cs
Normal file
150
src/Connected.Components/Components/Button.razor.cs
Normal file
@ -0,0 +1,150 @@
|
||||
using Connected.Utilities;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.AspNetCore.Components.Web;
|
||||
using static Connected.Colors;
|
||||
using System;
|
||||
|
||||
namespace Connected.Components;
|
||||
public partial class Button
|
||||
{
|
||||
#region Parameters
|
||||
|
||||
/// <summary>
|
||||
/// Outline type of the button.
|
||||
/// Options: true, false
|
||||
/// Default: false
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public bool Outlined { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Color of the button.
|
||||
/// Options: Color.[Core,Primary,Secondary,Success,Info,Warning,Danger,White,Light,Dark]
|
||||
/// Default: Color.Core
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public Color Color { get; set; } = Color.Core;
|
||||
|
||||
/// <summary>
|
||||
/// Size of the button.
|
||||
/// Options: Size.[Small,Medium,Large,FullWidth]
|
||||
/// Default: Size.Large
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public Size Size { get; set; } = Size.Large;
|
||||
|
||||
/// <summary>
|
||||
/// Text shown inside the button
|
||||
/// Options: any string variable
|
||||
/// Default: string.Empty
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public RenderFragment? ChildContent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Disabled or enabled.
|
||||
/// Default: false
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public bool Disabled { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Glyph (Icon) inside the button.
|
||||
/// Options: SVG string --> Icons
|
||||
/// Default: string.Empty
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public string Glyph { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Position of the glyph relative to button Text parameter. If Glyph parameter == string.Empty this parameter is ignored
|
||||
/// Options: Position.[left,top,right,bottom]
|
||||
/// Default: Position.left
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public Position GlyphPosition { get; set; } = Position.Left;
|
||||
|
||||
/// <summary>
|
||||
/// HEX string of the color for the glyph. If Glyph parameter is empty this parameter is ignored
|
||||
/// Options: any HEX color string
|
||||
/// Default: Black (#000000)
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public string GlyphColor { get; set; } = "#000000";
|
||||
|
||||
/// <summary>
|
||||
/// User defined custom class added on top of default generated classes
|
||||
/// Options: any user defined string with class names divided by space
|
||||
/// Default: string.Empty
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public string Class { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// User defined custom class added on top of default generated classes
|
||||
/// Options: any user defined string with class names divided by space
|
||||
/// Default: string.Empty
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public string ContentClass { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// User defined custom style
|
||||
/// Options: any user defined string with valid CSS style
|
||||
/// Default: string.Empty
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public string Style { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Button click event.
|
||||
/// Options: any MouseEventCallback event
|
||||
/// Default: empty
|
||||
[Parameter]
|
||||
public EventCallback<MouseEventArgs> OnClick { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Events
|
||||
protected async Task Click(MouseEventArgs e)
|
||||
{
|
||||
await OnClick.InvokeAsync(e);
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Styling
|
||||
|
||||
/// <summary>
|
||||
/// Generated class list for button based on user parameters
|
||||
/// </summary>
|
||||
private string ClassList
|
||||
{
|
||||
get
|
||||
{
|
||||
return new CssBuilder("btn")
|
||||
.AddClass("btn-" + Helper.GetEnumDescription<Size>(Size))
|
||||
.AddClass("btn-" + Helper.GetEnumDescription<Color>(Color),!Outlined)
|
||||
.AddClass("btn-outline-" + Helper.GetEnumDescription<Color>(Color), Outlined)
|
||||
.AddClass(Class)
|
||||
.Build();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Generated class list for button based on user parameters
|
||||
/// </summary>
|
||||
private string ContentClassList
|
||||
{
|
||||
get
|
||||
{
|
||||
return new CssBuilder("")
|
||||
.AddClass(ContentClass)
|
||||
.Build();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
4
src/Connected.Components/Components/Glyph.razor
Normal file
4
src/Connected.Components/Components/Glyph.razor
Normal file
@ -0,0 +1,4 @@
|
||||
<br/>
|
||||
<svg height="@Height" width="@Width" style="fill:@Color;" class="@GlyphClassList" @onclick="@OnClick">
|
||||
@((MarkupString)SVG)
|
||||
</svg>
|
44
src/Connected.Components/Components/Glyph.razor.cs
Normal file
44
src/Connected.Components/Components/Glyph.razor.cs
Normal file
@ -0,0 +1,44 @@
|
||||
using Connected.Utilities;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.AspNetCore.Components.Web;
|
||||
|
||||
namespace Connected.Components
|
||||
{
|
||||
public partial class Glyph
|
||||
{
|
||||
[Parameter]
|
||||
public string SVG { get; set; } = string.Empty;
|
||||
|
||||
[Parameter]
|
||||
public string Color { get; set; } = "#000000";
|
||||
|
||||
[Parameter]
|
||||
public int Width { get; set; } = 25;
|
||||
[Parameter]
|
||||
public int Height { get; set; } = 25;
|
||||
|
||||
[Parameter]
|
||||
public string Class { get; set; } = string.Empty;
|
||||
|
||||
private string GlyphClassList
|
||||
{
|
||||
get
|
||||
{
|
||||
return new CssBuilder()
|
||||
.AddClass(Class)
|
||||
.Build();
|
||||
}
|
||||
}
|
||||
|
||||
[Parameter]
|
||||
/// <summary>
|
||||
/// Button click event.
|
||||
/// </summary>
|
||||
public EventCallback<MouseEventArgs> Click { get; set; }
|
||||
protected async Task OnClick(MouseEventArgs e)
|
||||
{
|
||||
await Click.InvokeAsync(e);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
51
src/Connected.Components/Components/InputNumber.razor
Normal file
51
src/Connected.Components/Components/InputNumber.razor
Normal file
@ -0,0 +1,51 @@
|
||||
@using Connected.Models;
|
||||
|
||||
@inherits InputBase
|
||||
|
||||
@typeparam NumberType
|
||||
|
||||
<div class="@InputFieldClassList">
|
||||
<input type="number"
|
||||
placeholder="@Placeholder"
|
||||
step="@_step"
|
||||
disabled="@Disabled"
|
||||
readonly="@Readonly"
|
||||
@onmousewheel="@OnMouseWheel"
|
||||
@oninput=@ChangeValueAsync
|
||||
@bind-value="@_value"
|
||||
@attributes="@InputAttributes">
|
||||
</input>
|
||||
|
||||
<span class="highlight"></span>
|
||||
<span class="bar"></span>
|
||||
@if (IsLabel)
|
||||
{
|
||||
<label class="label-animated">@Label</label>
|
||||
}
|
||||
@if (IsHelperText && !IsError)
|
||||
{
|
||||
<div class="input-helper-text">@HelperText</div>
|
||||
}
|
||||
@if (IsError)
|
||||
{
|
||||
<div class="input-error-text">@ErrorText</div>
|
||||
}
|
||||
<span class="input-glyph-wraper">
|
||||
<span class="input-glyph">
|
||||
@if (Clearable && Value.ToString().Length > 0)
|
||||
{
|
||||
<span class="input-glyph button" @onclick="Clear">
|
||||
<Glyph SVG="@Icons.Material.Rounded.Dangerous" />
|
||||
<!--<i class='bx bx-x-circle'></i>-->
|
||||
</span>
|
||||
}
|
||||
@if (IsError)
|
||||
{
|
||||
<span class="input-glyph error">
|
||||
<Glyph SVG="@Icons.Material.Outlined.Error" Color="#D10000" />
|
||||
<!--<i class='bx bx-error-circle'></i>-->
|
||||
</span>
|
||||
}
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
136
src/Connected.Components/Components/InputNumber.razor.cs
Normal file
136
src/Connected.Components/Components/InputNumber.razor.cs
Normal file
@ -0,0 +1,136 @@
|
||||
using Connected.Models;
|
||||
using Connected.Utilities;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.AspNetCore.Components.Web;
|
||||
using System.Numerics;
|
||||
|
||||
namespace Connected.Components;
|
||||
public partial class InputNumber<NumberType>:InputBase where NumberType : INumber<NumberType>
|
||||
{
|
||||
private double _step =1;
|
||||
[Parameter]
|
||||
public double Step {
|
||||
get
|
||||
{
|
||||
return _step;
|
||||
}
|
||||
set
|
||||
{
|
||||
_step=value;
|
||||
}
|
||||
}
|
||||
|
||||
[Parameter]
|
||||
public bool DisableMouseWheel { get; set; } = false;
|
||||
|
||||
private async Task StepUp()
|
||||
{
|
||||
double num = (double)Convert.ChangeType(Value, typeof(double));
|
||||
num += _step;
|
||||
Value = AdjustDecimalPlaces((NumberType)Convert.ChangeType(num, typeof(NumberType)));
|
||||
await ValueChanged.InvokeAsync(Value);
|
||||
}
|
||||
|
||||
private async Task StepDown()
|
||||
{
|
||||
double num = (double)Convert.ChangeType(Value, typeof(double));
|
||||
num -= _step;
|
||||
Value = AdjustDecimalPlaces((NumberType)Convert.ChangeType(num, typeof(NumberType)));
|
||||
await ValueChanged.InvokeAsync(Value);
|
||||
}
|
||||
protected async Task OnMouseWheel(WheelEventArgs obj)
|
||||
{
|
||||
if (!DisableMouseWheel)
|
||||
{
|
||||
if (!obj.ShiftKey || Disabled || Readonly)
|
||||
return;
|
||||
if (obj.DeltaY < 0)
|
||||
{
|
||||
await StepDown();
|
||||
}
|
||||
else
|
||||
{
|
||||
await StepUp();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private NumberType _value;
|
||||
|
||||
[Parameter]
|
||||
public NumberType Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return _value;
|
||||
}
|
||||
set
|
||||
{
|
||||
_value = AdjustDecimalPlaces(value);
|
||||
}
|
||||
}
|
||||
|
||||
[Parameter]
|
||||
public int DecimalPlaces { get; set; } =0;
|
||||
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<NumberType> ValueChanged { get; set; }
|
||||
|
||||
public async Task ChangeValueAsync(ChangeEventArgs args)
|
||||
{
|
||||
if (args.Value is not null)
|
||||
{
|
||||
NumberType value = (NumberType)Convert.ChangeType(args.Value, typeof(NumberType));
|
||||
if (value.ToString().Length <= 0)
|
||||
{
|
||||
|
||||
value = (NumberType)Convert.ChangeType(0, typeof(NumberType));
|
||||
}
|
||||
await ValueChanged.InvokeAsync((NumberType)Convert.ChangeType(AdjustDecimalPlaces(value), typeof(NumberType)));
|
||||
}
|
||||
}
|
||||
|
||||
private NumberType AdjustDecimalPlaces(NumberType value)
|
||||
{
|
||||
NumberType result = value;
|
||||
if (Helper.NumberHasDecimalPlaces(value))
|
||||
{
|
||||
if (DecimalPlaces > 0)
|
||||
{
|
||||
decimal rounded = (decimal)Convert.ChangeType(value, typeof(decimal));
|
||||
rounded = Math.Round(rounded, DecimalPlaces);
|
||||
result = (NumberType)Convert.ChangeType(rounded, typeof(NumberType));
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private async Task Clear()
|
||||
{
|
||||
await ValueChanged.InvokeAsync((NumberType)Convert.ChangeType(0, typeof(NumberType)));
|
||||
}
|
||||
|
||||
#region Lifecycle
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
if (DecimalPlaces > 0)
|
||||
{
|
||||
Value = AdjustDecimalPlaces(Value);
|
||||
await ValueChanged.InvokeAsync(Value);
|
||||
}
|
||||
}
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
if (typeof(NumberType).Name.ToLower().Contains("int"))
|
||||
{
|
||||
if (Step - (int)Step > 0) Step = (int)Step;
|
||||
if (Step < 1) Step = 1;
|
||||
}
|
||||
await base.OnParametersSetAsync();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
60
src/Connected.Components/Components/InputText.razor
Normal file
60
src/Connected.Components/Components/InputText.razor
Normal file
@ -0,0 +1,60 @@
|
||||
@using Connected.Models;
|
||||
|
||||
@inherits InputBase;
|
||||
|
||||
<div class="@InputFieldClassList">
|
||||
@if (NumOfRows==1)
|
||||
{
|
||||
<input type="@inputType"
|
||||
value="@Value"
|
||||
placeholder="@Placeholder"
|
||||
disabled="@Disabled"
|
||||
readonly="@Readonly"
|
||||
@oninput=@ChangeValueAsync
|
||||
@attributes="@InputAttributes" />
|
||||
|
||||
} else
|
||||
{
|
||||
<textarea type="textarea"
|
||||
rows="@NumOfRows"
|
||||
value="@Value"
|
||||
placeholder="@Placeholder"
|
||||
disabled="@Disabled"
|
||||
readonly="@Readonly"
|
||||
@oninput=@ChangeValueAsync
|
||||
@attributes="@InputAttributes" />
|
||||
}
|
||||
|
||||
<span class="highlight"></span>
|
||||
<span class="bar"></span>
|
||||
@if (IsLabel)
|
||||
{
|
||||
<label class="label-animated">@Label</label>
|
||||
}
|
||||
@if (IsHelperText && !IsError)
|
||||
{
|
||||
<div class="input-helper-text">@HelperText</div>
|
||||
}
|
||||
@if (IsError)
|
||||
{
|
||||
<div class="input-error-text">@ErrorText</div>
|
||||
}
|
||||
<span class="input-glyph-wraper">
|
||||
<span class="input-glyph">
|
||||
@if (Clearable && Value.ToString().Length>0)
|
||||
{
|
||||
<span class="input-glyph button" @onclick="Clear">
|
||||
<Glyph SVG="@Icons.Material.Rounded.Dangerous" />
|
||||
<!--<i class='bx bx-x-circle'></i>-->
|
||||
</span>
|
||||
}
|
||||
@if (IsError)
|
||||
{
|
||||
<span class="input-glyph error">
|
||||
<Glyph SVG="@Icons.Material.Outlined.Error" Color="#D10000" />
|
||||
<!--<i class='bx bx-error-circle'></i>-->
|
||||
</span>
|
||||
}
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
72
src/Connected.Components/Components/InputText.razor.cs
Normal file
72
src/Connected.Components/Components/InputText.razor.cs
Normal file
@ -0,0 +1,72 @@
|
||||
using Connected.Models;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
|
||||
namespace Connected.Components;
|
||||
public partial class InputText: InputBase
|
||||
{
|
||||
|
||||
[Parameter]
|
||||
public bool IsPassword { get; set; } = false;
|
||||
|
||||
[Parameter]
|
||||
public int NumOfRows
|
||||
{
|
||||
get
|
||||
{
|
||||
return _numberOfLines;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value < 1)
|
||||
{
|
||||
_numberOfLines = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
_numberOfLines = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
private int _numberOfLines = 1;
|
||||
|
||||
|
||||
[Parameter]
|
||||
public string Value { get; set; }
|
||||
|
||||
private string inputType
|
||||
{
|
||||
get
|
||||
{
|
||||
if (IsPassword) return "password";
|
||||
return "text";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<string> ValueChanged { get; set; }
|
||||
|
||||
private async Task ChangeValueAsync(ChangeEventArgs args)
|
||||
{
|
||||
await ValueChanged.InvokeAsync(args.Value.ToString());
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
private async Task Clear()
|
||||
{
|
||||
await ValueChanged.InvokeAsync(string.Empty);
|
||||
StateHasChanged();
|
||||
|
||||
}
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
if (base.InputAttributes is null) base.InputAttributes = new();
|
||||
if (base.Required)
|
||||
{
|
||||
if (base.InputAttributes.ContainsKey("required")) base.InputAttributes.Add("required", true);
|
||||
}
|
||||
await base.OnInitializedAsync();
|
||||
}
|
||||
|
||||
}
|
7
src/Connected.Components/Components/Link.razor
Normal file
7
src/Connected.Components/Components/Link.razor
Normal file
@ -0,0 +1,7 @@
|
||||
<a
|
||||
class="@LinkClassList"
|
||||
style="@LinkStyleList"
|
||||
href="@Url"
|
||||
target="@Target" >
|
||||
@Text
|
||||
</a>
|
49
src/Connected.Components/Components/Link.razor.cs
Normal file
49
src/Connected.Components/Components/Link.razor.cs
Normal file
@ -0,0 +1,49 @@
|
||||
using Connected.Utilities;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
|
||||
namespace Connected.Components;
|
||||
public partial class Link
|
||||
{
|
||||
[Parameter, EditorRequired]
|
||||
public string Url { get; set; } = string.Empty;
|
||||
|
||||
[Parameter, EditorRequired]
|
||||
public string Text { get; set; } = string.Empty;
|
||||
|
||||
[Parameter, EditorRequired]
|
||||
public string Target { get; set; } = "_self";
|
||||
|
||||
[Parameter]
|
||||
public string Class { get; set; } = string.Empty;
|
||||
|
||||
private string LinkClassList
|
||||
{
|
||||
get
|
||||
{
|
||||
return new CssBuilder()
|
||||
.AddClass(Class)
|
||||
.Build();
|
||||
}
|
||||
}
|
||||
|
||||
[Parameter]
|
||||
public string Style { get; set; } = string.Empty;
|
||||
|
||||
private string LinkStyleList
|
||||
{
|
||||
get
|
||||
{
|
||||
return new StyleBuilder()
|
||||
.AddStyle(Style)
|
||||
.Build();
|
||||
}
|
||||
}
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
if (string.IsNullOrEmpty(Text)) Text = Url;
|
||||
await base.OnParametersSetAsync();
|
||||
}
|
||||
}
|
||||
|
||||
|
18
src/Connected.Components/Components/SimpleSelect.razor
Normal file
18
src/Connected.Components/Components/SimpleSelect.razor
Normal file
@ -0,0 +1,18 @@
|
||||
@using Connected.Models;
|
||||
|
||||
@typeparam ValueType
|
||||
|
||||
@inherits InputBase;
|
||||
|
||||
<div class="@InputFieldClassList">
|
||||
<select @bind="@Value" @oninput="@ChangeValueAsync">
|
||||
@if (EnableSearch)
|
||||
{
|
||||
<InputText @bind-Value="@SearchText" ValueChanged=""></InputText>
|
||||
}
|
||||
@foreach(SelectItem<ValueType> item in Items)
|
||||
{
|
||||
<option value="@item.Value">@item.DisplayedText</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
45
src/Connected.Components/Components/SimpleSelect.razor.cs
Normal file
45
src/Connected.Components/Components/SimpleSelect.razor.cs
Normal file
@ -0,0 +1,45 @@
|
||||
using Connected.Models;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using System;
|
||||
|
||||
namespace Connected.Components;
|
||||
public partial class SimpleSelect<ValueType> : InputBase
|
||||
{
|
||||
[Parameter]
|
||||
public ValueType Value { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public IEnumerable<SelectItem<ValueType>> Items { get; set; }
|
||||
|
||||
public IEnumerable<SelectItem<ValueType>> OriginalItems { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public bool EnableSearch { get; set; } = true;
|
||||
public string SearchText { get; set; }
|
||||
|
||||
public void FilterItems()
|
||||
{
|
||||
Items= Items.Where(item => item.Value.ToString().ToLower().Contains(SearchText.ToLower()) || item.DisplayedText.ToString().ToLower().Contains(SearchText.ToLower()));
|
||||
}
|
||||
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<ValueType> ValueChanged { get; set; }
|
||||
|
||||
private async Task ChangeValueAsync(ChangeEventArgs args)
|
||||
{
|
||||
await ValueChanged.InvokeAsync((ValueType)Convert.ChangeType(args.Value, typeof(ValueType)));
|
||||
}
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
if (base.InputAttributes is null) base.InputAttributes = new();
|
||||
if (base.Required)
|
||||
{
|
||||
if (base.InputAttributes.ContainsKey("required")) base.InputAttributes.Add("required", true);
|
||||
}
|
||||
OriginalItems = Items;
|
||||
await base.OnInitializedAsync();
|
||||
}
|
||||
|
||||
}
|
109
src/Connected.Components/Connected.Components.csproj
Normal file
109
src/Connected.Components/Connected.Components.csproj
Normal file
@ -0,0 +1,109 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Razor">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<RootNamespace>Connected</RootNamespace>
|
||||
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
|
||||
<Title>$(AssemblyName)</Title>
|
||||
<Authors>Tom PIT ltd</Authors>
|
||||
<Copyright>2022 Tom PIT ltd</Copyright>
|
||||
<PackageProjectUrl>https://git.tompit.com/Connected/Info</PackageProjectUrl>
|
||||
<PackageReadmeFile>README.md</PackageReadmeFile>
|
||||
<PackageTags>connected;platform;</PackageTags>
|
||||
<IncludeSymbols>True</IncludeSymbols>
|
||||
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
|
||||
<PackageLicenseFile>LICENSE</PackageLicenseFile>
|
||||
<PackageOutputPath>$(OutputPath)</PackageOutputPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="compilerconfig.json" />
|
||||
<None Include="ComponentsN\ToggleButton.razor" />
|
||||
<None Include="ComponentsN\Button.razor" />
|
||||
<None Include="ComponentsN\Glyph.razor" />
|
||||
<None Include="ComponentsN\Link.razor" />
|
||||
<None Include="ComponentsN\InputDate.razor" />
|
||||
<None Include="ComponentsN\InputNumber.razor" />
|
||||
<None Include="ComponentsN\InputText.razor" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<SupportedPlatform Include="browser" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="7.0.*-*" />
|
||||
<PackageReference Include="Nerdbank.GitVersioning" Version="3.5.119" PrivateAssets="all" Condition="!Exists('packages.config')" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Interfaces\" />
|
||||
<Folder Include="Services\" />
|
||||
<Folder Include="wwwroot\" />
|
||||
<None Include="..\..\LICENSE">
|
||||
<Pack>True</Pack>
|
||||
<PackagePath>\</PackagePath>
|
||||
</None>
|
||||
<None Include="..\..\README.md">
|
||||
<Pack>True</Pack>
|
||||
<PackagePath>\</PackagePath>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Update="version.json">
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="CopyPackages" AfterTargets="Pack">
|
||||
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
||||
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
||||
</Target>
|
||||
|
||||
<Target Name="ToolRestore">
|
||||
<Exec Command="dotnet tool restore" StandardOutputImportance="high" />
|
||||
</Target>
|
||||
|
||||
<Target Name="WebCompiler" DependsOnTargets="ToolRestore;">
|
||||
<!--compile and minify scss-->
|
||||
<Exec Command="dotnet webcompiler ./Styles/Connected.Components.scss -c excubowebcompiler.json" StandardOutputImportance="high" StandardErrorImportance="high" />
|
||||
</Target>
|
||||
|
||||
<Target Name="IncludeGeneratedStaticFiles" DependsOnTargets="WebCompiler" BeforeTargets="BeforeBuild">
|
||||
<Error Condition="!Exists('$(MSBuildProjectDirectory)/wwwroot/Connected.Components.min.css')" Text="Missing Connected.Components.min.css in wwwroot" />
|
||||
<ItemGroup>
|
||||
<!--Include without duplication-->
|
||||
<_NewCompiledCssFiles Include="wwwroot\Connected.Components.min.css" Exclude="@(Content)" />
|
||||
<Content Include="@(_NewCompiledCssFiles)" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="Delete sass/js compiler artifacts" AfterTargets="AfterBuild">
|
||||
<Delete Files="./Styles/Connected.Components.css" />
|
||||
<Delete Files="./Styles/Connected.Components.min.css" />
|
||||
</Target>
|
||||
|
||||
<!--Dont Include in build output-->
|
||||
<ItemGroup>
|
||||
<Content Remove="compilerconfig.json" />
|
||||
<Content Remove="excubowebcompiler.json" />
|
||||
<Content Remove="wwwroot/DoNotRemove.txt" />
|
||||
<!--macOS hidden file (causes problems with dotnet pack)-->
|
||||
<Content Remove="**/*/.DS_Store" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Watch Include="**/*.scss" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Watch Remove="Styles\Connected.Components.scss" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include=".config\dotnet-tools.json" />
|
||||
</ItemGroup>
|
||||
</Project>
|
36
src/Connected.Components/Enums/Color.cs
Normal file
36
src/Connected.Components/Enums/Color.cs
Normal file
@ -0,0 +1,36 @@
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Connected;
|
||||
|
||||
public enum Color
|
||||
{
|
||||
[Description("core")]
|
||||
Core,
|
||||
|
||||
[Description("primary")]
|
||||
Primary,
|
||||
|
||||
[Description("secondary")]
|
||||
Secondary,
|
||||
|
||||
[Description("success")]
|
||||
Success,
|
||||
|
||||
[Description("info")]
|
||||
Info,
|
||||
|
||||
[Description("warning")]
|
||||
Warning,
|
||||
|
||||
[Description("danger")]
|
||||
Danger,
|
||||
|
||||
[Description("white")]
|
||||
White,
|
||||
|
||||
[Description("light")]
|
||||
Light,
|
||||
|
||||
[Description("dark")]
|
||||
Dark
|
||||
}
|
48
src/Connected.Components/Enums/InputType.cs
Normal file
48
src/Connected.Components/Enums/InputType.cs
Normal file
@ -0,0 +1,48 @@
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Connected;
|
||||
|
||||
public enum InputType
|
||||
{
|
||||
[Description("text")]
|
||||
Text,
|
||||
|
||||
[Description("password")]
|
||||
Password,
|
||||
|
||||
[Description("email")]
|
||||
Email,
|
||||
|
||||
[Description("hidden")]
|
||||
Hidden,
|
||||
|
||||
[Description("number")]
|
||||
Number,
|
||||
|
||||
[Description("search")]
|
||||
Search,
|
||||
|
||||
[Description("tel")]
|
||||
Telephone,
|
||||
|
||||
[Description("url")]
|
||||
Url,
|
||||
|
||||
[Description("color")]
|
||||
Color,
|
||||
|
||||
[Description("date")]
|
||||
Date,
|
||||
|
||||
[Description("datetime-local")]
|
||||
DateTimeLocal,
|
||||
|
||||
[Description("month")]
|
||||
Month,
|
||||
|
||||
[Description("time")]
|
||||
Time,
|
||||
|
||||
[Description("week")]
|
||||
Week
|
||||
}
|
17
src/Connected.Components/Enums/Position.cs
Normal file
17
src/Connected.Components/Enums/Position.cs
Normal file
@ -0,0 +1,17 @@
|
||||
// Copyright (c) MudBlazor 2021
|
||||
// MudBlazor licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Connected;
|
||||
|
||||
public enum Position
|
||||
{
|
||||
Top,
|
||||
Bottom,
|
||||
Center,
|
||||
Left,
|
||||
Right,
|
||||
Start,
|
||||
End
|
||||
}
|
10
src/Connected.Components/Enums/Severity.cs
Normal file
10
src/Connected.Components/Enums/Severity.cs
Normal file
@ -0,0 +1,10 @@
|
||||
namespace Connected;
|
||||
|
||||
public enum Severity
|
||||
{
|
||||
Normal,
|
||||
Info,
|
||||
Success,
|
||||
Warning,
|
||||
Error
|
||||
}
|
18
src/Connected.Components/Enums/Size.cs
Normal file
18
src/Connected.Components/Enums/Size.cs
Normal file
@ -0,0 +1,18 @@
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Connected;
|
||||
|
||||
public enum Size
|
||||
{
|
||||
[Description("sm")]
|
||||
Small,
|
||||
|
||||
[Description("lg")]
|
||||
Large,
|
||||
|
||||
[Description("block")]
|
||||
FullWidth,
|
||||
|
||||
[Description("md")]
|
||||
Medium
|
||||
}
|
9
src/Connected.Components/Enums/Variant.cs
Normal file
9
src/Connected.Components/Enums/Variant.cs
Normal file
@ -0,0 +1,9 @@
|
||||
|
||||
|
||||
namespace Connected;
|
||||
|
||||
public enum Variant
|
||||
{
|
||||
Filled,
|
||||
Outlined
|
||||
}
|
2069
src/Connected.Components/Icons/Filled.cs
Normal file
2069
src/Connected.Components/Icons/Filled.cs
Normal file
File diff suppressed because it is too large
Load Diff
19
src/Connected.Components/Icons/Icons.cs
Normal file
19
src/Connected.Components/Icons/Icons.cs
Normal file
@ -0,0 +1,19 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace Connected
|
||||
{
|
||||
[ExcludeFromCodeCoverage]
|
||||
public partial class Icons
|
||||
{
|
||||
[ExcludeFromCodeCoverage]
|
||||
public partial class Custom
|
||||
{
|
||||
}
|
||||
|
||||
[ExcludeFromCodeCoverage]
|
||||
public partial class Material
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
2069
src/Connected.Components/Icons/Outlined.cs
Normal file
2069
src/Connected.Components/Icons/Outlined.cs
Normal file
File diff suppressed because it is too large
Load Diff
2069
src/Connected.Components/Icons/Rounded.cs
Normal file
2069
src/Connected.Components/Icons/Rounded.cs
Normal file
File diff suppressed because it is too large
Load Diff
2069
src/Connected.Components/Icons/Sharp.cs
Normal file
2069
src/Connected.Components/Icons/Sharp.cs
Normal file
File diff suppressed because it is too large
Load Diff
2069
src/Connected.Components/Icons/TwoTone.cs
Normal file
2069
src/Connected.Components/Icons/TwoTone.cs
Normal file
File diff suppressed because it is too large
Load Diff
109
src/Connected.Components/Models/InputBase.cs
Normal file
109
src/Connected.Components/Models/InputBase.cs
Normal file
@ -0,0 +1,109 @@
|
||||
using Connected.Utilities;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
|
||||
namespace Connected.Models;
|
||||
public class InputBase : ComponentBase
|
||||
{
|
||||
[Parameter]
|
||||
public string Class { get; set; } = string.Empty;
|
||||
|
||||
public string InputFieldClassList
|
||||
{
|
||||
get
|
||||
{
|
||||
return new CssBuilder("form-group")
|
||||
.AddClass("error", ErrorText.Length > 0)
|
||||
.AddClass(Class)
|
||||
.Build();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Show clear button.
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public bool Clearable { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// Required property
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public bool Required { get; set; } = false;
|
||||
|
||||
public Dictionary<string, object> InputAttributes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Show clear button.
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public bool Disabled { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Show clear button.
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public bool Readonly { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// The show input character counter
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public bool ShowCharacterCounter { get; set; }
|
||||
|
||||
private string _errorText = string.Empty;
|
||||
[Parameter]
|
||||
public string ErrorText {
|
||||
get
|
||||
{
|
||||
return _errorText;
|
||||
}
|
||||
set
|
||||
{
|
||||
_errorText = value;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsError
|
||||
{
|
||||
get
|
||||
{
|
||||
return !string.IsNullOrEmpty(ErrorText);
|
||||
}
|
||||
}
|
||||
|
||||
private string _helperText = string.Empty;
|
||||
[Parameter]
|
||||
public string HelperText
|
||||
{
|
||||
get
|
||||
{
|
||||
return _helperText;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
_helperText = value;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsHelperText
|
||||
{
|
||||
get
|
||||
{
|
||||
return !string.IsNullOrEmpty(HelperText);
|
||||
}
|
||||
}
|
||||
|
||||
[Parameter]
|
||||
public string Label { get; set; } = string.Empty;
|
||||
public bool IsLabel
|
||||
{
|
||||
get
|
||||
{
|
||||
return !string.IsNullOrEmpty(Label);
|
||||
}
|
||||
}
|
||||
|
||||
[Parameter]
|
||||
public string Placeholder { get; set; } = string.Empty;
|
||||
}
|
9
src/Connected.Components/Models/SelectItem.cs
Normal file
9
src/Connected.Components/Models/SelectItem.cs
Normal file
@ -0,0 +1,9 @@
|
||||
namespace Connected.Models
|
||||
{
|
||||
public class SelectItem<ValueType>
|
||||
{
|
||||
public string DisplayedText { get; set; }
|
||||
public ValueType Value { get; set; }
|
||||
public bool Enabled { get; set; }
|
||||
}
|
||||
}
|
119
src/Connected.Components/Navigation.cs
Normal file
119
src/Connected.Components/Navigation.cs
Normal file
@ -0,0 +1,119 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.JSInterop;
|
||||
|
||||
namespace Connected;
|
||||
internal class Navigation
|
||||
{
|
||||
private const int MaxPagesOnList = 256;
|
||||
private readonly NavigationManager _navigationManager;
|
||||
|
||||
[Inject]
|
||||
private IJSRuntime JS { get; set; }
|
||||
|
||||
private List<string> _backPages;
|
||||
private List<string> _forwardPages;
|
||||
|
||||
public Navigation(NavigationManager navigationManager)
|
||||
{
|
||||
_navigationManager = navigationManager;
|
||||
_backPages = new List<string>();
|
||||
_forwardPages = new List<string>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Navigates to the specified url.
|
||||
/// </summary>
|
||||
/// <param name="url">The destination url (relative or absolute).</param>
|
||||
public async Task NavigateTo(string url, Target target=Target._self)
|
||||
{
|
||||
if (!target.Equals("_self"))
|
||||
{
|
||||
if (!url.Equals(_navigationManager.Uri))
|
||||
_backPages.Add(_navigationManager.Uri);
|
||||
_navigationManager.NavigateTo(url);
|
||||
} else
|
||||
{
|
||||
if (JS is not null)
|
||||
await JS.InvokeVoidAsync("open", url, target.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if it is possible to navigate to the previous url.
|
||||
/// </summary>
|
||||
private bool CanNavigateBack()
|
||||
{
|
||||
return (_backPages.Count > 1);
|
||||
}
|
||||
|
||||
private bool CanNavigateForward()
|
||||
{
|
||||
return (_forwardPages.Count > 1);
|
||||
}
|
||||
|
||||
private void UpdateBackPageList()
|
||||
{
|
||||
string url = _navigationManager.Uri;
|
||||
_backPages.Add(url);
|
||||
if (_backPages.Count() > MaxPagesOnList)
|
||||
{
|
||||
_backPages.RemoveAt(0);
|
||||
}
|
||||
}
|
||||
|
||||
private string GetFromBackPageList()
|
||||
{
|
||||
string result = _backPages.Last();
|
||||
_backPages.RemoveAt(_backPages.Count()-1);
|
||||
return result;
|
||||
}
|
||||
|
||||
private string GetFromForwardPageList()
|
||||
{
|
||||
string result = _forwardPages.Last();
|
||||
_forwardPages.RemoveAt(_forwardPages.Count() - 1);
|
||||
return result;
|
||||
}
|
||||
|
||||
private void UpdateForwardPageList()
|
||||
{
|
||||
string url = _navigationManager.Uri;
|
||||
_forwardPages.Add(url);
|
||||
if (_forwardPages.Count() > MaxPagesOnList)
|
||||
{
|
||||
_forwardPages.RemoveAt(0);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Navigates to the previous url if possible or does nothing if it is not.
|
||||
/// </summary>
|
||||
public async Task Back()
|
||||
{
|
||||
if (!CanNavigateBack()) return;
|
||||
var backPageUrl = GetFromBackPageList();
|
||||
UpdateForwardPageList();
|
||||
|
||||
await NavigateTo(backPageUrl);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Navigates to the forward url if possible or does nothing if it is not.
|
||||
/// </summary>
|
||||
public async Task Forward()
|
||||
{
|
||||
if (!CanNavigateForward()) return;
|
||||
var forwardPageUrl = GetFromForwardPageList();
|
||||
UpdateBackPageList();
|
||||
|
||||
await NavigateTo(forwardPageUrl);
|
||||
}
|
||||
}
|
||||
|
||||
enum Target
|
||||
{
|
||||
_self,
|
||||
_blank,
|
||||
_parent,
|
||||
_top
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
@import 'globals/_index';
|
||||
@import 'layout/_index';
|
||||
@import 'components/_index';
|
||||
@import 'util/_index';
|
134
src/Connected.Components/Styles/components/_buttons.scss
Normal file
134
src/Connected.Components/Styles/components/_buttons.scss
Normal file
@ -0,0 +1,134 @@
|
||||
@use "../globals/" as *;
|
||||
@use "../util/" as *;
|
||||
|
||||
@mixin btn($bg-color: #e2e2e2) {
|
||||
display: inline-block;
|
||||
cursor: pointer;
|
||||
font-weight: $font-weight-400;
|
||||
white-space: nowrap;
|
||||
color: inherit;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
user-select: none;
|
||||
background-color: $bg-color;
|
||||
border: 1px solid transparent;
|
||||
padding: 0.375rem 1rem;
|
||||
font-size: $base-font-size;
|
||||
text-transform: uppercase;
|
||||
line-height: $base-font-size * 1.5;
|
||||
text-decoration: none;
|
||||
border-radius: $base-border-radius * 20;
|
||||
transition: $transition;
|
||||
}
|
||||
|
||||
.btn {
|
||||
@include btn;
|
||||
}
|
||||
|
||||
@each $key, $val in $theme-colors {
|
||||
.btn-#{$key} {
|
||||
// @include btn();
|
||||
background-color: $val;
|
||||
color: set-color($val);
|
||||
border: 1px solid transparent;
|
||||
&:hover {
|
||||
background-color: darken($val, 10);
|
||||
}
|
||||
&:focus-visible,
|
||||
&.focus {
|
||||
outline: 0;
|
||||
box-shadow: 0 0 0 0.15rem lighten($val, 20);
|
||||
}
|
||||
&:active,
|
||||
&.active {
|
||||
background-color: darken($val, 15);
|
||||
}
|
||||
}
|
||||
.btn-outline-#{$key} {
|
||||
// @include btn();
|
||||
color: $val;
|
||||
background-color: transparent;
|
||||
border: 1px solid $val;
|
||||
&:hover {
|
||||
color: darken($val, 10);
|
||||
border: 1px solid darken($val, 10);
|
||||
}
|
||||
&:focus-visible,
|
||||
&.focus {
|
||||
outline: 0;
|
||||
box-shadow: 0 0 0 0.15rem lighten($val, 20);
|
||||
}
|
||||
&:active,
|
||||
&.active {
|
||||
background-color: darken($val, 15);
|
||||
color: set-color($val);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn.btn-sm {
|
||||
font-size: $font-size-sm;
|
||||
line-height: $font-size-sm * 1.5;
|
||||
padding: 0.25rem 0.75rem;
|
||||
border-radius: $base-border-radius;
|
||||
}
|
||||
|
||||
.btn.btn-lg {
|
||||
font-size: $font-size-md;
|
||||
line-height: $font-size-md * 1.5;
|
||||
padding: 0.5rem 1.25rem;
|
||||
border-radius: $base-border-radius * 2.5;
|
||||
}
|
||||
|
||||
.btn.btn-block {
|
||||
font-size: $font-size-md;
|
||||
line-height: $font-size-md * 1.5;
|
||||
padding: 0.5rem 1.25rem;
|
||||
border-radius: $base-border-radius * 2.5;
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.btn.disabled,
|
||||
.btn:disabled {
|
||||
opacity: 0.4;
|
||||
//pointer-events: none;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.btn-core {
|
||||
background-color: var(--bg-core-primary) !important;
|
||||
color: set-color (var(--bg-core-primary)) !important;
|
||||
&:hover {
|
||||
background-color: var(--bg-core-primary-darken) !important;
|
||||
}
|
||||
&:focus-visible,
|
||||
&.focus {
|
||||
outline: 0;
|
||||
box-shadow: 0 0 0 0.15rem var(--bg-core-primary-lighten);
|
||||
}
|
||||
&:active,
|
||||
&.active {
|
||||
background-color: var(--bg-core-primary-darken) !important;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-outline-core {
|
||||
color: var(--bg-core-primary) !important;
|
||||
background-color: transparent !important;
|
||||
border: 1px solid var(--bg-core-primary) !important;
|
||||
&:hover {
|
||||
color: var(--bg-core-primary-darken) !important;
|
||||
border: 1px solid var(--bg-core-primary-darken) !important;
|
||||
}
|
||||
&:focus-visible,
|
||||
&.focus {
|
||||
outline: 0;
|
||||
box-shadow: 0 0 0 0.15rem var(--bg-core-primary-lighten);
|
||||
}
|
||||
&:active,
|
||||
&.active {
|
||||
background-color: var(--bg-core-primary-darken) !important;
|
||||
color: set-color (var(--bg-core-primary-darken)) !important;
|
||||
}
|
||||
}
|
102
src/Connected.Components/Styles/components/_checkbox.scss
Normal file
102
src/Connected.Components/Styles/components/_checkbox.scss
Normal file
@ -0,0 +1,102 @@
|
||||
$color3: #f4f4f4;
|
||||
$color4: var(--bg-core-primary-darken);
|
||||
|
||||
.checkbox-group {
|
||||
margin: 0.5rem;
|
||||
position:relative;
|
||||
input[type="checkbox"] {
|
||||
position: absolute;
|
||||
opacity: 0;
|
||||
+ .checkbox-label {
|
||||
&:before {
|
||||
content: "";
|
||||
background: transparent;
|
||||
border-radius: 0%;
|
||||
border: 2px solid $color4;
|
||||
display: inline-block;
|
||||
width: 1.25em;
|
||||
height: 1.25em;
|
||||
position: relative;
|
||||
top: .15rem;
|
||||
margin-right: .75em;
|
||||
vertical-align: top;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
z-index: 1;
|
||||
transition: all 250ms ease;
|
||||
}
|
||||
}
|
||||
&:checked {
|
||||
+ .checkbox-label {
|
||||
&:before {
|
||||
background-color: $color4;
|
||||
box-shadow: inset 0 0 0 2px $color3;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
// &:checked {
|
||||
// + .checkbox-label {
|
||||
// &:after {
|
||||
// background: $color3;
|
||||
// z-index: 1;
|
||||
// opacity: 1;
|
||||
// scale: 0.25;
|
||||
// clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
|
||||
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
&:focus {
|
||||
+ .checkbox-label {
|
||||
&:before {
|
||||
outline: none;
|
||||
border-color: $color4;
|
||||
}
|
||||
}
|
||||
}
|
||||
&:disabled {
|
||||
+ .checkbox-label {
|
||||
color: darken($color3, 25%);
|
||||
pointer-events: none;
|
||||
&:before {
|
||||
box-shadow: inset 0 0 0 2px $color3;
|
||||
border-color: darken($color3, 25%);
|
||||
background: darken($color3, 25%);
|
||||
}
|
||||
}
|
||||
}
|
||||
+ .checkbox-label {
|
||||
&:empty {
|
||||
&:before {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.checkbox-label:after {
|
||||
content: "";
|
||||
display: inline-block;
|
||||
width: 35px;
|
||||
height: 35px;
|
||||
border-radius: 50%;
|
||||
background-color: transparent;
|
||||
position: absolute;
|
||||
left: -8px;
|
||||
top: -6px;
|
||||
scale: .75;
|
||||
transition: scale 0.35s cubic-bezier(0.6,-1.25,0.6,2.25);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.checkbox-label:hover:after {
|
||||
background: var(--bg-core-primary-lighten);
|
||||
scale: 1;
|
||||
opacity: .5;
|
||||
}
|
104
src/Connected.Components/Styles/components/_grid.scss
Normal file
104
src/Connected.Components/Styles/components/_grid.scss
Normal file
@ -0,0 +1,104 @@
|
||||
@use "../util" as *;
|
||||
@use "../globals" as *;
|
||||
|
||||
@mixin grid {
|
||||
display: grid;
|
||||
}
|
||||
|
||||
.grid {
|
||||
@include grid();
|
||||
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
||||
}
|
||||
|
||||
// .grid.grid-col-1{
|
||||
// $cols: 1;
|
||||
// @include grid();
|
||||
// grid-template-columns: repeat(auto-fit, minmax(max(250px, 100% / ($cols + 1) + 1px), 1fr));
|
||||
// }
|
||||
|
||||
// .grid.grid-col-2{
|
||||
// $cols: 2;
|
||||
// @include grid();
|
||||
// grid-template-columns: repeat(auto-fit, minmax(max(250px, 100% / ($cols + 1) + 1px), 1fr));
|
||||
// }
|
||||
|
||||
// .grid.grid-col-3{
|
||||
// $cols: 3;
|
||||
// @include grid();
|
||||
// grid-template-columns: repeat(auto-fit, minmax(max(250px, 100% / ($cols + 1) + 1px), 1fr));
|
||||
// }
|
||||
|
||||
// .grid.grid-col-4{
|
||||
// $cols: 4;
|
||||
// @include grid();
|
||||
// grid-template-columns: repeat(auto-fit, minmax(max(250px, 100% / ($cols + 1) + 1px), 1fr));
|
||||
// }
|
||||
|
||||
// .grid.grid-col-5{
|
||||
// $cols: 5;
|
||||
// @include grid();
|
||||
// grid-template-columns: repeat(auto-fit, minmax(max(250px, 100% / ($cols + 1) + 1px), 1fr));
|
||||
// }
|
||||
|
||||
// .grid.grid-col-6{
|
||||
// $cols: 6;
|
||||
// @include grid();
|
||||
// grid-template-columns: repeat(auto-fit, minmax(max(250px, 100% / ($cols + 1) + 1px), 1fr));
|
||||
// }
|
||||
|
||||
// .grid.grid-col-7{
|
||||
// $cols: 7;
|
||||
// @include grid();
|
||||
// grid-template-columns: repeat(auto-fit, minmax(max(250px, 100% / ($cols + 1) + 1px), 1fr));
|
||||
// }
|
||||
|
||||
// .grid.grid-col-8{
|
||||
// $cols: 8;
|
||||
// @include grid();
|
||||
// grid-template-columns: repeat(auto-fit, minmax(max(250px, 100% / ($cols + 1) + 1px), 1fr));
|
||||
// }
|
||||
|
||||
// .grid.grid-col-9{
|
||||
// $cols: 9;
|
||||
// @include grid();
|
||||
// grid-template-columns: repeat(auto-fit, minmax(max(250px, 100% / ($cols + 1) + 1px), 1fr));
|
||||
// }
|
||||
|
||||
// .grid.grid-col-10{
|
||||
// $cols: 10;
|
||||
// @include grid();
|
||||
// grid-template-columns: repeat(auto-fit, minmax(max(250px, 100% / ($cols + 1) + 1px), 1fr));
|
||||
// }
|
||||
|
||||
// .grid.grid-col-11{
|
||||
// $cols: 11;
|
||||
// @include grid();
|
||||
// grid-template-columns: repeat(auto-fit, minmax(max(250px, 100% / ($cols + 1) + 1px), 1fr));
|
||||
// }
|
||||
|
||||
// .grid.grid-col-12{
|
||||
// $cols: 12;
|
||||
// @include grid();
|
||||
// grid-template-columns: repeat(auto-fit, minmax(max(250px, 100% / ($cols + 1) + 1px), 1fr));
|
||||
// }
|
||||
|
||||
$gridcol: ("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12");
|
||||
|
||||
@each $colCount in $gridcol {
|
||||
.grid-col-#{$colCount} {
|
||||
grid-template-columns: repeat(
|
||||
auto-fit,
|
||||
minmax(max(250px, 100% / (#{$colCount} + 1) + 1px), 1fr)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$colspan: ("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12");
|
||||
|
||||
@include breakpoint(xl) {
|
||||
@each $spanCount in $colspan {
|
||||
.col-span-#{$spanCount} {
|
||||
grid-column: auto / span #{$spanCount};
|
||||
}
|
||||
}
|
||||
}
|
6
src/Connected.Components/Styles/components/_index.scss
Normal file
6
src/Connected.Components/Styles/components/_index.scss
Normal file
@ -0,0 +1,6 @@
|
||||
@forward "buttons";
|
||||
@forward "grid";
|
||||
@forward "sidebar";
|
||||
@forward "radio";
|
||||
@forward "inputs";
|
||||
@forward "checkbox";
|
264
src/Connected.Components/Styles/components/_inputs.scss
Normal file
264
src/Connected.Components/Styles/components/_inputs.scss
Normal file
@ -0,0 +1,264 @@
|
||||
@use "../util" as *;
|
||||
@use "../globals" as *;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$trans-time: 300ms;
|
||||
$width: 100%;
|
||||
|
||||
form{
|
||||
display: block;
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
.form-group{
|
||||
position: relative;
|
||||
margin-top: 1rem;
|
||||
margin-bottom: 1.5rem;
|
||||
flex: 1 0 300px;//TEMP
|
||||
}
|
||||
|
||||
textarea {
|
||||
resize: none;
|
||||
}
|
||||
|
||||
input:not([type="radio"], [type="radio"]),
|
||||
textarea,
|
||||
select {
|
||||
background: none;
|
||||
color: var(--text-core);
|
||||
font-weight: $font-weight-600;
|
||||
font-size: $base-font-size;
|
||||
padding: 10px 24px 10px 5px;
|
||||
display: block;
|
||||
width: 100%;
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
border-bottom: 1px solid $border-core;
|
||||
&:focus {
|
||||
outline: none;
|
||||
}
|
||||
&:focus ~ label.label-animated,
|
||||
&:valid ~ label.label-animated {
|
||||
top: -12px;
|
||||
font-size: $font-size-sm;
|
||||
color: var(--bg-core-primary-darken);
|
||||
}
|
||||
&:focus ~ .bar:before {
|
||||
width: $width;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
input[type="password"] {
|
||||
letter-spacing: 0.15rem;
|
||||
}
|
||||
|
||||
label.label-animated {
|
||||
color: $text-core-lc;
|
||||
font-size: $base-font-size;
|
||||
font-weight: $font-weight-400;
|
||||
position: absolute;
|
||||
pointer-events: none;
|
||||
left: 5px;
|
||||
top: 10px;
|
||||
transition: $trans-time ease all;
|
||||
}
|
||||
|
||||
.bar {
|
||||
position: relative;
|
||||
display: block;
|
||||
width: $width;
|
||||
&:before {
|
||||
content: '';
|
||||
height: 2px;
|
||||
width: 0;
|
||||
bottom: 0px;
|
||||
position: absolute;
|
||||
background: var(--bg-core-primary-darken);
|
||||
transition: $trans-time ease all;
|
||||
left: 0%;
|
||||
}
|
||||
}
|
||||
|
||||
.input-helper-text{
|
||||
position: absolute;
|
||||
bottom: -40px;
|
||||
line-height: 30px;
|
||||
font-size: 12px;
|
||||
color: $text-core-lc;
|
||||
padding: 5px 10px 10px 5px;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/*ERROR*/
|
||||
.error input:focus ~ label.label-animated,
|
||||
.error input:valid ~ label.label-animated,
|
||||
.error textarea:focus ~ label.label-animated,
|
||||
.error textarea:valid ~ label.label-animated,
|
||||
.error select:focus ~ label.label-animated,
|
||||
.error select:valid ~ label.label-animated{
|
||||
color: $danger;
|
||||
}
|
||||
|
||||
.error .bar:before {
|
||||
content: '';
|
||||
background:$danger;
|
||||
}
|
||||
|
||||
.input-error-text{
|
||||
display: none;
|
||||
}
|
||||
.error .input-error-text{
|
||||
position: absolute;
|
||||
bottom: -40px;
|
||||
line-height: 30px;
|
||||
display: inline-block;
|
||||
font-size: 12px;
|
||||
color: $danger;
|
||||
padding: 5px 10px 10px 5px;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.error .input-helper-text{
|
||||
display: none;
|
||||
}
|
||||
|
||||
.error input{
|
||||
padding-right:3rem;
|
||||
}
|
||||
|
||||
.error .input-glyph.error {
|
||||
display: flex;
|
||||
color: $danger;
|
||||
}
|
||||
|
||||
.input-glyph.error {
|
||||
display:none;
|
||||
}
|
||||
|
||||
/*GLYPH*/
|
||||
.input-glyph-wraper {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
height: auto;
|
||||
right: 0;
|
||||
top: .8rem;
|
||||
}
|
||||
|
||||
.input-glyph {
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-left: $base-margin;
|
||||
}
|
||||
|
||||
.input-glyph i {
|
||||
font-size: 1.25rem;
|
||||
z-index: 1;
|
||||
}
|
||||
/*GLYPH BUTTON*/
|
||||
.input-glyph.button {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.input-glyph.button:before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border-radius: 50%;
|
||||
background-color: transparent;
|
||||
cursor: pointer;
|
||||
scale: .75;
|
||||
transition: scale 0.35s cubic-bezier(0.6,-1.25,0.6,2.25);
|
||||
}
|
||||
|
||||
.input-glyph.button:hover:before {
|
||||
background: var(--bg-core-primary-lighten);
|
||||
scale: 1;
|
||||
opacity: .5;
|
||||
}
|
||||
|
||||
/*GLYPH RESET*/
|
||||
.input-glyph.button.reset {
|
||||
display:none
|
||||
}
|
||||
|
||||
/*SELECT*/
|
||||
|
||||
|
||||
select {
|
||||
appearance: none;
|
||||
|
||||
&:focus-within ~ .drop-down {
|
||||
height: auto;
|
||||
max-height: max-content;
|
||||
opacity: 1;
|
||||
transition: all $trans-time ease-in-out;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.drop-down{
|
||||
position: absolute;
|
||||
opacity: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
top: 46px;
|
||||
left: 0;
|
||||
min-width: 100%;
|
||||
height: 0;
|
||||
max-height: 0;
|
||||
//padding: $base-padding;
|
||||
z-index: 1500;
|
||||
list-style: none;
|
||||
background-color: #fff;
|
||||
box-shadow: $base-box-shadow;
|
||||
border-radius: 0 0 $border-radius-lg $border-radius-lg;
|
||||
}
|
||||
|
||||
|
||||
.dropdown-header {
|
||||
display: block;
|
||||
padding: 0.5rem 1.5rem;
|
||||
margin-bottom: 0;
|
||||
font-size: $font-size-sm;
|
||||
color: var(--text-core-lc);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.dropdown-item {
|
||||
display: block;
|
||||
width: 100%;
|
||||
padding: 0.5rem 1.5rem;
|
||||
clear: both;
|
||||
color: inherit;
|
||||
text-align: inherit;
|
||||
white-space: nowrap;
|
||||
background-color: transparent;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.dropdown-item:focus, .dropdown-item:hover {
|
||||
color: var(--text-core-hc);
|
||||
text-decoration: none;
|
||||
background-color: var(--bg-core-primary-lighten);
|
||||
}
|
||||
|
||||
.dropdown-divider {
|
||||
height: 0;
|
||||
margin: 0.5rem 0;
|
||||
overflow: hidden;
|
||||
border-top: 1px solid $border-core;
|
||||
}
|
86
src/Connected.Components/Styles/components/_radio.scss
Normal file
86
src/Connected.Components/Styles/components/_radio.scss
Normal file
@ -0,0 +1,86 @@
|
||||
$color1: #f4f4f4;
|
||||
$color2: var(--bg-core-primary-darken);
|
||||
|
||||
.radio-group {
|
||||
margin: 0.5rem;
|
||||
position:relative;
|
||||
input[type="radio"] {
|
||||
position: absolute;
|
||||
opacity: 0;
|
||||
+ .radio-label {
|
||||
&:before {
|
||||
content: "";
|
||||
background: $color1;
|
||||
border-radius: 100%;
|
||||
border: 2px solid $color2;
|
||||
display: inline-block;
|
||||
width: 1.25em;
|
||||
height: 1.25em;
|
||||
position: relative;
|
||||
top: .15rem;
|
||||
margin-right: .75em;
|
||||
vertical-align: top;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
z-index: 1;
|
||||
transition: all 250ms ease;
|
||||
}
|
||||
}
|
||||
&:checked {
|
||||
+ .radio-label {
|
||||
&:before {
|
||||
background-color: $color2;
|
||||
box-shadow: inset 0 0 0 2px $color1;
|
||||
}
|
||||
}
|
||||
}
|
||||
&:focus {
|
||||
+ .radio-label {
|
||||
&:before {
|
||||
outline: none;
|
||||
border-color: $color2;
|
||||
}
|
||||
}
|
||||
}
|
||||
&:disabled {
|
||||
+ .radio-label {
|
||||
color: darken($color1, 25%);
|
||||
pointer-events: none;
|
||||
&:before {
|
||||
box-shadow: inset 0 0 0 2px $color1;
|
||||
border-color: darken($color1, 25%);
|
||||
background: darken($color1, 25%);
|
||||
}
|
||||
}
|
||||
}
|
||||
+ .radio-label {
|
||||
&:empty {
|
||||
&:before {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.radio-label:after {
|
||||
content: "";
|
||||
display: inline-block;
|
||||
width: 35px;
|
||||
height: 35px;
|
||||
border-radius: 50%;
|
||||
background-color: transparent;
|
||||
position: absolute;
|
||||
left: -8px;
|
||||
top: -6px;
|
||||
scale: .75;
|
||||
transition: scale 0.35s cubic-bezier(0.6,-1.25,0.6,2.25);
|
||||
}
|
||||
|
||||
.radio-label:hover:after {
|
||||
background: var(--bg-core-primary-lighten);
|
||||
scale: 1;
|
||||
opacity: .5;
|
||||
}
|
230
src/Connected.Components/Styles/components/_sidebar.scss
Normal file
230
src/Connected.Components/Styles/components/_sidebar.scss
Normal file
@ -0,0 +1,230 @@
|
||||
@use '../globals/' as *;
|
||||
@use '../util/' as *;
|
||||
|
||||
|
||||
.sidebar{
|
||||
position: fixed;
|
||||
height: 100vh;
|
||||
width: 100%;
|
||||
color: $text-core;
|
||||
background: var(--bg-core-primary);
|
||||
//margin: -2rem 2rem -2rem -2rem;
|
||||
z-index: 100;
|
||||
transition: all 0.3s ease;
|
||||
|
||||
@include breakpoint(sm) {
|
||||
height: calc(100% + 4rem);
|
||||
position: relative;
|
||||
width: 300px;
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar.close{
|
||||
width: 0;
|
||||
transform: translateX(-75px);
|
||||
@include breakpoint(sm) {
|
||||
width: 75px;
|
||||
transform: translateX(0);
|
||||
}
|
||||
}
|
||||
|
||||
.main {
|
||||
width: calc(100% - 1.5rem) ;
|
||||
margin-inline:auto;
|
||||
@include breakpoint (sm) {
|
||||
width: calc(100% - 300px);;
|
||||
padding: 2rem;
|
||||
}
|
||||
}
|
||||
|
||||
.main.close{
|
||||
@include breakpoint (sm) {
|
||||
width: calc(100% - 75px);
|
||||
}
|
||||
}
|
||||
|
||||
//profile
|
||||
.sidebar .profile-details{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
color: #fff;
|
||||
background-color: rgba(0,0,0,.6);
|
||||
}
|
||||
|
||||
.sidebar .profile-details .avatar{
|
||||
min-width: calc(70px - 1rem);
|
||||
text-align: center;
|
||||
margin: 1rem 0 1rem 1rem;
|
||||
|
||||
}
|
||||
|
||||
.sidebar .profile-details img{
|
||||
height: 40px;
|
||||
width: 40px;
|
||||
object-fit: cover;
|
||||
border-radius: 50%;
|
||||
//transition: all 0.5s ease;
|
||||
}
|
||||
|
||||
.sidebar .profile-details .name-job{
|
||||
margin-right: auto;
|
||||
|
||||
}
|
||||
|
||||
.sidebar .profile-details .profile-name{
|
||||
font-weight: 600;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.sidebar .profile-details .profile-job{
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.sidebar .profile-details i{
|
||||
height: 50px;
|
||||
min-width: 70px;
|
||||
text-align: center;
|
||||
line-height: 50px;
|
||||
font-size: 20px;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
.sidebar.close .profile-details i,
|
||||
.sidebar.close .profile-details .profile-name,
|
||||
.sidebar.close .profile-details .profile-job{
|
||||
display: none;
|
||||
}
|
||||
|
||||
//links
|
||||
.sidebar .nav-links{
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
overflow: auto;
|
||||
}
|
||||
.sidebar.close .nav-links{
|
||||
overflow: visible;
|
||||
}
|
||||
.sidebar .nav-links::-webkit-scrollbar{
|
||||
display: none;
|
||||
}
|
||||
.sidebar .nav-links li{
|
||||
position: relative;
|
||||
list-style: none;
|
||||
transition: all 0.4s ease;
|
||||
}
|
||||
.sidebar .nav-links li:hover{
|
||||
background: var(--bg-core-primary-lighten);
|
||||
}
|
||||
.sidebar .nav-links li .iocn-link{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.sidebar.close .nav-links li .iocn-link{
|
||||
display: block
|
||||
}
|
||||
.sidebar .nav-links li i{
|
||||
height: 50px;
|
||||
min-width: 70px;
|
||||
text-align: center;
|
||||
line-height: 50px;
|
||||
color: var(--text-core-vc);
|
||||
font-size: 20px;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
.sidebar .nav-links li.showMenu i.arrow{
|
||||
transform: rotate(-180deg);
|
||||
}
|
||||
.sidebar.close .nav-links i.arrow{
|
||||
display: none;
|
||||
}
|
||||
.sidebar .nav-links li a{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
text-decoration: none;
|
||||
}
|
||||
.sidebar .nav-links li a .link_name{
|
||||
flex: 1 0 auto;
|
||||
font-weight: 400;
|
||||
color: var(--text-core);
|
||||
//transition: all 0.4s ease;
|
||||
}
|
||||
.sidebar.close .nav-links li a .link_name{
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.sidebar .nav-links li .sub-menu{
|
||||
padding: 6px 6px 14px 70px;
|
||||
margin-top: -10px;
|
||||
background:var(--bg-core-primary-lighten);
|
||||
display: none;
|
||||
}
|
||||
.sidebar .nav-links li.showMenu .sub-menu{
|
||||
display: block;
|
||||
}
|
||||
.sidebar .nav-links li .sub-menu a{
|
||||
color: var(--text-core);
|
||||
font-size: 15px;
|
||||
padding: 5px 0;
|
||||
white-space: nowrap;
|
||||
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
.sidebar .nav-links li .sub-menu a:hover{
|
||||
color: var(--bg-core-primary-darken);
|
||||
}
|
||||
.sidebar.close .nav-links li .sub-menu{
|
||||
position: absolute;
|
||||
left: 100%;
|
||||
top: -10px;
|
||||
margin-top: 0;
|
||||
padding: 10px 20px;
|
||||
border-radius: 0 6px 6px 0;
|
||||
opacity: 0;
|
||||
display: block;
|
||||
pointer-events: none;
|
||||
transition: 0s;
|
||||
}
|
||||
.sidebar.close .nav-links li:hover .sub-menu{
|
||||
top: 0;
|
||||
opacity: 1;
|
||||
pointer-events: auto;
|
||||
transition: all 0.4s ease;
|
||||
}
|
||||
.sidebar .nav-links li .sub-menu .link_name{
|
||||
display: none;
|
||||
}
|
||||
.sidebar.close .nav-links li .sub-menu .link_name{
|
||||
font-weight: 600;
|
||||
opacity: 1;
|
||||
display: block;
|
||||
}
|
||||
.sidebar .nav-links li .sub-menu.blank{
|
||||
opacity: 1;
|
||||
pointer-events: auto;
|
||||
padding: 3px 20px 6px 16px;
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
.sidebar .nav-links li:hover .sub-menu.blank{
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
42
src/Connected.Components/Styles/globals/_core.scss
Normal file
42
src/Connected.Components/Styles/globals/_core.scss
Normal file
@ -0,0 +1,42 @@
|
||||
@use 'variables' as *;
|
||||
@use 'typography' as *;
|
||||
@use '../util/breakpoints' as *;
|
||||
|
||||
|
||||
|
||||
body{
|
||||
background: linear-gradient(to left, var(--bg-core-primary-lighten), var(--bg-core-end));
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
font-size: $base-font-size;
|
||||
//font-size: clamp($base-font-size * 0.9, $base-font-size * 0.9+0.1vw, $base-font-size);
|
||||
color: var(--text-core);
|
||||
|
||||
@include breakpoint(sm){
|
||||
background: linear-gradient(to left, var(--bg-core-primary), var(--bg-core-end));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//hr classes
|
||||
hr {
|
||||
border-top: 1px solid var(--border-core);
|
||||
border-bottom: 0;
|
||||
border-color:var(--border-core);
|
||||
background-color:var(--border-core);
|
||||
color: var(--border-core);
|
||||
}
|
||||
|
||||
//section
|
||||
section,
|
||||
.section{
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
|
||||
.disabled {
|
||||
opacity: .4;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
|
||||
|
4
src/Connected.Components/Styles/globals/_index.scss
Normal file
4
src/Connected.Components/Styles/globals/_index.scss
Normal file
@ -0,0 +1,4 @@
|
||||
@forward 'reset';
|
||||
@forward 'variables';
|
||||
@forward 'core';
|
||||
@forward 'typography';
|
97
src/Connected.Components/Styles/globals/_reset.scss
Normal file
97
src/Connected.Components/Styles/globals/_reset.scss
Normal file
@ -0,0 +1,97 @@
|
||||
/* Box sizing rules */
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* Semantic Elements*/
|
||||
article, aside, figcaption, figure, footer, header, hgroup, main, nav, section {
|
||||
display: block; }
|
||||
|
||||
/* Remove default margin */
|
||||
body,
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6,
|
||||
p,
|
||||
figure,
|
||||
blockquote,
|
||||
dl,
|
||||
dd {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
|
||||
ul[role='list'],
|
||||
ol[role='list'] {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
/* Set core root defaults */
|
||||
html:focus-within {
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
|
||||
/* Set core body defaults */
|
||||
body {
|
||||
//min-height: 100vh;
|
||||
text-rendering: optimizeSpeed;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
/* A elements that don't have a class get default styles */
|
||||
a:not([class]) {
|
||||
text-decoration-skip-ink: auto;
|
||||
}
|
||||
|
||||
a, a:hover {
|
||||
text-decoration: none;
|
||||
transition: color 0.15s ease-in-out;
|
||||
}
|
||||
|
||||
/* Make images easier to work with */
|
||||
img,
|
||||
picture {
|
||||
max-width: 100%;
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* Inherit fonts for inputs and buttons */
|
||||
input,
|
||||
button,
|
||||
textarea,
|
||||
select {
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
html:focus-within {
|
||||
scroll-behavior: auto;
|
||||
}
|
||||
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
animation-duration: 0.01ms !important;
|
||||
animation-iteration-count: 1 !important;
|
||||
transition-duration: 0.01ms !important;
|
||||
scroll-behavior: auto !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Screen readers only */
|
||||
.visually-hidden {
|
||||
clip: rect(0 0 0 0);
|
||||
clip-path: inset(50%);
|
||||
height: 1px;
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
white-space: nowrap;
|
||||
width: 1px;
|
||||
}
|
218
src/Connected.Components/Styles/globals/_typography.scss
Normal file
218
src/Connected.Components/Styles/globals/_typography.scss
Normal file
@ -0,0 +1,218 @@
|
||||
@use "variables" as *;
|
||||
@use "../util/breakpoints" as *;
|
||||
|
||||
/* h1-h6 */
|
||||
|
||||
h1,
|
||||
.h1 {
|
||||
font-size: $h1-size;
|
||||
font-weight: $font-weight-300;
|
||||
}
|
||||
|
||||
h2,
|
||||
.h2 {
|
||||
font-size: $h2-size;
|
||||
font-weight: $font-weight-300;
|
||||
}
|
||||
|
||||
h3,
|
||||
.h3 {
|
||||
font-size: $h3-size;
|
||||
font-weight: $font-weight-300;
|
||||
}
|
||||
|
||||
h4,
|
||||
.h4 {
|
||||
font-size: $h4-size;
|
||||
font-weight: $font-weight-300;
|
||||
}
|
||||
|
||||
h5,
|
||||
.h5 {
|
||||
font-size: $h5-size;
|
||||
font-weight: $font-weight-300;
|
||||
}
|
||||
|
||||
h6,
|
||||
.h6 {
|
||||
font-size: $base-font-size;
|
||||
font-weight: $font-weight-300;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6,
|
||||
.h1,
|
||||
.h2,
|
||||
.h3,
|
||||
.h4,
|
||||
.h5,
|
||||
.h6 {
|
||||
margin-bottom: 0.5rem;
|
||||
margin-top: 0.25rem;
|
||||
color: var(--text-core-hc);
|
||||
line-height: 1.1;
|
||||
}
|
||||
|
||||
p,
|
||||
.p {
|
||||
padding-bottom: $base-font-size * 0.5;
|
||||
}
|
||||
|
||||
//using map from breakpoint.scss
|
||||
@each $breakName, $breakValue in $breakpoints-up {
|
||||
//font size
|
||||
$fs: (
|
||||
"font-size": (
|
||||
"prefix": "text",
|
||||
"values": (
|
||||
"small": $font-size-sm,
|
||||
"default": $base-font-size,
|
||||
"medium": $font-size-md,
|
||||
"large": $font-size-lg,
|
||||
"extralarge": $font-size-xl,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@each $property, $map in $fs {
|
||||
$prefix: map-get($map, "prefix");
|
||||
$values: map-get($map, "values");
|
||||
|
||||
@each $k, $v in $values {
|
||||
@if $breakName != "" {
|
||||
@media (min-width: $breakValue) {
|
||||
.#{$prefix}-#{$breakName}-#{$k} {
|
||||
#{$property}: $v;
|
||||
}
|
||||
}
|
||||
} @else {
|
||||
.#{$prefix}-#{$k} {
|
||||
#{$property}: $v;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//font weight
|
||||
$fw: (
|
||||
"font-weight": (
|
||||
"prefix": "text",
|
||||
"values": (
|
||||
"thin": $font-weight-300,
|
||||
"regular": $font-weight-400,
|
||||
"semibold": $font-weight-600,
|
||||
"bold": $font-weight-700,
|
||||
"extrabold": $font-weight-800,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@each $property, $map in $fw {
|
||||
$prefix: map-get($map, "prefix");
|
||||
$values: map-get($map, "values");
|
||||
|
||||
@each $k, $v in $values {
|
||||
@if $breakName != "" {
|
||||
@media (min-width: $breakValue) {
|
||||
.#{$prefix}-#{$breakName}-#{$k} {
|
||||
#{$property}: $v;
|
||||
}
|
||||
}
|
||||
} @else {
|
||||
.#{$prefix}-#{$k} {
|
||||
#{$property}: $v;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} //end breakpoints
|
||||
|
||||
.text-italic {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.text-lowercase {
|
||||
text-transform: lowercase;
|
||||
}
|
||||
|
||||
.text-uppercase {
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.text-capitalize {
|
||||
text-transform: capitalize;
|
||||
}
|
||||
|
||||
.text-nowrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.text-truncate {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
// $fs: (
|
||||
// "font-size": (
|
||||
// "prefix": "fs",
|
||||
// "values": (
|
||||
// "sm": $font-size-sm,
|
||||
// "md": $font-size-md,
|
||||
// "lg": $font-size-lg,
|
||||
// "xl": $font-size-xl,
|
||||
// ),
|
||||
// ),
|
||||
// );
|
||||
|
||||
// @each $property, $map in $fs {
|
||||
// $prefix: map-get($map, "prefix");
|
||||
// $values: map-get($map, "values");
|
||||
|
||||
// @each $k, $v in $values {
|
||||
// @if ($k == "default") {
|
||||
// .#{$prefix} {
|
||||
// #{$property}: $v;
|
||||
// }
|
||||
// } @else {
|
||||
// .#{$prefix}-#{$k} {
|
||||
// #{$property}: $v;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
//font weight
|
||||
// $fw: (
|
||||
// "font-weight": (
|
||||
// "prefix": "fw",
|
||||
// "values": (
|
||||
// "light": $font-weight-300,
|
||||
// "regular": $font-weight-400,
|
||||
// "semibold": $font-weight-600,
|
||||
// "bold": $font-weight-700,
|
||||
// "extrabold": $font-weight-800,
|
||||
// ),
|
||||
// ),
|
||||
// );
|
||||
|
||||
// @each $property, $map in $fw {
|
||||
// $prefix: map-get($map, "prefix");
|
||||
// $values: map-get($map, "values");
|
||||
|
||||
// @each $k, $v in $values {
|
||||
// @if ($k == "default") {
|
||||
// .#{$prefix} {
|
||||
// #{$property}: $v;
|
||||
// }
|
||||
// } @else {
|
||||
// .#{$prefix}-#{$k} {
|
||||
// #{$property}: $v;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
146
src/Connected.Components/Styles/globals/_variables.scss
Normal file
146
src/Connected.Components/Styles/globals/_variables.scss
Normal file
@ -0,0 +1,146 @@
|
||||
@use "sass:math";
|
||||
|
||||
//theme colors
|
||||
$bg-core-primary: hsl(225, 68%, 85%); // body-background;
|
||||
$bg-core-start: $bg-core-primary;
|
||||
$bg-core-end: #fafafa;
|
||||
|
||||
$text-core-hc: #212121; //title
|
||||
$text-core: #525252; //text
|
||||
$text-core-lc: #7d7d80; //metadata
|
||||
$text-core-vc: #969699; //ikona-text
|
||||
|
||||
$border-core: lighten($bg-core-primary, 7%); //border
|
||||
$element-bg-core: rgba(255, 255, 255, 0.5); // elements-background
|
||||
$element-fg-core: rgba(255, 255, 255, 0.25); // elements-foreground
|
||||
|
||||
:root {
|
||||
--bg-core-primary: #{$bg-core-primary}; // body-background;
|
||||
--bg-core-primary-lighten: hsl(225, 68%, 90%); // lighten
|
||||
--bg-core-primary-darken: hsl(225, 68%, 75%); // darken;
|
||||
--bg-core-start: #{$bg-core-primary};
|
||||
--bg-core-end: #{$bg-core-end};
|
||||
|
||||
--text-core-hc: #{$text-core-hc}; //title
|
||||
--text-core: #{$text-core}; //text
|
||||
--text-core-lc: #{$text-core-lc}; //metadata
|
||||
--text-core-vc: #{$text-core-vc}; //ikona-text
|
||||
|
||||
--bg-core-primary-lighter: hsl(225, 68%, 90%); //hover
|
||||
--border-core: #{$border-core}; //border
|
||||
--element-bg-core: #{$element-bg-core}; // elements-background
|
||||
--element-fg-core: #{$element-fg-core}; // elements-foreground
|
||||
}
|
||||
|
||||
.pink,
|
||||
:root:has(pink:checked) {
|
||||
--bg-core-primary: hsl(310 50% 90%);
|
||||
--bg-core-primary-lighten: hsl(310 50% 95%); //lighten
|
||||
--bg-core-primary-darken: hsl(310 50% 85%); //darken
|
||||
--element-bg-core: hsl(310 50% 100% / 50%);
|
||||
--text-core: hsl(310 50% 15%);
|
||||
--border-core: hsl(310 50% 90%);
|
||||
}
|
||||
|
||||
.dark,
|
||||
:root:has(dark:checked) {
|
||||
--bg-core-primary: hsl(0 0% 10% / 100%); // body-background;
|
||||
--bg-core-primary-lighten: hsl(0 0% 15% / 100%); // lighten
|
||||
--bg-core-primary-darken: hsl(0 0% 5% / 100%); // darken;
|
||||
--bg-core-start: var(--bg-core-primary);
|
||||
--bg-core-end: hsl(0 0% 15% / 100%);
|
||||
|
||||
--text-core-hc: hsl(0 0% 97% / 100%); //title
|
||||
--text-core: hsl(0 0% 73% / 100%); //text
|
||||
--text-core-lc: hsl(0 0% 53% / 100%); //metadata
|
||||
--text-core-vc: hsl(0 0% 60% / 100%); //ikona-text
|
||||
|
||||
--border-core: hsl(0 0% 27% / 100%); //border
|
||||
--element-bg-core: hsl(0 0% 13% / 100%); // elements-background
|
||||
--element-fg-core: hsl(0 0% 20% / 100%); // elements-foreground
|
||||
}
|
||||
|
||||
// colors
|
||||
$blue: #0d6efd;
|
||||
$indigo: #6610f2;
|
||||
$purple: #6f42c1;
|
||||
$pink: #d63384;
|
||||
$red: #dc3545;
|
||||
$orange: #fd7e14;
|
||||
$yellow: #ffc107;
|
||||
$green: #00c851; //#198754;
|
||||
$teal: #20c997;
|
||||
$cyan: #0dcaf0;
|
||||
|
||||
$white: #fff;
|
||||
$gray-100: #f8f9fa;
|
||||
$gray-200: #e9ecef;
|
||||
$gray-300: #dee2e6;
|
||||
$gray-400: #ced4da;
|
||||
$gray-500: #adb5bd;
|
||||
$gray-600: #6c757d;
|
||||
$gray-700: #495057;
|
||||
$gray-800: #343a40;
|
||||
$gray-900: #212529;
|
||||
$black: #000;
|
||||
|
||||
$primary: $blue;
|
||||
$secondary: $gray-600;
|
||||
$success: $green;
|
||||
$info: $cyan;
|
||||
$warning: $yellow;
|
||||
$danger: $red;
|
||||
$light: $gray-400;
|
||||
$dark: $gray-900;
|
||||
|
||||
//color palette
|
||||
$theme-colors: (
|
||||
//"core": $bg-core-primary,
|
||||
"primary": $primary,
|
||||
"secondary": $secondary,
|
||||
"success": $success,
|
||||
"info": $info,
|
||||
"warning": $warning,
|
||||
"danger": $danger,
|
||||
"light": $light,
|
||||
"dark": $dark,
|
||||
"white": $white,
|
||||
"black": $black
|
||||
);
|
||||
|
||||
//spacing
|
||||
$base-spacing: 0.25;
|
||||
$base-padding: #{$base-spacing}rem;
|
||||
$base-margin: #{$base-spacing}rem;
|
||||
|
||||
//font-sizes
|
||||
$base-font-size: 1rem !default;
|
||||
$font-size-sm: $base-font-size * 0.85 !default;
|
||||
$font-size-md: $base-font-size * 1.25 !default;
|
||||
$font-size-lg: $base-font-size * 1.5 !default;
|
||||
$font-size-xl: $base-font-size * 2 !default;
|
||||
|
||||
$h1-size: $base-font-size * 3 !default;
|
||||
$h2-size: $base-font-size * 2.5 !default;
|
||||
$h3-size: $base-font-size * 2 !default;
|
||||
$h4-size: $base-font-size * 1.5 !default;
|
||||
$h5-size: $base-font-size * 1.25 !default;
|
||||
$h6-size: $base-font-size !default;
|
||||
|
||||
//font-weight
|
||||
$font-weight-300: 300; //light
|
||||
$font-weight-400: normal; // regular
|
||||
$font-weight-600: 600; // semibold
|
||||
$font-weight-700: bold; // bold
|
||||
$font-weight-800: 800; // extra bold
|
||||
|
||||
//border-radius
|
||||
$base-border-radius: 0.3rem;
|
||||
$border-radius-sm: math.div($base-border-radius, 2);
|
||||
$border-radius-lg: $base-border-radius * 2;
|
||||
|
||||
// box-shadow
|
||||
$base-box-shadow: 0 0.125rem 0.25rem rgb(0 0 0 / 10%) !default;
|
||||
|
||||
// transition
|
||||
$transition: all 0.15s ease-in-out;
|
@ -0,0 +1,65 @@
|
||||
@use "../globals" as *;
|
||||
|
||||
.color-picker > fieldset {
|
||||
border: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2rem;
|
||||
width: fit-content;
|
||||
//background: #fff;
|
||||
padding: 1rem 3rem;
|
||||
position: fixed;
|
||||
top: 1rem;
|
||||
right: 0;
|
||||
border-radius: 0 0 1rem 1rem;
|
||||
}
|
||||
|
||||
.color-picker input[type="radio"] {
|
||||
appearance: none;
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: none;
|
||||
width: 0.75rem;
|
||||
height: 0.75rem;
|
||||
outline: 2px solid var(--radio-color, currentColor);
|
||||
outline-offset: 2px;
|
||||
border-radius: 50%;
|
||||
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.color-picker input[type="radio"]:checked {
|
||||
background-color: var(--radio-color);
|
||||
}
|
||||
|
||||
.color-picker input[type="radio"]light {
|
||||
--radio-color: hsl(225, 68%, 85%);
|
||||
}
|
||||
.color-picker input[type="radio"]pink {
|
||||
--radio-color: pink;
|
||||
}
|
||||
|
||||
.color-picker input[type="radio"]dark {
|
||||
--radio-color: #232323;
|
||||
}
|
||||
|
||||
.square > * {
|
||||
width: 8.5rem;
|
||||
height: 8.5rem;
|
||||
padding: 0.5rem;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background: var(--element-fg-core);
|
||||
border-color: $primary;
|
||||
}
|
||||
|
||||
.grid.test > * {
|
||||
text-align: center;
|
||||
background: var(--element-fg-core);
|
||||
border: 1px solid;
|
||||
border-color: var(--border-core);
|
||||
color: inherit;
|
||||
border-radius: $border-radius-lg;
|
||||
}
|
||||
|
||||
|
39
src/Connected.Components/Styles/layout/_document.scss
Normal file
39
src/Connected.Components/Styles/layout/_document.scss
Normal file
@ -0,0 +1,39 @@
|
||||
@use '../globals' as *;
|
||||
@use '../util' as *;
|
||||
|
||||
// .document-container {
|
||||
// padding: rem(32);
|
||||
|
||||
// @include breakpoint(sm) {
|
||||
// width: min(100% - 2rem, 1200px);
|
||||
// margin-inline: auto;
|
||||
// margin-block: rem(24);
|
||||
// position: relative;
|
||||
// background-color: rgba(255,255,255,.6);
|
||||
// border-radius: $border-radius-lg;
|
||||
// padding: rem(32);
|
||||
// box-shadow: $base-box-shadow;
|
||||
|
||||
// }
|
||||
|
||||
// }
|
||||
|
||||
|
||||
//test-sidebar
|
||||
.document-container {
|
||||
//padding: rem(32);
|
||||
|
||||
@include breakpoint(sm) {
|
||||
width: min(100% - 4rem, 1920px - 4rem);
|
||||
margin-inline: auto;
|
||||
margin-block: rem(24);
|
||||
position: relative;
|
||||
background-color: var(--element-bg-core);
|
||||
border: 1px solid var(--border-core);
|
||||
border-radius: $border-radius-lg;
|
||||
// padding: rem(32);
|
||||
box-shadow: $base-box-shadow;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
}
|
2
src/Connected.Components/Styles/layout/_index.scss
Normal file
2
src/Connected.Components/Styles/layout/_index.scss
Normal file
@ -0,0 +1,2 @@
|
||||
@forward 'document';
|
||||
@forward 'css_documentation';
|
31
src/Connected.Components/Styles/util/_breakpoints.scss
Normal file
31
src/Connected.Components/Styles/util/_breakpoints.scss
Normal file
@ -0,0 +1,31 @@
|
||||
@use 'functions' as *;
|
||||
|
||||
|
||||
$breakpoints-up: (
|
||||
"": "",
|
||||
'sm': rem(576),
|
||||
'md': rem(768),
|
||||
'lg': rem(992),
|
||||
'xl': rem(1200),
|
||||
);
|
||||
|
||||
// 639px, 1149px, 1399px
|
||||
$breakpoints-down: (
|
||||
"": "",
|
||||
'sm': rem(575),
|
||||
'md': rem(767),
|
||||
'lg': rem(991),
|
||||
'xl': rem(1119),
|
||||
);
|
||||
|
||||
@mixin breakpoint($size) {
|
||||
@media (min-width: map-get($breakpoints-up, $size)) {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin breakpoint-down($size) {
|
||||
@media (max-width: map-get($breakpoints-down, $size)) {
|
||||
@content;
|
||||
}
|
||||
}
|
113
src/Connected.Components/Styles/util/_colors.scss
Normal file
113
src/Connected.Components/Styles/util/_colors.scss
Normal file
@ -0,0 +1,113 @@
|
||||
@use "../globals/" as *;
|
||||
@use "functions" as *;
|
||||
|
||||
//text & bg colors in theme palllete
|
||||
@each $key, $val in $theme-colors {
|
||||
.text-#{$key} {
|
||||
color: $val !important;
|
||||
}
|
||||
a.text-#{$key} {
|
||||
&:hover {
|
||||
color: darken($val, 10%) !important;
|
||||
}
|
||||
}
|
||||
.text-hover-#{$key} {
|
||||
&:hover {
|
||||
color: darken($val, 5%) !important;
|
||||
}
|
||||
}
|
||||
.b-c-#{$key} {
|
||||
border-color: $val !important;
|
||||
}
|
||||
.bg-#{$key} {
|
||||
background-color: $val !important;
|
||||
color: set-color($val);
|
||||
}
|
||||
// @if ($val == white) {
|
||||
// // dark variations for black
|
||||
// @for $i from 1 through 9 {
|
||||
// .text-#{$key}-#{$i} {
|
||||
// color: mix(black, $val, $i * 10);
|
||||
// }
|
||||
// .text-hover-#{$key} {
|
||||
// &:hover {
|
||||
// color: darken($val, 5%);
|
||||
// }
|
||||
// }
|
||||
// .bg-#{$key}-#{$i} {
|
||||
// background-color: mix(black, $val, $i * 10);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
.text-core {
|
||||
color: var(--bg-core-primary-darken);
|
||||
}
|
||||
|
||||
.bg-core {
|
||||
background-color: var(--bg-core-primary);
|
||||
}
|
||||
|
||||
.b-c-core {
|
||||
border-color: var(--bg-core-primary) !important;
|
||||
}
|
||||
|
||||
.element-fg-core {
|
||||
background-color: var(--element-fg-core);
|
||||
}
|
||||
|
||||
//change --bg-core-primary for dark
|
||||
.dark,
|
||||
:root:has(dark:checked) {
|
||||
$val: hsl(216 100% 70%);
|
||||
|
||||
.text-core {
|
||||
color: var(--text-core-hc);
|
||||
}
|
||||
a.text-core {
|
||||
color: $val !important;
|
||||
&:hover {
|
||||
color: darken($val, 10%) !important;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-core {
|
||||
background-color: $val !important;
|
||||
color: set-color($val) !important;
|
||||
border: 1px solid transparent;
|
||||
&:hover {
|
||||
background-color: darken($val, 10) !important;
|
||||
}
|
||||
&:focus-visible,
|
||||
&.focus {
|
||||
outline: 0;
|
||||
box-shadow: 0 0 0 0.15rem lighten($val, 20) !important;
|
||||
}
|
||||
&:active,
|
||||
&.active {
|
||||
background-color: darken($val, 15) !important;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-outline-core {
|
||||
color: $val !important;
|
||||
background-color: transparent;
|
||||
border: 1px solid $val !important;
|
||||
&:hover {
|
||||
color: darken($val, 10) !important;
|
||||
border: 1px solid darken($val, 10) !important;
|
||||
}
|
||||
&:focus-visible,
|
||||
&.focus {
|
||||
outline: 0 !important;
|
||||
box-shadow: 0 0 0 0.15rem lighten($val, 20) !important;
|
||||
}
|
||||
&:active,
|
||||
&.active {
|
||||
background-color: darken($val, 15) !important;
|
||||
color: set-color($val) !important;
|
||||
border: 1px solid transparent !important;
|
||||
}
|
||||
}
|
||||
}
|
17
src/Connected.Components/Styles/util/_functions.scss
Normal file
17
src/Connected.Components/Styles/util/_functions.scss
Normal file
@ -0,0 +1,17 @@
|
||||
@use "sass:math";
|
||||
|
||||
// pixel to rem - font-size:rem(16)
|
||||
@function rem($pixels, $context: 16) {
|
||||
@return (math.div($pixels, $context)) * 1rem;
|
||||
}
|
||||
|
||||
|
||||
// change text color based on background color - set-color(color-value)
|
||||
@function set-color($color) {
|
||||
@if (lightness($color) > 55) {
|
||||
@return #333;
|
||||
}
|
||||
@else {
|
||||
@return #FFF;
|
||||
}
|
||||
}
|
4
src/Connected.Components/Styles/util/_index.scss
Normal file
4
src/Connected.Components/Styles/util/_index.scss
Normal file
@ -0,0 +1,4 @@
|
||||
@forward 'breakpoints';
|
||||
@forward 'functions';
|
||||
@forward 'colors';
|
||||
@forward 'utilities';
|
278
src/Connected.Components/Styles/util/_utilities.scss
Normal file
278
src/Connected.Components/Styles/util/_utilities.scss
Normal file
@ -0,0 +1,278 @@
|
||||
@use "sass:math";
|
||||
@use "../globals/" as *;
|
||||
@use "breakpoints" as *;
|
||||
|
||||
//using map from breakpoint.scss
|
||||
@each $breakName, $breakValue in $breakpoints-up {
|
||||
//padding margins classes
|
||||
$spacings: (0, 1, 2, 3, 4, 5, auto);
|
||||
|
||||
$sides: (
|
||||
"t": "top",
|
||||
"b": "bottom",
|
||||
"l": "left",
|
||||
"r": "right",
|
||||
"": (
|
||||
"top",
|
||||
"left",
|
||||
"bottom",
|
||||
"right",
|
||||
),
|
||||
"x": (
|
||||
"left",
|
||||
"right",
|
||||
),
|
||||
"y": (
|
||||
"top",
|
||||
"bottom",
|
||||
),
|
||||
);
|
||||
|
||||
@each $space in $spacings {
|
||||
@each $prefix, $positions in $sides {
|
||||
@if $breakName != "" {
|
||||
$prefix: #{$prefix}-#{$breakName};
|
||||
} @else {
|
||||
$prefix: #{$prefix};
|
||||
}
|
||||
|
||||
@if $breakName != "" {
|
||||
@media (min-width: $breakValue) {
|
||||
.p#{$prefix}-#{$space} {
|
||||
@each $pos in $positions {
|
||||
padding-#{$pos}: if(
|
||||
$space == auto,
|
||||
$space,
|
||||
#{$space * $base-spacing}rem
|
||||
) !important;
|
||||
}
|
||||
}
|
||||
.m#{$prefix}-#{$space} {
|
||||
@each $pos in $positions {
|
||||
margin-#{$pos}: if(
|
||||
$space == auto,
|
||||
$space,
|
||||
#{$space * $base-spacing}rem
|
||||
) !important;
|
||||
}
|
||||
}
|
||||
.b#{$prefix}-#{$space} {
|
||||
@each $pos in $positions {
|
||||
border-#{$pos}: if(
|
||||
$space == auto,
|
||||
$space,
|
||||
#{$space}px solid var(--border-core)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
} @else {
|
||||
.p#{$prefix}-#{$space} {
|
||||
@each $pos in $positions {
|
||||
padding-#{$pos}: if(
|
||||
$space == auto,
|
||||
$space,
|
||||
#{$space * $base-spacing}rem
|
||||
) !important;
|
||||
}
|
||||
}
|
||||
.m#{$prefix}-#{$space} {
|
||||
@each $pos in $positions {
|
||||
margin-#{$pos}: if(
|
||||
$space == auto,
|
||||
$space,
|
||||
#{$space * $base-spacing}rem
|
||||
) !important;
|
||||
}
|
||||
}
|
||||
.b#{$prefix}-#{$space} {
|
||||
@each $pos in $positions {
|
||||
border-#{$pos}: if(
|
||||
$space == auto,
|
||||
$space,
|
||||
#{$space}px solid var(--border-core)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//border-radius classes
|
||||
$spacings: (0, 1, 2, 3, 4, 5);
|
||||
|
||||
@each $space in $spacings {
|
||||
@if $breakName != "" {
|
||||
@media (min-width: $breakValue) {
|
||||
.b-r-#{$breakName}-#{$space} {
|
||||
border-radius: #{$space * $base-spacing}rem !important;
|
||||
}
|
||||
}
|
||||
} @else {
|
||||
.b-r-#{$space} {
|
||||
border-radius: #{$space * $base-spacing}rem !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//border-radius-circle
|
||||
@if $breakName != "" {
|
||||
@media (min-width: $breakValue) {
|
||||
.b-r-#{$breakName}-circle {
|
||||
border-radius: 50% !important;
|
||||
}
|
||||
}
|
||||
} @else {
|
||||
.b-r-circle {
|
||||
border-radius: 50% !important;
|
||||
}
|
||||
.b-r-pill {
|
||||
border-radius: 9999px !important;
|
||||
}
|
||||
}
|
||||
|
||||
//gap classes
|
||||
$spacings: (0, 1, 2, 3, 4, 5);
|
||||
|
||||
@each $space in $spacings {
|
||||
@if $breakName != "" {
|
||||
@media (min-width: $breakValue) {
|
||||
.gap-#{$breakName}-#{$space} {
|
||||
gap: #{$space * $base-spacing}rem !important;
|
||||
}
|
||||
.gap-x-#{$breakName}-#{$space} {
|
||||
column-gap: #{$space * $base-spacing}rem !important;
|
||||
}
|
||||
.gap-y-#{$breakName}-#{$space} {
|
||||
row-gap: #{$space * $base-spacing}rem !important;
|
||||
}
|
||||
}
|
||||
} @else {
|
||||
.gap-#{$space} {
|
||||
gap: #{$space * $base-spacing}rem !important;
|
||||
}
|
||||
.gap-x-#{$space} {
|
||||
column-gap: #{$space * $base-spacing}rem !important;
|
||||
}
|
||||
.gap-y-#{$space} {
|
||||
row-gap: #{$space * $base-spacing}rem !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Display classes
|
||||
$displayProps: (
|
||||
"block",
|
||||
"inline-block",
|
||||
"inline",
|
||||
"flex",
|
||||
"grid",
|
||||
"inline-flex",
|
||||
"inline-grid",
|
||||
"table",
|
||||
"inline-table",
|
||||
"list-item",
|
||||
"none",
|
||||
"contents"
|
||||
);
|
||||
|
||||
@each $disp in $displayProps {
|
||||
@if $breakName != "" {
|
||||
@media (min-width: $breakValue) {
|
||||
.d-#{$breakName}-#{$disp} {
|
||||
display: #{$disp} !important;
|
||||
}
|
||||
}
|
||||
} @else {
|
||||
.d-#{$disp} {
|
||||
display: #{$disp} !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Align & Justify classes
|
||||
$alignments: (
|
||||
"center",
|
||||
"space-between",
|
||||
"space-around",
|
||||
"space-evenly",
|
||||
"flex-start",
|
||||
"flex-end"
|
||||
);
|
||||
|
||||
@each $align in $alignments {
|
||||
@if $breakName != "" {
|
||||
@media (min-width: $breakValue) {
|
||||
.justify-#{$breakName}-#{$align} {
|
||||
justify-content: #{$align};
|
||||
}
|
||||
|
||||
.items-#{$breakName}-#{$align} {
|
||||
align-items: #{$align};
|
||||
}
|
||||
|
||||
.justify-items-#{$breakName}-#{$align} {
|
||||
justify-items: #{$align};
|
||||
}
|
||||
|
||||
.content-#{$breakName}-#{$align} {
|
||||
align-content: #{$align};
|
||||
}
|
||||
}
|
||||
} @else {
|
||||
.justify-#{$align} {
|
||||
justify-content: #{$align};
|
||||
}
|
||||
|
||||
.items-#{$align} {
|
||||
align-items: #{$align};
|
||||
}
|
||||
|
||||
.justify-items-#{$align} {
|
||||
justify-items: #{$align};
|
||||
}
|
||||
|
||||
.content-#{$align} {
|
||||
align-content: #{$align};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Text Align classes
|
||||
$textAlignments: ("left", "right", "center", "justify");
|
||||
|
||||
@each $textAlign in $textAlignments {
|
||||
@if $breakName != "" {
|
||||
@media (min-width: $breakValue) {
|
||||
.text-#{$breakName}-#{$textAlign} {
|
||||
text-align: #{$textAlign} !important;
|
||||
}
|
||||
}
|
||||
} @else {
|
||||
.text-#{$textAlign} {
|
||||
text-align: #{$textAlign} !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Opacity classes
|
||||
$opacities: ("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10");
|
||||
|
||||
@each $opacity in $opacities {
|
||||
@if $breakName != "" {
|
||||
@media (min-width: $breakValue) {
|
||||
.o-#{$breakName}-#{$opacity} {
|
||||
opacity: calc(#{$opacity} / 10);
|
||||
}
|
||||
}
|
||||
} @else {
|
||||
.o-#{$opacity} {
|
||||
opacity: calc(#{$opacity} / 10);
|
||||
}
|
||||
}
|
||||
}
|
||||
} //end breakpoints
|
||||
|
||||
.flex-wrap {
|
||||
flex-wrap: wrap;
|
||||
}
|
119
src/Connected.Components/Utilities/CssBuilder.cs
Normal file
119
src/Connected.Components/Utilities/CssBuilder.cs
Normal file
@ -0,0 +1,119 @@
|
||||
// Copyright (c) 2011 - 2019 Ed Charbeneau
|
||||
// License: MIT
|
||||
// See https://github.com/EdCharbeneau
|
||||
|
||||
using System.Text;
|
||||
|
||||
namespace Connected.Utilities;
|
||||
|
||||
public readonly struct CssBuilder
|
||||
{
|
||||
private readonly StringBuilder _stringBuffer;
|
||||
|
||||
public CssBuilder() => _stringBuffer = new StringBuilder();
|
||||
/// <summary>
|
||||
/// Creates a CssBuilder used to define conditional CSS classes used in a component.
|
||||
/// Call Build() to return the completed CSS Classes as a string.
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
public CssBuilder(string value) => _stringBuffer = new StringBuilder(value?.ToLower());
|
||||
|
||||
/// <summary>
|
||||
/// Adds a raw string to the builder that will be concatenated with the next class or value added to the builder. All values are converted to lowercase.
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns>CssBuilder</returns>
|
||||
public CssBuilder AddValue(string value)
|
||||
{
|
||||
_stringBuffer.Append(value?.ToLower());
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds a CSS Class to the builder with space separator. All classes are converted to lowercase.
|
||||
/// </summary>
|
||||
/// <param name="value">CSS Class to add</param>
|
||||
/// <returns>CssBuilder</returns>
|
||||
public CssBuilder AddClass(string? value)
|
||||
{
|
||||
if (value is null)
|
||||
return this;
|
||||
|
||||
return AddValue($" {value?.ToLower()}");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds a conditional CSS Class to the builder with space separator.
|
||||
/// </summary>
|
||||
/// <param name="value">CSS Class to conditionally add.</param>
|
||||
/// <param name="when">Condition in which the CSS Class is added.</param>
|
||||
/// <returns>CssBuilder</returns>
|
||||
public CssBuilder AddClass(string value, bool when = true) => when ? AddClass(value) : this;
|
||||
|
||||
/// <summary>
|
||||
/// Adds a conditional CSS Class to the builder with space separator.
|
||||
/// </summary>
|
||||
/// <param name="value">CSS Class to conditionally add.</param>
|
||||
/// <param name="when">Nullable condition in which the CSS Class is added.</param>
|
||||
/// <returns>CssBuilder</returns>
|
||||
public CssBuilder AddClass(string value, bool? when = true) => when == true ? AddClass(value) : this;
|
||||
|
||||
/// <summary>
|
||||
/// Adds a conditional CSS Class to the builder with space separator.
|
||||
/// </summary>
|
||||
/// <param name="value">CSS Class to conditionally add.</param>
|
||||
/// <param name="when">Condition in which the CSS Class is added.</param>
|
||||
/// <returns>CssBuilder</returns>
|
||||
public CssBuilder AddClass(string value, Func<bool>? when = null) => AddClass(value, when is not null && when());
|
||||
|
||||
/// <summary>
|
||||
/// Adds a conditional CSS Class to the builder with space separator.
|
||||
/// </summary>
|
||||
/// <param name="value">Function that returns a CSS Class to conditionally add.</param>
|
||||
/// <param name="when">Condition in which the CSS Class is added.</param>
|
||||
/// <returns>CssBuilder</returns>
|
||||
public CssBuilder AddClass(Func<string> value, bool when = true) => when ? AddClass(value()) : this;
|
||||
|
||||
/// <summary>
|
||||
/// Adds a conditional CSS Class to the builder with space separator.
|
||||
/// </summary>
|
||||
/// <param name="value">Function that returns a CSS Class to conditionally add.</param>
|
||||
/// <param name="when">Condition in which the CSS Class is added.</param>
|
||||
/// <returns>CssBuilder</returns>
|
||||
public CssBuilder AddClass(Func<string> value, Func<bool> when = null) => AddClass(value, when != null && when());
|
||||
|
||||
/// <summary>
|
||||
/// Adds a conditional nested CssBuilder to the builder with space separator.
|
||||
/// </summary>
|
||||
/// <param name="builder">CSS Class to conditionally add.</param>
|
||||
/// <param name="when">Condition in which the CSS Class is added.</param>
|
||||
/// <returns>CssBuilder</returns>
|
||||
public CssBuilder AddClass(CssBuilder builder, bool when = true) => when ? AddClass(builder.Build()) : this;
|
||||
|
||||
/// <summary>
|
||||
/// Adds a conditional CSS Class to the builder with space separator.
|
||||
/// </summary>
|
||||
/// <param name="builder">CSS Class to conditionally add.</param>
|
||||
/// <param name="when">Condition in which the CSS Class is added.</param>
|
||||
/// <returns>CssBuilder</returns>
|
||||
public CssBuilder AddClass(CssBuilder builder, Func<bool> when = null) => AddClass(builder, when != null && when());
|
||||
|
||||
/// <summary>
|
||||
/// Adds a conditional CSS Class when it exists in a dictionary to the builder with space separator.
|
||||
/// Null safe operation.
|
||||
/// </summary>
|
||||
/// <param name="additionalAttributes">Additional Attribute splat parameters</param>
|
||||
/// <returns>CssBuilder</returns>
|
||||
public CssBuilder AddClassFromAttributes(IReadOnlyDictionary<string, object> additionalAttributes) =>
|
||||
additionalAttributes is null ? this :
|
||||
additionalAttributes.TryGetValue("class", out var c) ? AddClass(c.ToString()) : this;
|
||||
|
||||
/// <summary>
|
||||
/// Finalize the completed CSS Classes as a string.
|
||||
/// </summary>
|
||||
/// <returns>string</returns>
|
||||
public string Build() => _stringBuffer.ToString().Trim();
|
||||
|
||||
// ToString should only and always call Build to finalize the rendered string.
|
||||
public override string ToString() => Build();
|
||||
}
|
150
src/Connected.Components/Utilities/Helper.cs
Normal file
150
src/Connected.Components/Utilities/Helper.cs
Normal file
@ -0,0 +1,150 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Connected.Utilities;
|
||||
public static class Helper
|
||||
{
|
||||
public static string GetEnumDescription<T>(T EnumVariable)
|
||||
{
|
||||
string result = string.Empty;
|
||||
|
||||
if (!typeof(T).IsEnum)
|
||||
return string.Empty;
|
||||
|
||||
result = EnumVariable.ToString();
|
||||
|
||||
var fieldInfo = EnumVariable.GetType().GetField(EnumVariable.ToString());
|
||||
|
||||
if (fieldInfo != null)
|
||||
{
|
||||
var attrs = fieldInfo.GetCustomAttributes(typeof(DescriptionAttribute), true);
|
||||
if (attrs != null && attrs.Length > 0)
|
||||
{
|
||||
result = ((DescriptionAttribute)attrs[0]).Description;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public static bool IsTypeNumeric(string type)
|
||||
{
|
||||
switch (type.ToLower())
|
||||
{
|
||||
case "long":
|
||||
case "ulong":
|
||||
case "short":
|
||||
case "ushort":
|
||||
case "byte":
|
||||
case "sbyte":
|
||||
case "uint16":
|
||||
case "uint32":
|
||||
case "uint64":
|
||||
case "int16":
|
||||
case "int32":
|
||||
case "int64":
|
||||
case "int":
|
||||
case "double":
|
||||
case "decimal":
|
||||
case "float":
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static int GetDecimalPlaces(object number)
|
||||
{
|
||||
try
|
||||
{
|
||||
decimal n = (decimal)Convert.ChangeType(number, TypeCode.Decimal);
|
||||
n = Math.Abs(n); //make sure it is positive.
|
||||
n -= (int)n; //remove the integer part of the number.
|
||||
var decimalPlaces = 0;
|
||||
while (n > 0)
|
||||
{
|
||||
decimalPlaces++;
|
||||
n *= 10;
|
||||
n -= (int)n;
|
||||
}
|
||||
return decimalPlaces;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsTypeDate(string type)
|
||||
{
|
||||
switch (type.ToLower())
|
||||
{
|
||||
case "datetime":
|
||||
case "dateonly":
|
||||
case "timeonly":
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool NumberHasDecimalPlaces(object number)
|
||||
{
|
||||
if (number == null) return false;
|
||||
string type = number.GetType().Name.ToLower();
|
||||
if (IsTypeNumeric(type))
|
||||
{
|
||||
if (!type.Contains("double") && !type.Contains("decimal") && !type.Contains("float")) return false;
|
||||
else
|
||||
{
|
||||
if (type.Equals("double"))
|
||||
{
|
||||
var doubleVal = (double)Convert.ChangeType(number, TypeCode.Double);
|
||||
if (doubleVal % 1 == 0) return false;
|
||||
return true;
|
||||
}
|
||||
if (type.Equals("decimal"))
|
||||
{
|
||||
var doubleVal = (decimal)Convert.ChangeType(number, TypeCode.Decimal);
|
||||
if (doubleVal % 1 == 0) return false;
|
||||
return true;
|
||||
}
|
||||
if (type.Equals("float"))
|
||||
{
|
||||
var doubleVal = (float)number;
|
||||
if (doubleVal % 1 == 0) return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static bool IsTypeString(string type)
|
||||
{
|
||||
switch (type.ToLower())
|
||||
{
|
||||
case "string":
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsVariableNumeric(string input)
|
||||
{
|
||||
try
|
||||
{
|
||||
var number = Decimal.Parse(input);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
161
src/Connected.Components/Utilities/StyleBuilder.cs
Normal file
161
src/Connected.Components/Utilities/StyleBuilder.cs
Normal file
@ -0,0 +1,161 @@
|
||||
// Copyright (c) 2011 - 2019 Ed Charbeneau
|
||||
// License: MIT
|
||||
// See https://github.com/EdCharbeneau
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Connected.Utilities;
|
||||
|
||||
public struct StyleBuilder
|
||||
{
|
||||
private string stringBuffer;
|
||||
|
||||
/// <summary>
|
||||
/// Creates a StyleBuilder used to define conditional in-line style used in a component. Call Build() to return the completed style as a string.
|
||||
/// </summary>
|
||||
/// <param name="prop"></param>
|
||||
/// <param name="value"></param>
|
||||
public static StyleBuilder Default(string prop, string value) => new(prop, value);
|
||||
|
||||
/// <summary>
|
||||
/// Creates a StyleBuilder used to define conditional in-line style used in a component. Call Build() to return the completed style as a string.
|
||||
/// </summary>
|
||||
/// <param name="style"></param>
|
||||
public static StyleBuilder Default(string style) => Empty().AddStyle(style);
|
||||
|
||||
/// <summary>
|
||||
/// Creates a StyleBuilder used to define conditional in-line style used in a component. Call Build() to return the completed style as a string.
|
||||
/// </summary>
|
||||
public static StyleBuilder Empty() => new();
|
||||
|
||||
/// <summary>
|
||||
/// Creates a StyleBuilder used to define conditional in-line style used in a component. Call Build() to return the completed style as a string.
|
||||
/// </summary>
|
||||
/// <param name="prop"></param>
|
||||
/// <param name="value"></param>
|
||||
public StyleBuilder(string prop, string value) => stringBuffer = $"{prop}:{value};";
|
||||
|
||||
/// <summary>
|
||||
/// Adds a conditional in-line style to the builder with space separator and closing semicolon.
|
||||
/// </summary>
|
||||
/// <param name="style"></param>
|
||||
public StyleBuilder AddStyle(string style) => !string.IsNullOrWhiteSpace(style) ? AddRaw($"{style};") : this;
|
||||
|
||||
/// <summary>
|
||||
/// Adds a raw string to the builder that will be concatenated with the next style or value added to the builder.
|
||||
/// </summary>
|
||||
/// <param name="style"></param>
|
||||
/// <returns>StyleBuilder</returns>
|
||||
private StyleBuilder AddRaw(string style)
|
||||
{
|
||||
stringBuffer += style;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds a conditional in-line style to the builder with space separator and closing semicolon..
|
||||
/// </summary>
|
||||
/// <param name="prop"></param>
|
||||
/// <param name="value">Style to add</param>
|
||||
/// <returns>StyleBuilder</returns>
|
||||
public StyleBuilder AddStyle(string prop, string value) => AddRaw($"{prop}:{value};");
|
||||
|
||||
/// <summary>
|
||||
/// Adds a conditional in-line style to the builder with space separator and closing semicolon..
|
||||
/// </summary>
|
||||
/// <param name="prop"></param>
|
||||
/// <param name="value">Style to conditionally add.</param>
|
||||
/// <param name="when">Condition in which the style is added.</param>
|
||||
/// <returns>StyleBuilder</returns>
|
||||
public StyleBuilder AddStyle(string prop, string value, bool when = true) => when ? this.AddStyle(prop, value) : this;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Adds a conditional in-line style to the builder with space separator and closing semicolon..
|
||||
/// </summary>
|
||||
/// <param name="prop"></param>
|
||||
/// <param name="value">Style to conditionally add.</param>
|
||||
/// <param name="when">Condition in which the style is added.</param>
|
||||
/// <returns></returns>
|
||||
public StyleBuilder AddStyle(string prop, Func<string> value, bool when = true) => when ? this.AddStyle(prop, value()) : this;
|
||||
|
||||
/// <summary>
|
||||
/// Adds a conditional in-line style to the builder with space separator and closing semicolon..
|
||||
/// </summary>
|
||||
/// <param name="prop"></param>
|
||||
/// <param name="value">Style to conditionally add.</param>
|
||||
/// <param name="when">Condition in which the style is added.</param>
|
||||
/// <returns>StyleBuilder</returns>
|
||||
public StyleBuilder AddStyle(string prop, string value, Func<bool> when = null) => this.AddStyle(prop, value, when != null && when());
|
||||
|
||||
/// <summary>
|
||||
/// Adds a conditional in-line style to the builder with space separator and closing semicolon..
|
||||
/// </summary>
|
||||
/// <param name="prop"></param>
|
||||
/// <param name="value">Style to conditionally add.</param>
|
||||
/// <param name="when">Condition in which the style is added.</param>
|
||||
/// <returns>StyleBuilder</returns>
|
||||
public StyleBuilder AddStyle(string prop, Func<string> value, Func<bool> when = null) => this.AddStyle(prop, value(), when != null && when());
|
||||
|
||||
/// <summary>
|
||||
/// Adds a conditional nested StyleBuilder to the builder with separator and closing semicolon.
|
||||
/// </summary>
|
||||
/// <param name="builder">Style Builder to conditionally add.</param>
|
||||
/// <returns>StyleBuilder</returns>
|
||||
public StyleBuilder AddStyle(StyleBuilder builder) => this.AddRaw(builder.Build());
|
||||
|
||||
/// <summary>
|
||||
/// Adds a conditional nested StyleBuilder to the builder with separator and closing semicolon.
|
||||
/// </summary>
|
||||
/// <param name="builder">Style Builder to conditionally add.</param>
|
||||
/// <param name="when">Condition in which the style is added.</param>
|
||||
/// <returns>StyleBuilder</returns>
|
||||
public StyleBuilder AddStyle(StyleBuilder builder, bool when = true) => when ? this.AddRaw(builder.Build()) : this;
|
||||
|
||||
/// <summary>
|
||||
/// Adds a conditional in-line style to the builder with space separator and closing semicolon..
|
||||
/// </summary>
|
||||
/// <param name="builder">Style Builder to conditionally add.</param>
|
||||
/// <param name="when">Condition in which the styles are added.</param>
|
||||
/// <returns>StyleBuilder</returns>
|
||||
public StyleBuilder AddStyle(StyleBuilder builder, Func<bool> when = null) => this.AddStyle(builder, when != null && when());
|
||||
|
||||
/// <summary>
|
||||
/// Adds a conditional in-line style to the builder with space separator and closing semicolon..
|
||||
/// A ValueBuilder action defines a complex set of values for the property.
|
||||
/// </summary>
|
||||
/// <param name="prop"></param>
|
||||
/// <param name="builder"></param>
|
||||
/// <param name="when"></param>
|
||||
public StyleBuilder AddStyle(string prop, Action<ValueBuilder> builder, bool when = true)
|
||||
{
|
||||
var values = new ValueBuilder();
|
||||
builder(values);
|
||||
return AddStyle(prop, values.ToString(), when && values.HasValue);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds a conditional in-line style when it exists in a dictionary to the builder with separator.
|
||||
/// Null safe operation.
|
||||
/// </summary>
|
||||
/// <param name="additionalAttributes">Additional Attribute splat parameters</param>
|
||||
/// <returns>StyleBuilder</returns>
|
||||
public StyleBuilder AddStyleFromAttributes(IReadOnlyDictionary<string, object> additionalAttributes) =>
|
||||
additionalAttributes == null ? this :
|
||||
additionalAttributes.TryGetValue("style", out var c) ? AddRaw(c.ToString()) : this;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Finalize the completed Style as a string.
|
||||
/// </summary>
|
||||
/// <returns>string</returns>
|
||||
public string Build()
|
||||
{
|
||||
// String buffer finalization code
|
||||
return stringBuffer != null ? stringBuffer.Trim() : string.Empty;
|
||||
}
|
||||
|
||||
// ToString should only and always call Build to finalize the rendered string.
|
||||
public override string ToString() => Build();
|
||||
}
|
31
src/Connected.Components/Utilities/ValueBuilder.cs
Normal file
31
src/Connected.Components/Utilities/ValueBuilder.cs
Normal file
@ -0,0 +1,31 @@
|
||||
// Copyright (c) 2011 - 2019 Ed Charbeneau
|
||||
// License: MIT
|
||||
// See https://github.com/EdCharbeneau
|
||||
|
||||
using System;
|
||||
|
||||
namespace Connected.Utilities
|
||||
{
|
||||
public class ValueBuilder
|
||||
{
|
||||
private string stringBuffer;
|
||||
|
||||
public bool HasValue => !string.IsNullOrWhiteSpace(stringBuffer);
|
||||
/// <summary>
|
||||
/// Adds a space separated conditional value to a property.
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <param name="when"></param>
|
||||
/// <returns></returns>
|
||||
public ValueBuilder AddValue(string value, bool when = true) => when ? AddRaw($"{value} ") : this;
|
||||
public ValueBuilder AddValue(Func<string> value, bool when = true) => when ? AddRaw($"{value()} ") : this;
|
||||
|
||||
private ValueBuilder AddRaw(string style)
|
||||
{
|
||||
stringBuffer += style;
|
||||
return this;
|
||||
}
|
||||
|
||||
public override string ToString() => stringBuffer != null ? stringBuffer.Trim() : string.Empty;
|
||||
}
|
||||
}
|
6
src/Connected.Components/_Imports.razor
Normal file
6
src/Connected.Components/_Imports.razor
Normal file
@ -0,0 +1,6 @@
|
||||
@using System.Net.Http
|
||||
@using Microsoft.AspNetCore.Authorization
|
||||
@using Microsoft.AspNetCore.Components.Forms
|
||||
@using Microsoft.AspNetCore.Components.Routing
|
||||
@using Microsoft.AspNetCore.Components.Web
|
||||
@using Microsoft.JSInterop
|
6
src/Connected.Components/compilerconfig.json
Normal file
6
src/Connected.Components/compilerconfig.json
Normal file
@ -0,0 +1,6 @@
|
||||
[
|
||||
{
|
||||
"outputFile": "Styles/Connected.Components.css",
|
||||
"inputFile": "Styles/Connected.Components.scss"
|
||||
}
|
||||
]
|
71
src/Connected.Components/compilerconfig.json.defaults
Normal file
71
src/Connected.Components/compilerconfig.json.defaults
Normal file
@ -0,0 +1,71 @@
|
||||
{
|
||||
"compilers": {
|
||||
"less": {
|
||||
"autoPrefix": "",
|
||||
"cssComb": "none",
|
||||
"ieCompat": true,
|
||||
"math": null,
|
||||
"strictMath": false,
|
||||
"strictUnits": false,
|
||||
"relativeUrls": true,
|
||||
"rootPath": "",
|
||||
"sourceMapRoot": "",
|
||||
"sourceMapBasePath": "",
|
||||
"sourceMap": false
|
||||
},
|
||||
"sass": {
|
||||
"autoPrefix": "",
|
||||
"loadPaths": "",
|
||||
"style": "expanded",
|
||||
"relativeUrls": true,
|
||||
"sourceMap": false
|
||||
},
|
||||
"nodesass": {
|
||||
"autoPrefix": "",
|
||||
"includePath": "",
|
||||
"indentType": "space",
|
||||
"indentWidth": 2,
|
||||
"outputStyle": "nested",
|
||||
"precision": 5,
|
||||
"relativeUrls": true,
|
||||
"sourceMapRoot": "",
|
||||
"lineFeed": "",
|
||||
"sourceMap": false
|
||||
},
|
||||
"stylus": {
|
||||
"sourceMap": false
|
||||
},
|
||||
"babel": {
|
||||
"sourceMap": false
|
||||
},
|
||||
"coffeescript": {
|
||||
"bare": false,
|
||||
"runtimeMode": "node",
|
||||
"sourceMap": false
|
||||
},
|
||||
"handlebars": {
|
||||
"root": "",
|
||||
"noBOM": false,
|
||||
"name": "",
|
||||
"namespace": "",
|
||||
"knownHelpersOnly": false,
|
||||
"forcePartial": false,
|
||||
"knownHelpers": [],
|
||||
"commonjs": "",
|
||||
"amd": false,
|
||||
"sourceMap": false
|
||||
}
|
||||
},
|
||||
"minifiers": {
|
||||
"css": {
|
||||
"enabled": true,
|
||||
"termSemicolons": true,
|
||||
"gzip": false
|
||||
},
|
||||
"javascript": {
|
||||
"enabled": true,
|
||||
"termSemicolons": true,
|
||||
"gzip": false
|
||||
}
|
||||
}
|
||||
}
|
55
src/Connected.Components/excubowebcompiler.json
Normal file
55
src/Connected.Components/excubowebcompiler.json
Normal file
@ -0,0 +1,55 @@
|
||||
{
|
||||
"Minifiers": {
|
||||
"GZip": false,
|
||||
"Enabled": true,
|
||||
"Css": {
|
||||
"CommentMode": "Important",
|
||||
"ColorNames": "Hex",
|
||||
"TermSemicolons": true,
|
||||
"OutputMode": "SingleLine",
|
||||
"IndentSize": 2
|
||||
},
|
||||
"Javascript": {
|
||||
"RenameLocals": false,
|
||||
"PreserveImportantComments": true,
|
||||
"EvalTreatment": "Ignore",
|
||||
"TermSemicolons": true,
|
||||
"OutputMode": "SingleLine",
|
||||
"IndentSize": 2
|
||||
}
|
||||
},
|
||||
"Autoprefix": {
|
||||
"Enabled": false,
|
||||
"ProcessingOptions": {
|
||||
"Browsers": [
|
||||
"last 4 versions"
|
||||
],
|
||||
"Cascade": true,
|
||||
"Add": true,
|
||||
"Remove": true,
|
||||
"Supports": true,
|
||||
"Flexbox": "All",
|
||||
"Grid": "None",
|
||||
"IgnoreUnknownVersions": false,
|
||||
"Stats": "",
|
||||
"SourceMap": true,
|
||||
"InlineSourceMap": false,
|
||||
"SourceMapIncludeContents": false,
|
||||
"OmitSourceMapUrl": false
|
||||
}
|
||||
},
|
||||
"CompilerSettings": {
|
||||
"Sass": {
|
||||
"IndentType": "Space",
|
||||
"IndentWidth": 2,
|
||||
"OutputStyle": "Expanded",
|
||||
"RelativeUrls": true,
|
||||
"LineFeed": "Lf",
|
||||
"SourceMap": false
|
||||
}
|
||||
},
|
||||
"Output": {
|
||||
"Preserve": true,
|
||||
"Directory": "./wwwroot"
|
||||
}
|
||||
}
|
14
src/Connected.Components/version.json
Normal file
14
src/Connected.Components/version.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/main/src/NerdBank.GitVersioning/version.schema.json",
|
||||
"version": "1.0-prerelease",
|
||||
"semVer1NumericIdentifierPadding": 4,
|
||||
"nugetPackageVersion": {
|
||||
"semVer": 2, // optional. Set to either 1 or 2 to control how the NuGet package version string is generated. Default is 1.
|
||||
"precision": "build" // optional. Use when you want to use a more or less precise package version than the default major.minor.build.
|
||||
},
|
||||
"cloudBuild": {
|
||||
"buildNumber": {
|
||||
"enabled": true
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user