You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 5, 2023. It is now read-only.
shadowCSS() turns the CSS into a registerable dependency. To register it globally, you can register StyleConfiguration.shadowDOM({ sharedStyles: [css] }) in your app startup and that's also how you could expose CSS as a registerable plugin <use-shadow-dom> and @useShadowDOM is only needed for a CE don't want to follow a global setting.
For app/plugin, you can just rely on the global shadowdom setting in your webpack config or gulpfile.
When your plugin is built, the information (use shadow dom) is baked into every CE. So that your plugin will always use shadowdom regardless of the user app (which uses your plugin) global setting.
The user app might turn off shadow dom, but that only affects the user local code. The CE from your plugin will still use shadow-dom.
functionhasCustomAttribute(htmlElement: HTMLElement,prop: object): boolean{const[k,v]=Object.entries(prop)[0];constisBoolean=v===true||v===false||Object.prototype.toString.call(v)==="[object Boolean]";constisString=Object.prototype.toString.call(v)==="[object String]";if(!isBoolean&&!isString){throw"Custom attribute's type must be one of 'boolean' or 'string'.";}else{return(v===""&&htmlElement.hasAttribute(k))||v.toString()==="true";}}classCarousel{navigator: boolean|string=false;afterAttach(){consthasNavigator=hasCustomAttribute(element,{navigator: this.navigator}/* Key:Value is better that have the same name. */);}}
Or use the new set feature.
You can change from
<my-componentcounter.bind="0">
to:
@bindable({ set: Number }) counter
and simplified HTML
<my-componentcounter="0">
<el navigator> it means <el navigator="">
@bindable({set: v=>v===''||Boolean(v)})myBool
it depends on how you want your API, another example is anything is true, except false string; <my-el navigator="false">
then you should have
@bindable({set: v=>!!v&&v!=='false'})
An advanced example
functiontruthyDetector(value: unknown){constisBoolean=value===true||value===false||Object.prototype.toString.call(value)==="[object Boolean]";constisString=Object.prototype.toString.call(value)==="[object String]";if(!isBoolean&&!isString){throw"The custom attribute's type must be one of 'boolean' or 'string'.";}else{switch(value){case'true': returntrue;case'false': returnfalse;// eslint-disable-next-line @typescript-eslint/strict-boolean-expressionsdefault: return!!value;}}}
@bindable({// set: v=> truthyDetector(v),set: v=>{switch(v){case'true': returntrue;case'false': returnfalse;// eslint-disable-next-line @typescript-eslint/strict-boolean-expressionsdefault: return!!v;}},mode: BindingMode.oneTime})public fallThrough: boolean=false;
$(".dropdown-toggle").on("mouseenter",function(){// make sure it is not shown:if(!$(this).parent().hasClass("show")){$(this).click();}});$(".btn-group, .dropdown").on("mouseleave",function(){// make sure it is shown:if($(this).hasClass("show")){$(this).children('.dropdown-toggle').first().click();}});
This package should support a ToastService to make components in the runtime too.
With queue (prevent duplicates), newest on top, RTL, and progress bar support.
Support different positions Top Right, Bottom Right, Bottom Left, Top Left, Top Full Width, Bottom Full Width, Top Center, Bottom Center, Center Center
<divclass="jumbotron m-3"><h1class="display-4">Hello, world!</h1><pclass="lead">This is a simple hero unit, a simple jumbotron-style component for calling extra attention to featured content or information.</p><hrclass="my-4"><p>It uses utility classes for typography and spacing to space content out within the larger container.</p><aclass="btn btn-primary btn-lg" href="#" role="button">Learn more</a></div>
Iranianpostalcodevalidationthisissomerulesaboutthis regex:
It's all numeric10 digit countdon'tuse0inthefirst5digitdon't use 2 in postal codeFirst 4 digit is not the sameThe 5th digit cannot be 5all digits aren'tthesameThefollowingregexsatisifesyourconditions:
\b(?!(\d)\1{3})[13-9]{4}[1346-9][013-9]{5}\b
Explanation:
\b-awordboundary(?!(\d)\1{3})-negativelookaheadtomakesurethatthefirst4digitsarenotthesame.[13-9]{4}-matches4occurrencesofallthedigitsexcept0and2[1346-9]-matchesasingledigitthatisnota0,2or5[013-9]{5}-matches5occurrencesofallthedigitsexcept2
\b-awordboundary
Recipes
Debug
mode.adoptedStyleSheets
is the starting point.shadowCSS()
turns the CSS into a registerable dependency. To register it globally, you can registerStyleConfiguration.shadowDOM({ sharedStyles: [css] })
in your app startup and that's also how you could expose CSS as a registerable plugin<use-shadow-dom>
and@useShadowDOM
is only needed for a CE don't want to follow a global setting.For app/plugin, you can just rely on the global shadowdom setting in your webpack config or gulpfile.
When your plugin is built, the information (use shadow dom) is baked into every CE. So that your plugin will always use shadowdom regardless of the user app (which uses your plugin) global setting.
The user app might turn off shadow dom, but that only affects the user local code. The CE from your plugin will still use shadow-dom.
IRippleEffectConfiguration
) via DI.)Now, Any tracing-capable bundler can see that registration is either used or not used, and tree-shake it if need be, sample
We use this pattern a lot in v1.
To support the existing tag with or without value
Now we can change it a little:
Or use the new
set
feature.You can change from
to:
and simplified HTML
<el navigator>
it means<el navigator="">
it depends on how you want your API, another example is anything is true, except false string;
<my-el navigator="false">
then you should have
An advanced example
at
sm
ormd
orlg
)A11y
core
The general functionalities that we need during the project and of course can be used separately in other projects will be available in this package.
Ripple
Apply the ripple effect to HTML elements.
applyRippleEffect()
Scroll
Helps us to control scroll bars.
ScrollUp()/ScrollBottom()
bootstrap-v5-core
The whole config files that are related to Bootstrap v5 are here.
Just like
variant
and so on.bootstrap-v5
All native Bootstrap v5 components (sometimes with more features) will be included in this package.
Accordion
at-accordion
With support Multilevel Accordion Menu
Alert
at-alert
With
Count down
support.Aspect
at-aspect
Avatar
at-avatar
Badge
at-badge
Breadcrumb
at-breadcrumb
Button
at-button
With promise button support.
To feel clicking better you can add this as a config to remove outline when you are clicking.
Button Group
at-buttongroup
Button Toolbar
at-toolbar
With popover support
Card
at-card
Carousel
at-carousel
With responsive multi-items support like this
Also, support Vertical
Also, Slick
Close button
at-close
Collapse
at-collapse
And also, truncate functionality.
And With collapsible panel
Dropdown
at-dropdown
With hover support.
With tree support.
Embed
at-embed
Figures
at-figure
Support Image Hover too.
Float label
Bootstrap v5 supports floating labels but it does not look good with a very big design!
at-float or css mode
There are two different approaches to this.
Custom element. (High-order component)
Custom attribute.
Form
https://bootstrap-vue.org/docs/components/form
Support icons like this
And also spinners inside an input like this
Form Checkbox
at-checkbox
Form Color
at-color
Form Datalists
at-datalist
Form File
at-file
We should consider bs-custom-file-input too. (Supports drag & drop)
Also support Drop File style.
Form Group
at-form-group
Form Input
at-input
Form Radio
at-radio
Form Range
at-range
Form Select
at-select
Form Switch
at-switch
Form Textarea
at-textarea
Form Validation
https://v5.getbootstrap.com/docs/5.0/forms/validation/
We should support Bootstrap v5 form validation and integrate it with Aurelia 2 validation.
Image
at-image
Input Group
at-inputgroup
Layout and Grid System
https://bootstrap-vue.org/docs/components/layout
Link
https://bootstrap-vue.org/docs/components/link
List group
at-listgroup
It would be great if we support List Filter too.
Media
at-media
Modal
at-modal
This package should support a
ModalService
to make components in the runtime too.Also, it should support fullscreen,
minimize
,maximize
, and other custom buttons.Support
window.confirm()
andwindow.alert()
override settings.Nav
at-nav
Navbar
at-navbar
With support
mega-menu
in hover and clickable mode.And support multi-level menu or multi-dropdown-navbar
With also toggle animation
Pagination
at-pagination and at-pagination
With Bootstrap pagination features and abt-pagination
Popover
at-popover
An option to remove Popover arrow,
There are two different approaches to this.
Custom element.
Custom attribute.
Progress
at-progress
We should support the
gradient
.Also suport Nanobar (separate component?!) with RTL.
And also vertical mode.
We should be able to provide circular progress bar too. (separate component?!)
OffCanvas
at-sidebar or side-modals
BottomSheet
Use Bootstrap v5 Offcanvas with the below class
This can be an attribute to convert Sidebar to BottomSheet.
Spinner
at-spinner
Table
at-table
Tabs
at-tab
With support different alignments like bootstrap-tabs-x
It would be great if we support scrolling tabs too.
Toasts
at-toast
This package should support a
ToastService
to make components in the runtime too.With
queue
(prevent duplicates),newest on top
,RTL
, andprogress bar
support.Support different positions
Top Right
,Bottom Right
,Bottom Left
,Top Left
,Top Full Width
,Bottom Full Width
,Top Center
,Bottom Center
,Center Center
Tooltip
at-tooltip
An option to remove Tooltip arrow,
There are two different approaches to this.
Custom element.
Custom attribute.
Scrollspy
at-scrollspy
There are two different approaches to this.
Custom element.
Custom attribute.
bootstrap-v5-plus
Complementary and non-native components that are compatible with Bootstrap v5 are included in this package.
DateTimePicker
Use Day.js and Jalali Day.js for dates.
at-datetime
Consider this too
With support
date-range
like Date Range PickerTextbox + Popover can help to design it!
Confirmation
at-confirmation
bootstrap-confirmation.min.js => 8.62 KB
Order List
at-orderlist
Password Box
at-password or at-password
Support password-meter and delayed password masking and also bootstrap-show-password-toggle
Spinbutton
at-spin
Choice
A more complete version of
at-select
.at-choice
This works as an input tag (tokenizer) and also as an advanced select.
Should we choose Select2 and the BS5 Theme
select2.min.css => 15.9 KB
select2.min.js => 71.5 KB
select2.full.min.js => 75 KB
select2-bootstrap-5-theme.min.css => 28 KB
select2-bootstrap-5-theme.rtl.min.css => 27.9 KB
Jumbotron
at-jumbotron
Overlay
at-overlay
With this project features.
jquery-loading-overlay.min.js => 11.7 KB
Skeleton
at-skeleton
This library does not yet support
RTL
.Rating
at-rate
Toggle
An alternative of [at-switch] with a different theme.
at-toggle
Slider
A more complete version of
at-range
.at-slider
Timeline
at-timeline
Tour
at-tour
Dropzone
at-dropzone
Should we support this while we have
at-file
?Barcode
at-barcode
QR Code
at-qrcode
Switch to qrcode-generator
Cropper
at-crop
Price Table
at-price
Pick List
at-picklist
Overlay Scrollbars
at-scrollbar
Stepper
at-stepper
Action Button
at-action
ScrollUp
Use
scroll
functionalities in thecore
package.at-scrollup
We need to be able to use multi instances.
Numpad
at-numpad
Textbox + Popover can help to design it!
News Ticker
at-news
With Bootstrap v5 theme support.
News Box
at-newsbox
Convert it (
Responsive-jQuery-News-Ticker
) to vanilla js with Bootstrap v5 theme support.PropertyGrid
at-property
This should redesign with Bootstrap 5 and vanilla js.
Slide Menu
at-slidemenu
Calendar
at-calendar
It supports
Persian
viafa
locale.Drag & Drop
at-dnd
smooth-dnd.min.js => 35.3 KB
bootstrap-confirmation.min.js => 8.62 KB
Comment Box
at-comment
Poll
at-poll with statistics.
Support single and multi choices.
QueryBuilder
at-querybuilder
It should rewrite from scratch with Bootstrap 5 and vanilla js + support .NET as a server-side approach.
vanilla (A better name?!)
This section covers other components that are not necessarily related to Bootstrap and its theme.
CountUp
at-countup
Knob
at-knob
check pure-knob too.
Chart
at-chart
Photo Zoom
at-zoom
This should convert to vanilla js.
Divider
at-divider
Dom Outline
at-dom
This should redesign with vanilla js.
WYSIWYG Editor
at-htmleditor
Spreadsheet
at-spreadsheet
Splitter
at-split
Syntax Highlighter
at-highlight
Consider this implementation too.
Typed
at-typed
With support RTL direction.
custom-attributes
We will add our standalone custom attributes here.
Ripple
at-ripple
In this component we use
applyRippleEffect()
inside thecore
package.There are two different approaches to this.
Custom element. (High-order component)
Custom attribute.
Input Mask
at-mask
MaxLength
at-maxlength
Sticky
at-sticky
This will support ScrollPos-Styler and also the old
Bootstrap Affix
.Lazy
at-lazy
icons
This package should support Bootstrap Icons as a first-class citizen. Finally, we are able to complete it too.
at-icon-*
Also, we support
spin
kits. (Should be in a separate package?)at-spin-* like ng-spin-kit
services
We need some services such as:
ts-utils
Here are some useful functions that we use a lot.
persian-ts-utils
Persian utilities that are made by Typescript.
I made ts-persian-toolkit for this purpose.
ts-persian-toolkit.min.js => 6.20 KB
at-dependencies
If we have to depend on third-party JS/TS libraries we collect them in this section.
dashboard
We want to support different pre-defined layout for our users.
We want to design all possible layouts like Metronic + a blog layout
dashboard-cli
A CLI to create a different
dashboard
immediately.form-designer
An offline Electron-based application to create Aurelia-Toolbelt application with interactive (drag & drop) designer like Bootstrap Studio
Support Dynamic Form Generator (JSON Schema-based)
demo
We show here everything that has been prepared so far.
Our
e2e testing
will be based on this package.Irreplaceable jQuery-based components!
There is no good alternative for these components in vanilla js world! so we have to decide what to do about these.
The text was updated successfully, but these errors were encountered: