Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
2745161
Merge commit 'f4b839d0c80782dfb56c57abfb6f99316077459b' into feature/…
sghoweri Sep 22, 2018
b818d0d
refactor: remove old typeahead component files
sghoweri Sep 23, 2018
d091384
refactor: add new get-target-origin JavaScript helper defined and use…
sghoweri Sep 23, 2018
3df3afe
chore: remove old typeahead dependency; add new autocomplete-related …
sghoweri Sep 23, 2018
46851fb
refactor: remove old styleguide integration with the original typeahe…
sghoweri Sep 23, 2018
945e478
refactor: add refreshed and consolidated styles for the refactored se…
sghoweri Sep 23, 2018
ea20f7a
refactor: add new react-autocomplete powered web component implementa…
sghoweri Sep 23, 2018
edb9bf5
chore: wire up template integration with refactored search component;…
sghoweri Sep 23, 2018
ed0397f
refactor: update .patternlabrc config example to .patternlabrc.exampl…
sghoweri Sep 23, 2018
44130da
chore: update .patternlabrc config example with more realistic path r…
sghoweri Sep 23, 2018
6c50e42
chore: fresh uikit build post updates
sghoweri Sep 23, 2018
58616c9
refactor: slightly decrease threshold so mismatches aren't immediatel…
sghoweri Sep 23, 2018
f3e5467
fix: fixing bug with dropdown offset since original Typeahead styles …
sghoweri Sep 24, 2018
4ba426f
refactor: refactor search component to instead use react autosuggest …
sghoweri Sep 29, 2018
0b175d9
fix: fix bug with context menu not overlapping search input on smalle…
sghoweri Sep 30, 2018
2a539f5
refactor: update new <pl-search> component to better handle the clear…
sghoweri Sep 30, 2018
2d1df00
refactor: misc UI bug fixes and cleanup relating to theme / layout va…
sghoweri Sep 30, 2018
72c0168
chore: fix missing webcomponentsjs ES6 adapter import + fresh build w…
sghoweri Sep 30, 2018
caa124a
revert: undo removing hideScroll mixin from previous commit
sghoweri Sep 30, 2018
cc9bf02
fix: remove anti-pattern of removing scrollbars on accordions — preve…
sghoweri Sep 30, 2018
25c9366
fix: fix inability to previously open / close / traverse pattern lab'…
sghoweri Sep 30, 2018
6655d4d
chore: fresh front-end build post-updates
sghoweri Sep 30, 2018
c7d1cda
fix: fix scrolling issues with sidebar layout when nested nav section…
sghoweri Sep 30, 2018
9240b29
chore: rebuild front-end
sghoweri Sep 30, 2018
bc13bd2
fix: clean up and fix overflow / scrolling issues
sghoweri Sep 30, 2018
29fec05
chore: fresh uikit build
sghoweri Sep 30, 2018
ac8f7c7
Merge branch 'dev' into feature/uikit-refactor-p6--search-component
bolt-bot Oct 27, 2018
95a4e71
fix: workaround to address the pl-search autocomplete not displaying …
bolt-bot Oct 27, 2018
fd7f2ea
fix: fix typo with CSS var in mixin
bolt-bot Oct 27, 2018
3ebc106
refactor: update viewport to support notched devices
bolt-bot Oct 27, 2018
af2b0c9
chore: move pl-layout Sass import to main Sass file — loading these p…
bolt-bot Oct 27, 2018
d66014a
refactor: refactor and simplify modal UI + squash cross browser layou…
bolt-bot Oct 27, 2018
e1d87ff
refactor: cross browser layout + overall UI bug fixes
bolt-bot Oct 27, 2018
e7cbb5f
refactor: major cleanup + simplification of tabs and panel UI styles …
bolt-bot Oct 27, 2018
6f44139
refactor: add iframe resizer JS to scripts loaded inside the Pattern …
bolt-bot Oct 27, 2018
c46fd2e
chore: fresh build post updates
bolt-bot Oct 27, 2018
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
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// .rc config file allowing users to customize folder locations, etc that are wired up to be configurable in the build process (via cosmic config) -- this example lives in the root of UIKit however can live in a higher-level parent as part of your project's config!

