Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
4f05c91
feat extend navs with nav buttons
Jan 5, 2025
d992bde
update pkg version
Jan 5, 2025
e6055d1
doc update nav section
Jan 6, 2025
780115f
fix ci bump parcel
Jan 6, 2025
722ff4f
fix ci build
Jan 8, 2025
9f34b00
fix mg-nav wrap whitespace
Jan 8, 2025
0288ad6
chore cleanup
Jan 8, 2025
1dde89d
nav buttons : adding wrapping for nav buttons
Jan 9, 2025
c2d61bb
chore reorg and cleanup navs
Jan 9, 2025
d876d01
BREACKING CHANGE: mg-nav simplify markup by removing div container
Jan 12, 2025
929af18
BREAKING CHANGE: mg-nav simplify markup by removing div container
Jan 12, 2025
1c5d5ee
Merge branch 'features/nav-buttons' of https://github.com/medevod/mgp…
Jan 12, 2025
90e4373
chore linter
Jan 12, 2025
4c4e28e
default styling for nav buttons
Jan 12, 2025
79c2e70
feat add display helpers
Jan 13, 2025
d5a7931
fix nav-buttons fit display
Jan 13, 2025
ecde17c
Update azure-cdn-deploy.yml
medevod Jan 14, 2025
ca96d03
Update azure-cdn-deploy.yml
medevod Jan 14, 2025
99ffea7
fix nav inline flex overflow
Jan 14, 2025
73f97a3
Merge branch 'features/nav-buttons' of https://github.com/medevod/mgp…
Jan 14, 2025
97a2a5c
chore cleanup
Jan 15, 2025
8788a90
update build pipeline
Jan 15, 2025
de9b886
build fix
Jan 15, 2025
e7048e3
fix purge path
Jan 15, 2025
b63fa56
Update action.yml
medevod Jan 15, 2025
8fcfc9d
Update azure-cdn-deploy.yml
medevod Jan 15, 2025
a7eef04
fix conditional syntax issue in composite action
Jan 15, 2025
bf4cec5
Merge branch 'features/nav-buttons' of https://github.com/medevod/mgp…
Jan 15, 2025
c8073a5
fix grid effect priority
Jan 16, 2025
aae8909
doc add nav example
Jan 16, 2025
f338cb9
nav adjust default styling
Jan 16, 2025
d77ecc6
colors: adjust default back colors
Jan 16, 2025
ea52777
update dist files
Jan 16, 2025
894e118
nav adjust default styling
Jan 17, 2025
88cb3ea
navbutton change default style
Jan 17, 2025
e6b0c0b
mg tabs add delimiter
Jan 17, 2025
4873115
adjuste navs default styling
Jan 17, 2025
6e3910a
fix linter
Jan 17, 2025
3ca6921
neutral default style for mg nav buttons
Jan 17, 2025
61ef8d4
doc updat for new nav markup
Jan 18, 2025
fb22b8a
mg nav button remove default content aligment
medevod Jan 18, 2025
82d2400
doc reorg sections
medevod Jan 18, 2025
32ad618
CI/CD fix build lib
medevod Jan 18, 2025
a61fea0
fix cdn purge recursivity
medevod Jan 18, 2025
553571d
fix nav default wrapping behavior
Jan 18, 2025
aff9916
fix lint
Jan 18, 2025
0b3d4a6
BREAKING CHANGE: mg-toggle standardized markup for specific icon
Jan 18, 2025
3c3059a
chore: naming mixin to toggle effect
Jan 18, 2025
b663628
feat add some display helpers
Jan 18, 2025
99ad4e7
update dist file
Jan 18, 2025
e5b825b
chore
Jan 21, 2025
9cd141f
complete documentation
Jan 21, 2025
4157fe6
fix linter
Jan 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/actions/build-action/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,36 +28,36 @@ runs:
- name: get-npm-version
id: package-version
uses: martinbeentjes/npm-get-version-action@v1.3.1
- name: "build minified main css library, js plugins and demo in standalone mode"
- name: BETA-PREVIEW build minified main css library, js plugins and demo in standalone mode
if: ${{ inputs.stage != 'release' }}
env:
PACKAGE_VERSION: v${{ steps.package-version.outputs.current-version }}-${{ inputs.stage }}
run: |
npm install
npm run lint
npm run build
npm run build:lib
parcel build --target demo --no-source-maps --no-content-hash --public-url ./v${{ steps.package-version.outputs.current-version }}-${{ inputs.stage }}
npm run test --if-present
shell: bash
- name: "build minified main css library, js plugins and demo in standalone mode"
if: ${{ inputs.stage == 'release' }} && {{ inputs.release_update_only == "false" }}
- name: "RELEASE - build minified main css library, js plugins and demo in standalone mode"
if: ${{ inputs.stage == 'release' && inputs.release_update_only == 'false' }}
env:
PACKAGE_VERSION: v${{ steps.package-version.outputs.current-version }}
run: |
npm install
npm run lint
npm run build
npm run build:lib
parcel build --target demo --no-source-maps --no-content-hash --public-url ./v${{ steps.package-version.outputs.current-version }}
npm run test --if-present
shell: bash
- name: "update only release demo page"
if: ${{ inputs.stage == 'release' }} && {{ inputs.release_update_only == "true" }}
- name: "RELEASE - update only release demo page"
if: ${{ inputs.stage == 'release' && inputs.release_update_only == 'true' }}
env:
PACKAGE_VERSION: v${{ steps.package-version.outputs.current-version }}
run: |
npm install
npm run lint
npm run build
npm run build:lib
parcel build --target demo --no-source-maps --no-content-hash --public-url ./
npm run test --if-present
shell: bash
4 changes: 2 additions & 2 deletions .github/actions/deploy-action/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ runs:
az extension add -n storage-preview -y
az storage blob upload-batch -s $DEMO_SOURCE_DIR -d $DEMO_DEST_DIR --account-name $ACCOUNT_NAME
az storage blob upload-batch -s $DIST_SOURCE_DIR -d $DIST_DEST_DIR --account-name $ACCOUNT_NAME
az cdn endpoint purge -g rg-devops -n mgplus-demo --profile-name cdn-evo --content-paths '/${{ inputs.package_version }}'
az cdn endpoint purge -g rg-devops -n cdn-mgplus --profile-name cdn-evo2 --content-paths '/${{ inputs.package_version }}'
az cdn endpoint purge -g rg-devops -n mgplus-demo --profile-name cdn-evo --content-paths /${{ inputs.package_version }}/*
az cdn endpoint purge -g rg-devops -n cdn-mgplus --profile-name cdn-evo2 --content-paths /${{ inputs.package_version }}/*
18 changes: 9 additions & 9 deletions .github/workflows/azure-cdn-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ jobs:
deploy_pullrequest:
if: github.event_name == 'pull_request' && github.event.action != 'closed'
runs-on: ubuntu-latest
name: CDN - deploy PR version
name: CDN - deploy beta version
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v3
- name: "build lib and demo"
- name: "BETA - build lib and demo"
id: "build_action"
uses: ./.github/actions/build-action
with:
Expand All @@ -36,12 +36,12 @@ jobs:
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
enable-AzPSSession: true
- name: "deploy lib and demo"
- name: "BETA - deploy lib and demo"
id: "deploy_action"
uses: ./.github/actions/deploy-action
with:
package_version: ${{ steps.build_action.outputs.package_version }}
stage: "beta-${{ github.event.pull_request.number }}"
package_version: "${{ steps.build_action.outputs.package_version }}"
stage: "beta"
deploy_preview:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/heads/master') == true
runs-on: ubuntu-latest
Expand All @@ -51,7 +51,7 @@ jobs:
id-token: write
steps:
- uses: actions/checkout@v3
- name: "build lib and demo"
- name: "PREVIEW - build lib and demo"
uses: ./.github/actions/build-action
id: "build_action"
with:
Expand All @@ -63,7 +63,7 @@ jobs:
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
enable-AzPSSession: true
- name: "deploy lib and demo"
- name: "PREVIEW - deploy lib and demo"
id: "deploy_action"
uses: ./.github/actions/deploy-action
with:
Expand All @@ -78,7 +78,7 @@ jobs:
id-token: write
steps:
- uses: actions/checkout@v3
- name: "build lib and demo"
- name: "RELEASE - build lib and demo"
uses: ./.github/actions/build-action
id: "build_action"
with:
Expand All @@ -90,7 +90,7 @@ jobs:
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
enable-AzPSSession: true
- name: "deploy lib and demo"
- name: "RELEASE - deploy lib and demo"
id: "deploy_action"
uses: ./.github/actions/deploy-action
with:
Expand Down
26 changes: 10 additions & 16 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,11 @@
<i class="mg-icon svg-icon-darkmode"></i>
</button>
<div class="mg-dropdown--content">
<div class="mg-nav">
<ul>
<li data-toggle="theme" data-value="light">Light</li>
<li data-toggle="theme" data-value="dark">Dark</li>
<li data-toggle="theme" data-value="auto">Auto</li>
</ul>
</div>
<ul class="mg-nav">
<li data-toggle="theme" data-value="light">Light</li>
<li data-toggle="theme" data-value="dark">Dark</li>
<li data-toggle="theme" data-value="auto">Auto</li>
</ul>
</div>
</div>
<div class="mg-dropdown">
Expand Down Expand Up @@ -64,10 +62,8 @@
<i class="mg-icon mg-icon--3xl icon-menu"></i>
</button>
<div class="mg-dropdown--content mg-right">
<div class="mg-nav">
<ul data-toggle="navlinks" class="mg-text-bold">
</ul>
</div>
<ul data-toggle="navlinks" class="mg-nav mg-text-bold">
</ul>
</div>
</div>

Expand Down Expand Up @@ -108,10 +104,8 @@ <h2>A micro CSS library </h2>
<div
class="mg-fixed mg-top5 mg-right mg-bg-initial mg-rounded mg-border-thin mg-marg-l1 mg-marg-r1 mg-pad1 mg-xl-hidden">
<div class=" mg-max-h80vh mg-overflow-y-auto">
<div class="mg-nav">
<ul data-toggle="navlinks" class="mg-text-bold">
</ul>
</div>
<ul data-toggle="navlinks" class="mg-nav mg-text-bold">
</ul>
</div>
</div>
<main class="mg-container">
Expand All @@ -130,7 +124,6 @@ <h2>Examples</h2>
<include src="demo/sections/colors-section.html"></include>
<include src="demo/sections/dropdown-section.html"></include>
<include src="demo/sections/form-section.html"></include>
<include src="demo/sections/grid-section.html"> </include>
<include src="demo/sections/group-section.html"></include>
<include src="demo/sections/helpers-section.html"></include>
<include src="demo/sections/icons-section.html"></include>
Expand All @@ -141,6 +134,7 @@ <h2>Examples</h2>
<include src="demo/sections/progress-section.html"></include>
<include src="demo/sections/radio-section.html"></include>
<include src="demo/sections/range-section.html"></include>
<include src="demo/sections/grid-section.html"> </include>
<include src="demo/sections/responsive-display-section.html"></include>
<include src="demo/sections/select-section.html"> </include>
<include src="demo/sections/tab-section.html"></include>
Expand Down
1 change: 1 addition & 0 deletions demo/sections/alert-section.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<section id="alert">
<h2>Alert</h2>
<code>mg-alert</code>
<p>Alerts are used to display important information to the user. They are used to display important information to the
user. They are used to display important information to the user.</p>
<div data-toggle="htmlpreview">
Expand Down
1 change: 1 addition & 0 deletions demo/sections/badge-section.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<section id="badges">
<h2>Badges</h2>
<code>mg-badge</code>
<p>Badges are used to display important information to the user. They are used to display important information to the
user. They are used to display important information to the user.</p>
<h3>Default appearance</h3>
Expand Down
1 change: 1 addition & 0 deletions demo/sections/check-section.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<section id="check">
<h2>Check</h2>
<code>mg-check</code>
<p>You will find examples of
checkboxes in their default, checked, and disabled states.</p>
<div class="mg-row" id="check-example" data-toggle="htmlpreview">
Expand Down
42 changes: 28 additions & 14 deletions demo/sections/collapse-section.html
Original file line number Diff line number Diff line change
@@ -1,36 +1,50 @@
<section id="Collapse">
<h2>Collapse</h2>
<code>mg-collapse +/-[opened]</code>
<p>Collapsible elements are used to hide or show content based on user interaction. Below, you will find examples of
collapsible elements in their default state, as well as examples of how to trigger the collapse and expand
functionality.</p>
<i>Collapse needs js to toggle class visibility</i>
<div class="mg-col mg-m6" id="collapse-example" data-toggle="htmlpreview">
<p>Place <code>mg-collapse</code> class to a clickable element</p>
<p>Place <code>mg-collapse--content</code> class to a sibling content element</p>
<p><code>opened</code> class will toggle visibility of the collapsible content inside
<code>mg-collapse--content</code>
</p>
<p>Place special inline icon <code>mg-icon-collapse</code> to reflect state of collapsible content</p>


<div class="mg-col mg-m6" data-toggle="htmlpreview">
<button class="mg-button mg-button--outline mg-collapse mg-icon-collapse" data-toggle="collapse">collapse
Button</button>
<div class="mg-collapse--content">
Content 1
</div>
</div>

<div data-toggle="htmlpreview">
<span class="mg-collapse mg-icon-collapse" data-toggle="collapse">Collapse div</span>
<div class="mg-collapse--content">
Content 2
div content
</div>
</div>
</div>
<h3>Collapsible navs</h3>
<div id="collapse-navs-example" data-toggle="htmlpreview" data-toggle="nav">
<div class="mg-nav mg-m6" data-toggle="nav">
<ul>
<li class="active"><a href="#home">Home</a></li>
<li><a href="#news">News</a></li>
<li class="mg-collapse mg-icon-nav" data-toggle="collapse"><a href="#contact">Contact</a>
</li>
<ul class="mg-collapse--content">
Here is a composition of navs and collapse elements
<div data-toggle="htmlpreview" data-toggle="nav">
<ul class="mg-nav" data-toggle="nav">
<li class="active"><a href="#home">Home</a></li>
<li><a href="#news">News</a></li>
<li class="mg-collapse mg-icon-nav" data-toggle="collapse"><a href="#contact">Contact</a>
</li>
<div class="mg-collapse--content">
<ul class="mg-nav">
<li>Contact sales</li>
<li>Contact customer</li>
<li>Contact care</li>
</ul>
<li><a href="#about">About</a></li>
</ul>
</div>
</div>
<li><a href="#about">About</a></li>
</ul>

</div>

</section>
88 changes: 48 additions & 40 deletions demo/sections/dropdown-section.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,54 +3,62 @@ <h2>Dropdown</h2>
<p>Dropdowns are used to display a
list of options to the user. Below, you will find examples of dropdowns in their default state, as well as examples
of how to trigger the dropdown functionality.</p>
<i>Dropdown needs js to toggle class visibility</i>
<div data-toggle="htmlpreview">
<div class="mg-dropdown" role="menu" id="dropdown-example">
<p>Place <code>mg-dropdown</code> as container class</p>
<p>Inside <code>mg-dropdown</code> place a button element with special icon <code>mg-icon-dropdown</code></p>
<p>Place <code>mg-dropdown--content</code> after button element</p>
<p>Usualy, place a <code>mg-nav</code> component inside <code>mg-dropdown--content</code> to build a menu</p>


<div>
<div class="mg-dropdown" role="menu" data-toggle="htmlpreview">
<button title="choose a car" class="mg-icon-dropdown" data-toggle="dropdown">
Choose a car
</button>
<div class="mg-dropdown--content">
<div class="mg-nav">
<ul>
<li data-value="audi">Audi</li>
<li data-value="bmw">BMW</li>
<li data-value="citroen">Citroen</li>
<li data-value="ford">Ford</li>
<li data-value="honda">Honda</li>
<li data-value="jaguar">Jaguar</li>
<li data-value="land-rover">Land Rover</li>
<li data-value="mini">Mini</li>
<li data-value="nissan">Nissan</li>
<li data-value="toyota">Toyota</li>
<li data-value="volvo">Volvo</li>
</ul>
</div>
<ul class="mg-nav">
<li data-value="audi">Audi</li>
<li data-value="bmw">BMW</li>
<li data-value="citroen">Citroen</li>
<li data-value="ford">Ford</li>
<li data-value="honda">Honda</li>
<li data-value="jaguar">Jaguar</li>
<li data-value="land-rover">Land Rover</li>
<li data-value="mini">Mini</li>
<li data-value="nissan">Nissan</li>
<li data-value="toyota">Toyota</li>
<li data-value="volvo">Volvo</li>
</ul>
</div>
</div>
<div class="row">
<div class="mg-dropdown" role="menu" data-value="bmw" id="dropdown-example2">
<button title="left side" data-toggle="dropdown" class="mg-icon-dropdown">
left side
</button>
<div class="mg-dropdown--content mg-left mg-nav">
<ul>
<li data-value="audi">Audi</li>
<li data-value="bmw">BMW</li>
<li data-value="mercedes">Mercedes long! very very long!</li>
</ul>
<div>
<h3>Positioning options</h3>
<code>mg-dropdown--content</code> + <code>[mg-left|mg-right]</code>
<p>Add to <code>mg-dropdown--content</code> <code>mg-left</code> or <code>mg-right</code> to adjust left or right
content according to the button position</p>
<div class="mg-row mg-x--between" data-toggle="htmlpreview">
<div class="mg-dropdown" role="menu" data-value="bmw">
<button title="left side" data-toggle="dropdown" class="mg-icon-dropdown">
left side
</button>
<div class="mg-dropdown--content mg-left">
<ul class="mg-nav">
<li data-value="audi">Audi</li>
<li data-value="bmw">BMW</li>
<li data-value="mercedes">Mercedes long! very very long!</li>
</ul>
</div>
</div>
</div>
<div class="mg-dropdown mg-right" role="menu" data-value="bmw" id="dropdown-example3">
<button title="right side" data-toggle="dropdown" class="mg-icon-dropdown">
right side
</button>
<div class="mg-dropdown--content mg-right mg-nav">
<ul>
<li data-value="audi">Audi</li>
<li data-value="bmw">BMW</li>
<li data-value="mercedes">Mercedes long! very long!</li>
</ul>
<div class="mg-dropdown" role="menu" data-value="bmw">
<button title="right side" data-toggle="dropdown" class="mg-icon-dropdown">
right side
</button>
<div class="mg-dropdown--content mg-right">
<ul class="mg-nav">
<li data-value="audi">Audi</li>
<li data-value="bmw">BMW</li>
<li data-value="mercedes">Mercedes long! very long!</li>
</ul>
</div>
</div>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions demo/sections/form-section.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ <h2>Forms</h2>
<label class="mg-toggle">
on
<input type="checkbox" checked />
<span class="mg-icon-toggle"></span>
<span class="mg-toggle--icon"></span>
</label>
<label class="mg-toggle">
off
<input type="checkbox" checked />
<span class="mg-icon-toggle"></span>
<span class="mg-toggle--icon"></span>
</label>
</div>
<label>Checkboxes</label>
Expand Down
Loading