module.exports = {
// buildDir: '../../../www/pattern-lab',
// buildDir: __dirname + '/www/pattern-lab',
}
27 changes: 18 additions & 9 deletions packages/uikit-workshop/dist/index.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
<!DOCTYPE html>
<html>
<html class="pl-c-html">

<head>
<title id="title">Pattern Lab</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width" />
<meta name="viewport" content="initial-scale=1, width=device-width, viewport-fit=cover">
<meta name="theme-color" content="#ababab" />

<link rel="stylesheet" href="styleguide/css/pattern-lab.css" media="all" />

</head>
Expand All @@ -20,7 +19,13 @@

<nav class="pl-c-nav pl-js-nav-target pl-js-nav-container" role="navigation">

<input class="pl-c-typeahead pl-js-typeahead" id="typeahead" type="text" placeholder="Find Pattern" />
<!--
@todo: as a next step, implement <pl-search> as a customizable slot in the new <pl-header> for customization via available props

Example of always hiding the search's clear button
<pl-search max-results="10" placeholder="Find a Pattern" hide-clear-button></pl-search>
-->
<pl-search max-results="10" placeholder="Find a Pattern"></pl-search>

<ol class="pl-c-nav__list pl-js-pattern-nav-target">
<!-- pattern lab nav will be inserted here -->
Expand Down Expand Up @@ -77,16 +82,20 @@
<div class="pl-c-modal__toolbar">
<div class="pl-c-modal__resizer pl-js-modal-resizer"></div>
<div class="pl-c-modal__toolbar-controls">
<!-- @todo: revisit to see if slotted content might make sense here (ex. to have an extra toggle for switching the layout -->
<pl-toggle-layout></pl-toggle-layout>

<button class="pl-c-modal__close-btn pl-js-modal-close-btn" title="Hide pattern info">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="12" height="12" viewBox="0 0 12 12" class="pl-c-modal__close-btn-icon">
<title>Close</title>
<path fill="currentColor" d="M11.8905,9.6405 L11.8905,9.6405 L8.25,6 L11.8905,2.3595 L11.8905,2.3595 C11.9295,2.3205 11.958,2.27475 11.976,2.226 C12.0255,2.0925 11.997,1.9365 11.8905,1.82925 L10.17075,0.1095 C10.0635,0.00225 9.9075,-0.02625 9.774,0.024 C9.72525,0.042 9.6795,0.0705 9.6405,0.1095 L9.6405,0.1095 L6,3.75 L2.3595,0.1095 L2.3595,0.1095 C2.3205,0.0705 2.27475,0.042 2.226,0.024 C2.0925,-0.0255 1.9365,0.00225 1.82925,0.1095 L0.1095,1.82925 C0.00225,1.9365 -0.02625,2.0925 0.024,2.226 C0.042,2.27475 0.0705,2.3205 0.1095,2.3595 L0.1095,2.3595 L3.75,6 L0.1095,9.6405 L0.1095,9.6405 C0.0705,9.6795 0.042,9.72525 0.024,9.774 C-0.0255,9.9075 0.00225,10.0635 0.1095,10.17075 L1.82925,11.8905 C1.9365,11.99775 2.0925,12.02625 2.226,11.976 C2.27475,11.958 2.3205,11.9295 2.3595,11.8905 L2.3595,11.8905 L6,8.25 L9.6405,11.8905 L9.6405,11.8905 C9.6795,11.9295 9.72525,11.958 9.774,11.976 C9.9075,12.0255 10.0635,11.99775 10.17075,11.8905 L11.8905,10.17075 C11.99775,10.0635 12.02625,9.9075 11.976,9.774 C11.958,9.72525 11.9295,9.6795 11.8905,9.6405 L11.8905,9.6405 Z"></path>
</svg>
</button>
<pl-toggle-layout></pl-toggle-layout>
</div>
</div>
<div class="pl-c-modal__content pl-js-modal-content"></div>
<div class="pl-c-modal__content-wrapper">
<div class="pl-c-modal__content pl-js-modal-content"></div>
</div>
</div>

</div>
Expand All @@ -97,16 +106,16 @@
{{# patternTypes }}
<li class="pl-c-nav__item pl-c-nav__item--{{ patternTypeLC }}">

<a class="pl-c-nav__link pl-c-nav__link--dropdown pl-js-acc-handle" tabindex="0" role="tab" aria-controls="{{ patternTypeLC }}">{{ patternTypeUC }}</a>
<button class="pl-c-nav__link pl-c-nav__link--dropdown pl-js-acc-handle" role="tab" aria-controls="{{ patternTypeLC }}">{{ patternTypeUC }}</button>

<ol class="pl-c-nav__sublist pl-c-nav__sublist--dropdown pl-js-acc-panel" id="{{ patternTypeLC }}">

{{# patternTypeItems }}
<li class="pl-c-nav__item pl-c-nav__item--{{ patternSubtypeLC }}">

<a class="pl-c-nav__link pl-c-nav__link--dropdown pl-js-acc-handle">{{ patternSubtypeUC }}</a>
<button class="pl-c-nav__link pl-c-nav__link--dropdown pl-js-acc-handle" aria-controls="{{ patternSubtypeUC }}" role="tab">{{ patternSubtypeUC }}</button>

<ol class="pl-c-nav__subsublist pl-c-nav__subsublist--dropdown pl-js-acc-panel">
<ol id="{{ patternSubtypeUC }}" class="pl-c-nav__subsublist pl-c-nav__subsublist--dropdown pl-js-acc-panel">

{{# patternSubtypeItems }}
<li class="pl-c-nav__item">
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

1,629 changes: 1,424 additions & 205 deletions packages/uikit-workshop/dist/styleguide/js/patternlab-viewer.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

This file was deleted.

This file was deleted.

7 changes: 6 additions & 1 deletion packages/uikit-workshop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@
"node": ">=10.0"
},
"dependencies": {
"@reach/visually-hidden": "^0.1.1",
"react-html-parser": "^2.0.2",
"fuse.js": "^3.2.1",
"react-autosuggest": "^9.4.2",
"classnames": "^2.2.6",
"react-animate-height": "^2.0.4",
"@skatejs/renderer-preact": "^0.3.3",
Expand All @@ -86,6 +90,7 @@
"fg-loadcss": "^2.0.1",
"fg-loadjs": "^1.0.0",
"hogan.js": "^3.0.2",
"iframe-resizer": "^3.6.2",
"jquery": "^3.3.1",
"js-cookie": "^2.2.0",
"jshint": "^2.9.5",
Expand All @@ -96,12 +101,12 @@
"prismjs": "^1.15.0",
"pwa-helpers": "^0.8.3",
"redux-thunk": "^2.3.0",
"react-animate-height": "^2.0.4",
"redux": "^4.0.0",
"reselect": "^3.0.1",
"scriptjs": "^2.5.8",
"scroll-js": "^1.9.1",
"skatejs": "^5.2.4",
"typeahead.js": "^0.11.1",
"whendefined": "^0.0.1",
"wolfy87-eventemitter": "^5.2.4"
}
Expand Down
Binary file added packages/uikit-workshop/src/favicon.ico
Binary file not shown.
5 changes: 2 additions & 3 deletions packages/uikit-workshop/src/html/index.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
<!DOCTYPE html>
<html>
<html class="pl-c-html">

<head>
<title id="title">Pattern Lab</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width" />
<meta name="viewport" content="initial-scale=1, width=device-width, viewport-fit=cover">
<meta name="theme-color" content="#ababab" />

<link rel="stylesheet" href="styleguide/css/pattern-lab.css" media="all" />

</head>
Expand Down
8 changes: 7 additions & 1 deletion packages/uikit-workshop/src/html/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@

<nav class="pl-c-nav pl-js-nav-target pl-js-nav-container" role="navigation">

<input class="pl-c-typeahead pl-js-typeahead" id="typeahead" type="text" placeholder="Find Pattern" />
<!--
@todo: as a next step, implement <pl-search> as a customizable slot in the new <pl-header> for customization via available props

Example of always hiding the search's clear button
<pl-search max-results="10" placeholder="Find a Pattern" hide-clear-button></pl-search>
-->
<pl-search max-results="10" placeholder="Find a Pattern"></pl-search>

<ol class="pl-c-nav__list pl-js-pattern-nav-target">
<!-- pattern lab nav will be inserted here -->
Expand Down
8 changes: 6 additions & 2 deletions packages/uikit-workshop/src/html/partials/modal.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,18 @@
<div class="pl-c-modal__toolbar">
<div class="pl-c-modal__resizer pl-js-modal-resizer"></div>
<div class="pl-c-modal__toolbar-controls">
<!-- @todo: revisit to see if slotted content might make sense here (ex. to have an extra toggle for switching the layout -->
<pl-toggle-layout></pl-toggle-layout>

<button class="pl-c-modal__close-btn pl-js-modal-close-btn" title="Hide pattern info">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="12" height="12" viewBox="0 0 12 12" class="pl-c-modal__close-btn-icon">
<title>Close</title>
<path fill="currentColor" d="M11.8905,9.6405 L11.8905,9.6405 L8.25,6 L11.8905,2.3595 L11.8905,2.3595 C11.9295,2.3205 11.958,2.27475 11.976,2.226 C12.0255,2.0925 11.997,1.9365 11.8905,1.82925 L10.17075,0.1095 C10.0635,0.00225 9.9075,-0.02625 9.774,0.024 C9.72525,0.042 9.6795,0.0705 9.6405,0.1095 L9.6405,0.1095 L6,3.75 L2.3595,0.1095 L2.3595,0.1095 C2.3205,0.0705 2.27475,0.042 2.226,0.024 C2.0925,-0.0255 1.9365,0.00225 1.82925,0.1095 L0.1095,1.82925 C0.00225,1.9365 -0.02625,2.0925 0.024,2.226 C0.042,2.27475 0.0705,2.3205 0.1095,2.3595 L0.1095,2.3595 L3.75,6 L0.1095,9.6405 L0.1095,9.6405 C0.0705,9.6795 0.042,9.72525 0.024,9.774 C-0.0255,9.9075 0.00225,10.0635 0.1095,10.17075 L1.82925,11.8905 C1.9365,11.99775 2.0925,12.02625 2.226,11.976 C2.27475,11.958 2.3205,11.9295 2.3595,11.8905 L2.3595,11.8905 L6,8.25 L9.6405,11.8905 L9.6405,11.8905 C9.6795,11.9295 9.72525,11.958 9.774,11.976 C9.9075,12.0255 10.0635,11.99775 10.17075,11.8905 L11.8905,10.17075 C11.99775,10.0635 12.02625,9.9075 11.976,9.774 C11.958,9.72525 11.9295,9.6795 11.8905,9.6405 L11.8905,9.6405 Z"></path>
</svg>
</button>
<pl-toggle-layout></pl-toggle-layout>
</div>
</div>
<div class="pl-c-modal__content pl-js-modal-content"></div>
<div class="pl-c-modal__content-wrapper">
<div class="pl-c-modal__content pl-js-modal-content"></div>
</div>
</div>
6 changes: 3 additions & 3 deletions packages/uikit-workshop/src/html/partials/pattern-nav.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{{# patternTypes }}
<li class="pl-c-nav__item pl-c-nav__item--{{ patternTypeLC }}">

<a class="pl-c-nav__link pl-c-nav__link--dropdown pl-js-acc-handle" tabindex="0" role="tab" aria-controls="{{ patternTypeLC }}">{{ patternTypeUC }}</a>
<button class="pl-c-nav__link pl-c-nav__link--dropdown pl-js-acc-handle" role="tab" aria-controls="{{ patternTypeLC }}">{{ patternTypeUC }}</button>

<ol class="pl-c-nav__sublist pl-c-nav__sublist--dropdown pl-js-acc-panel" id="{{ patternTypeLC }}">

{{# patternTypeItems }}
<li class="pl-c-nav__item pl-c-nav__item--{{ patternSubtypeLC }}">

<a class="pl-c-nav__link pl-c-nav__link--dropdown pl-js-acc-handle">{{ patternSubtypeUC }}</a>
<button class="pl-c-nav__link pl-c-nav__link--dropdown pl-js-acc-handle" aria-controls="{{ patternSubtypeUC }}" role="tab">{{ patternSubtypeUC }}</button>

<ol class="pl-c-nav__subsublist pl-c-nav__subsublist--dropdown pl-js-acc-panel">
<ol id="{{ patternSubtypeUC }}" class="pl-c-nav__subsublist pl-c-nav__subsublist--dropdown pl-js-acc-panel">

{{# patternSubtypeItems }}
<li class="pl-c-nav__item">
Expand Down
3 changes: 2 additions & 1 deletion packages/uikit-workshop/src/sass/pattern-lab.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
/*------------------------------------*\
#VENDOR
\*------------------------------------*/
@import 'scss/03-vendor/typeahead';
@import 'scss/03-vendor/prism';

/*------------------------------------*\
Expand All @@ -48,6 +47,8 @@
/**
* Pattern Lab Header
*/
@import '../scripts/components/pl-search/pl-search.scss';
@import '../scripts/components/pl-layout/pl-layout.scss';
@import 'scss/04-components/header';
@import 'scss/04-components/logo';
@import 'scss/04-components/navigation';
Expand Down
39 changes: 24 additions & 15 deletions packages/uikit-workshop/src/sass/scss/01-abstracts/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
transition: background-color $pl-animate-quick ease-out,
color $pl-animate-quick ease-out;
cursor: pointer;
outline-offset: -3px;
outline-width: 2px;

&:hover {
color: $pl-color-white;
Expand All @@ -57,6 +59,15 @@
.pl-c-body--theme-light & {
background-color: $pl-color-white;
color: $pl-color-gray-70;

&:hover {
background-color: $pl-color-gray-07;
}

&:active,
&:focus {
background-color: $pl-color-gray-13;
}
}

/**
Expand Down Expand Up @@ -85,24 +96,22 @@
transition: max-height $pl-animate-quick ease-out;

/**
* Active is when accordion panel is open
*/
* Active styles for when the accordion panel is open
* 1. WIP -- part of broader UI refactor
*/
&.pl-is-active {
max-height: none;
max-height: calc(100vh - #{$offset-top} - 1rem);
max-height: calc(
var(--pl-viewport-height, calc(100vh - #{$offset-top})) - 1rem
); /* [1] */
overflow: auto;
@include hideScrollBar();

@media all and (min-width: $pl-bp-med) {
max-height: 120rem;
// WIP -- part of broader UI refactor
max-height: calc(var(--pl-viewport-height) - 1rem, 120rem);
}
-webkit-overflow-scrolling: touch;
}
}

@mixin noSelect(){
-webkit-user-select: none; /* Chrome all / Safari all */
-moz-user-select: none; /* Firefox all */
-ms-user-select: none; /* IE 10+ */
user-select: none; /* Likely future */
@mixin noSelect() {
-webkit-user-select: none; /* Chrome all / Safari all */
-moz-user-select: none; /* Firefox all */
-ms-user-select: none; /* IE 10+ */
user-select: none; /* Likely future */
}
8 changes: 5 additions & 3 deletions packages/uikit-workshop/src/sass/scss/02-base/_body.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@
* 1) These exist indepenedent of any project-specific styles
* 2) Styled as IDs to avoid collisions with user <body> tag
*/
.pl-c-html {
min-height: 100%;
}

.pl-c-body {
margin: 0;
padding: 0;
-webkit-text-size-adjust: 100%;
display: flex;
flex-direction: column;
height: 100vh;
display: flex; // Required for IE 11 to display overall PL layout correctly
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ pre[class*='language-'] {
word-spacing: normal;
word-break: normal;
line-height: 1.5;
word-wrap: normal; // fixes issue in Safari where code blocks can't scroll due to the code breaking into multiple lines unexpectedly

-moz-tab-size: 4;
-o-tab-size: 4;
Expand Down
94 changes: 0 additions & 94 deletions packages/uikit-workshop/src/sass/scss/03-vendor/_typeahead.scss

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@
color: $pl-color-gray-50;
font-family: $pl-font;
font-size: $pl-font-size-sm;
min-height: 30px; // magic number -- needed for initial skeleton screen styles used in the critical CSS

@supports(padding: max(0px)) {
padding-left: env(safe-area-inset-left);
padding-right: env(safe-area-inset-right);
}
}

/**
Expand Down
Loading