├── src
├── scss
│ ├── _preflight.scss
│ ├── components
│ │ ├── _tooltip.scss
│ │ ├── _pagination.scss
│ │ ├── _collapse.scss
│ │ ├── _card.scss
│ │ ├── _upload.scss
│ │ ├── _list.scss
│ │ ├── _tab.scss
│ │ ├── _treeview.scss
│ │ ├── _toggle.scss
│ │ ├── _dropdown.scss
│ │ ├── _modal.scss
│ │ ├── _toast.scss
│ │ ├── _select.scss
│ │ ├── _button.scss
│ │ └── _form.scss
│ ├── _utilities.scss
│ ├── _components.scss
│ └── proton.scss
├── components
│ ├── Img
│ │ ├── index.js
│ │ └── Img.vue
│ ├── Card
│ │ ├── index.js
│ │ └── Card.vue
│ ├── Slug
│ │ ├── index.js
│ │ └── Slug.vue
│ ├── Chart
│ │ ├── index.js
│ │ └── Chart.vue
│ ├── Input
│ │ ├── index.js
│ │ └── Input.vue
│ ├── Modal
│ │ ├── index.js
│ │ └── Modal.vue
│ ├── Toast
│ │ ├── index.js
│ │ └── Toast.vue
│ ├── Banner
│ │ ├── index.js
│ │ └── Banner.vue
│ ├── Button
│ │ ├── index.js
│ │ └── Button.vue
│ ├── Loader
│ │ ├── index.js
│ │ └── Loader.vue
│ ├── Number
│ │ ├── index.js
│ │ └── Number.vue
│ ├── Toggle
│ │ ├── index.js
│ │ └── Toggle.vue
│ ├── Upload
│ │ ├── index.js
│ │ └── Upload.vue
│ ├── Tooltip
│ │ ├── index.js
│ │ └── Tooltip.vue
│ ├── Collapse
│ │ ├── index.js
│ │ └── Collapse.vue
│ ├── Password
│ │ ├── index.js
│ │ └── Password.vue
│ ├── Textarea
│ │ ├── index.js
│ │ └── Textarea.vue
│ ├── Datatable
│ │ ├── index.js
│ │ └── Datatable.vue
│ ├── Pagination
│ │ ├── index.js
│ │ └── Pagination.vue
│ ├── Tags
│ │ ├── index.js
│ │ └── RenderlessTags.vue
│ ├── Autocomplete
│ │ ├── index.js
│ │ └── RenderlessAutocomplete.vue
│ ├── Tabs
│ │ ├── index.js
│ │ ├── Tab.vue
│ │ └── Tabs.vue
│ ├── Select
│ │ ├── index.js
│ │ ├── Option.vue
│ │ └── Select.vue
│ ├── Dropdown
│ │ ├── index.js
│ │ ├── DropdownItem.vue
│ │ └── Dropdown.vue
│ ├── Treeview
│ │ ├── index.js
│ │ ├── Treeview.vue
│ │ └── TreeviewNode.vue
│ ├── Checkbox
│ │ ├── index.js
│ │ ├── CheckboxGroup.vue
│ │ └── Checkbox.vue
│ ├── Sortable
│ │ ├── SortableItem.vue
│ │ ├── SortableHandle.vue
│ │ ├── index.js
│ │ └── SortableList.vue
│ ├── Radio
│ │ ├── index.js
│ │ ├── RadioGroup.vue
│ │ ├── Radio.vue
│ │ └── RenderlessRadio.vue
│ └── index.js
├── directives
│ ├── modal
│ │ ├── index.js
│ │ └── v-modal.js
│ ├── toast
│ │ ├── index.js
│ │ └── v-toast.js
│ ├── collapse
│ │ ├── index.js
│ │ └── v-collapse.js
│ ├── tooltip
│ │ ├── index.js
│ │ └── v-tooltip.js
│ ├── click-outside
│ │ ├── index.js
│ │ └── v-click-outside.js
│ └── index.js
├── support
│ └── eventbus.js
├── index.js
└── mixins
│ └── stackable.js
├── .gitignore
├── mix-manifest.json
├── webpack.mix.js
├── README.md
├── LICENSE
└── package.json
/src/scss/_preflight.scss:
--------------------------------------------------------------------------------
1 | @tailwind preflight;
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /docs/node_modules/
2 | /node_modules/
3 | .DS_Store
4 | *.log
--------------------------------------------------------------------------------
/mix-manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "/dist/proton.js": "/dist/proton.js"
3 | }
4 |
--------------------------------------------------------------------------------
/src/components/Img/index.js:
--------------------------------------------------------------------------------
1 | import ImgComponent from './Img'
2 |
3 | export default Vue => {
4 | Vue.component(ImgComponent.name, ImgComponent)
5 | }
--------------------------------------------------------------------------------
/src/components/Card/index.js:
--------------------------------------------------------------------------------
1 | import CardComponent from './Card'
2 |
3 | export default Vue => {
4 | Vue.component(CardComponent.name, CardComponent)
5 | }
--------------------------------------------------------------------------------
/src/components/Slug/index.js:
--------------------------------------------------------------------------------
1 | import SlugComponent from './Slug'
2 |
3 | export default Vue => {
4 | Vue.component(SlugComponent.name, SlugComponent)
5 | }
--------------------------------------------------------------------------------
/src/components/Chart/index.js:
--------------------------------------------------------------------------------
1 | import ChartComponent from './Chart'
2 |
3 | export default Vue => {
4 | Vue.component(ChartComponent.name, ChartComponent)
5 | }
--------------------------------------------------------------------------------
/src/components/Input/index.js:
--------------------------------------------------------------------------------
1 | import InputComponent from './Input'
2 |
3 | export default Vue => {
4 | Vue.component(InputComponent.name, InputComponent)
5 | }
--------------------------------------------------------------------------------
/src/components/Modal/index.js:
--------------------------------------------------------------------------------
1 | import ModalComponent from './Modal'
2 |
3 | export default Vue => {
4 | Vue.component(ModalComponent.name, ModalComponent)
5 | }
--------------------------------------------------------------------------------
/src/components/Toast/index.js:
--------------------------------------------------------------------------------
1 | import ToastComponent from './Toast'
2 |
3 | export default Vue => {
4 | Vue.component(ToastComponent.name, ToastComponent)
5 | }
--------------------------------------------------------------------------------
/src/components/Banner/index.js:
--------------------------------------------------------------------------------
1 | import BannerComponent from './Banner'
2 |
3 | export default Vue => {
4 | Vue.component(BannerComponent.name, BannerComponent)
5 | }
--------------------------------------------------------------------------------
/src/components/Button/index.js:
--------------------------------------------------------------------------------
1 | import ButtonComponent from './Button'
2 |
3 | export default Vue => {
4 | Vue.component(ButtonComponent.name, ButtonComponent)
5 | }
--------------------------------------------------------------------------------
/src/components/Loader/index.js:
--------------------------------------------------------------------------------
1 | import LoaderComponent from './Loader'
2 |
3 | export default Vue => {
4 | Vue.component(LoaderComponent.name, LoaderComponent)
5 | }
--------------------------------------------------------------------------------
/src/components/Number/index.js:
--------------------------------------------------------------------------------
1 | import NumberComponent from './Number'
2 |
3 | export default Vue => {
4 | Vue.component(NumberComponent.name, NumberComponent)
5 | }
--------------------------------------------------------------------------------
/src/components/Toggle/index.js:
--------------------------------------------------------------------------------
1 | import ToggleComponent from './Toggle'
2 |
3 | export default Vue => {
4 | Vue.component(ToggleComponent.name, ToggleComponent)
5 | }
--------------------------------------------------------------------------------
/src/components/Upload/index.js:
--------------------------------------------------------------------------------
1 | import UploadComponent from './Upload'
2 |
3 | export default Vue => {
4 | Vue.component(UploadComponent.name, UploadComponent)
5 | }
--------------------------------------------------------------------------------
/src/components/Tooltip/index.js:
--------------------------------------------------------------------------------
1 | import TooltipComponent from './Tooltip'
2 |
3 | export default Vue => {
4 | Vue.component(TooltipComponent.name, TooltipComponent)
5 | }
--------------------------------------------------------------------------------
/src/components/Collapse/index.js:
--------------------------------------------------------------------------------
1 | import CollapseComponent from './Collapse'
2 |
3 | export default Vue => {
4 | Vue.component(CollapseComponent.name, CollapseComponent)
5 | }
--------------------------------------------------------------------------------
/src/components/Password/index.js:
--------------------------------------------------------------------------------
1 | import PasswordComponent from './Password'
2 |
3 | export default Vue => {
4 | Vue.component(PasswordComponent.name, PasswordComponent)
5 | }
--------------------------------------------------------------------------------
/src/components/Textarea/index.js:
--------------------------------------------------------------------------------
1 | import TextareaComponent from './Textarea'
2 |
3 | export default Vue => {
4 | Vue.component(TextareaComponent.name, TextareaComponent)
5 | }
--------------------------------------------------------------------------------
/src/components/Datatable/index.js:
--------------------------------------------------------------------------------
1 | import DatatableComponent from './Datatable'
2 |
3 | export default Vue => {
4 | Vue.component(DatatableComponent.name, DatatableComponent)
5 | }
--------------------------------------------------------------------------------
/src/components/Pagination/index.js:
--------------------------------------------------------------------------------
1 | import PaginationComponent from './Pagination'
2 |
3 | export default Vue => {
4 | Vue.component(PaginationComponent.name, PaginationComponent)
5 | }
--------------------------------------------------------------------------------
/src/scss/components/_tooltip.scss:
--------------------------------------------------------------------------------
1 | .tooltip {
2 | @apply .bg-black .text-white .px-3 .rounded .text-sm .shadow-lg .z-50;
3 |
4 | &-inner {
5 | @apply .p-1;
6 | }
7 | }
--------------------------------------------------------------------------------
/webpack.mix.js:
--------------------------------------------------------------------------------
1 | let mix = require('laravel-mix')
2 |
3 | mix.js('src/index.js', 'dist/proton.js')
4 |
5 | mix.webpackConfig({
6 | output: {
7 | libraryTarget: 'umd'
8 | }
9 | })
--------------------------------------------------------------------------------
/src/components/Tags/index.js:
--------------------------------------------------------------------------------
1 | import RenderlessTagsComponent from './RenderlessTags'
2 |
3 | export default Vue => {
4 | Vue.component(RenderlessTagsComponent.name, RenderlessTagsComponent)
5 | }
--------------------------------------------------------------------------------
/src/components/Autocomplete/index.js:
--------------------------------------------------------------------------------
1 | import RenderlessAutocompleteComponent from './RenderlessAutocomplete'
2 |
3 | export default Vue => {
4 | Vue.component(RenderlessAutocompleteComponent.name, RenderlessAutocompleteComponent)
5 | }
--------------------------------------------------------------------------------
/src/directives/modal/index.js:
--------------------------------------------------------------------------------
1 | import directive from './v-modal'
2 |
3 | const Plugin = {
4 | install(Vue) {
5 | Vue.directive('modal', directive)
6 | },
7 | directive,
8 | }
9 |
10 | export default Plugin
--------------------------------------------------------------------------------
/src/directives/toast/index.js:
--------------------------------------------------------------------------------
1 | import directive from './v-toast'
2 |
3 | const Plugin = {
4 | install(Vue) {
5 | Vue.directive('toast', directive)
6 | },
7 | directive,
8 | }
9 |
10 | export default Plugin
--------------------------------------------------------------------------------
/src/directives/collapse/index.js:
--------------------------------------------------------------------------------
1 | import directive from './v-collapse'
2 |
3 | const Plugin = {
4 | install(Vue) {
5 | Vue.directive('collapse', directive)
6 | },
7 | directive,
8 | }
9 |
10 | export default Plugin
--------------------------------------------------------------------------------
/src/directives/tooltip/index.js:
--------------------------------------------------------------------------------
1 | import directive from './v-tooltip'
2 |
3 | const Plugin = {
4 | install(Vue) {
5 | Vue.directive('tooltip', directive)
6 | },
7 | directive,
8 | }
9 |
10 | export default Plugin
--------------------------------------------------------------------------------
/src/components/Tabs/index.js:
--------------------------------------------------------------------------------
1 | import TabComponent from './Tab'
2 | import TabsComponent from './Tabs'
3 |
4 | export default Vue => {
5 | Vue.component(TabsComponent.name, TabsComponent)
6 | Vue.component(TabComponent.name, TabComponent)
7 | }
--------------------------------------------------------------------------------
/src/directives/click-outside/index.js:
--------------------------------------------------------------------------------
1 | import directive from './v-click-outside'
2 |
3 | const Plugin = {
4 | install(Vue) {
5 | Vue.directive('click-outside', directive)
6 | },
7 | directive,
8 | }
9 |
10 | export default Plugin
--------------------------------------------------------------------------------
/src/components/Select/index.js:
--------------------------------------------------------------------------------
1 | import SelectComponent from './Select'
2 | import OptionComponent from './Option'
3 |
4 | export default Vue => {
5 | Vue.component(SelectComponent.name, SelectComponent)
6 | Vue.component(OptionComponent.name, OptionComponent)
7 | }
--------------------------------------------------------------------------------
/src/directives/index.js:
--------------------------------------------------------------------------------
1 | export { default as vClickOutside } from './click-outside'
2 | export { default as vCollapse } from './collapse'
3 | export { default as vModal } from './modal'
4 | export { default as vToast } from './toast'
5 | export { default as vTooltip } from './tooltip'
--------------------------------------------------------------------------------
/src/components/Dropdown/index.js:
--------------------------------------------------------------------------------
1 | import DropdownComponent from './Dropdown'
2 | import DropdownItemComponent from './DropdownItem'
3 |
4 | export default Vue => {
5 | Vue.component(DropdownComponent.name, DropdownComponent)
6 | Vue.component(DropdownItemComponent.name, DropdownItemComponent)
7 | }
--------------------------------------------------------------------------------
/src/components/Treeview/index.js:
--------------------------------------------------------------------------------
1 | import TreeviewComponent from './Treeview'
2 | import TreeviewNodeComponent from './TreeviewNode'
3 |
4 | export default Vue => {
5 | Vue.component(TreeviewComponent.name, TreeviewComponent)
6 | Vue.component(TreeviewNodeComponent.name, TreeviewNodeComponent)
7 | }
--------------------------------------------------------------------------------
/src/scss/components/_pagination.scss:
--------------------------------------------------------------------------------
1 | .pagination {
2 | @apply .list-reset;
3 |
4 | &--item {
5 | @apply .inline-flex;
6 | }
7 |
8 | .active {
9 | @apply .bg-black .text-white;
10 | }
11 |
12 | button {
13 | @apply .button--small;
14 | }
15 | }
--------------------------------------------------------------------------------
/src/components/Checkbox/index.js:
--------------------------------------------------------------------------------
1 | import CheckboxComponent from './Checkbox'
2 | import CheckboxGroupComponent from './CheckboxGroup'
3 |
4 | export default Vue => {
5 | Vue.component(CheckboxComponent.name, CheckboxComponent)
6 | Vue.component(CheckboxGroupComponent.name, CheckboxGroupComponent)
7 | }
--------------------------------------------------------------------------------
/src/support/eventbus.js:
--------------------------------------------------------------------------------
1 | let EventBusPlugin = {}
2 |
3 | EventBusPlugin.install = function(Vue) {
4 | let EventBus = new Vue
5 |
6 | Object.defineProperty(Vue.prototype, '$proton', {
7 | get() {
8 | return EventBus
9 | },
10 | })
11 | }
12 |
13 | export default EventBusPlugin
--------------------------------------------------------------------------------
/src/directives/collapse/v-collapse.js:
--------------------------------------------------------------------------------
1 | function bind(el, binding, vnode) {
2 | el.addEventListener('click', (e) => {
3 | vnode.context.$proton.$emit('toggle-collapse-' + binding.arg)
4 | })
5 | }
6 |
7 | const directive = {
8 | bind
9 | }
10 |
11 | export default (typeof window !== 'undefined' ? directive : {})
--------------------------------------------------------------------------------
/src/directives/tooltip/v-tooltip.js:
--------------------------------------------------------------------------------
1 | import Tooltip from 'tooltip.js'
2 |
3 | function bind(el, binding) {
4 | new Tooltip(el, {
5 | placement: binding.arg || 'top',
6 | title: binding.value,
7 | html: true,
8 | })
9 | }
10 |
11 | const directive = {
12 | bind
13 | }
14 |
15 | export default (typeof window !== 'undefined' ? directive : {})
--------------------------------------------------------------------------------
/src/components/Sortable/SortableItem.vue:
--------------------------------------------------------------------------------
1 |
16 |
--------------------------------------------------------------------------------
/src/directives/modal/v-modal.js:
--------------------------------------------------------------------------------
1 | import EventBus from '../../support/eventbus'
2 |
3 | function bind(el, binding, vnode) {
4 | el.addEventListener('click', (e) => {
5 | vnode.context.$proton.$emit('toggle-modal-' + binding.arg, binding.value)
6 | })
7 | }
8 |
9 | const directive = {
10 | bind
11 | }
12 |
13 | export default (typeof window !== 'undefined' ? directive : {})
--------------------------------------------------------------------------------
/src/components/Sortable/SortableHandle.vue:
--------------------------------------------------------------------------------
1 |
16 |
--------------------------------------------------------------------------------
/src/components/Radio/index.js:
--------------------------------------------------------------------------------
1 | import RadioComponent from './Radio'
2 | import RadioGroupComponent from './RadioGroup'
3 | import RenderlessRadioComponent from './RenderlessRadio'
4 |
5 | export default Vue => {
6 | Vue.component(RadioComponent.name, RadioComponent)
7 | Vue.component(RadioGroupComponent.name, RadioGroupComponent)
8 | Vue.component(RenderlessRadioComponent.name, RenderlessRadioComponent)
9 | }
--------------------------------------------------------------------------------
/src/directives/toast/v-toast.js:
--------------------------------------------------------------------------------
1 | import EventBus from '../../support/eventbus'
2 |
3 | function bind(el, binding, vnode) {
4 | el.addEventListener('click', (e) => {
5 | vnode.context.$proton.$emit('toast', { level: (binding.arg || 'default'), message: binding.value })
6 | })
7 | }
8 |
9 | const directive = {
10 | bind
11 | }
12 |
13 | export default (typeof window !== 'undefined' ? directive : {})
--------------------------------------------------------------------------------
/src/scss/components/_collapse.scss:
--------------------------------------------------------------------------------
1 | .smooth-enter-active, .smooth-leave-active {
2 | transition: max-height .5s;
3 | }
4 |
5 | .smooth-enter, .smooth-leave-to {
6 | max-height: 0;
7 | }
8 |
9 | .collapse {
10 | display: none;
11 | &.in {
12 | display: block;
13 | }
14 | }
15 | .collapsing {
16 | position: relative;
17 | height: 0;
18 | overflow: hidden;
19 | transition: height .377s ease;
20 | }
--------------------------------------------------------------------------------
/src/components/Sortable/index.js:
--------------------------------------------------------------------------------
1 | import SortableHandleComponent from './SortableHandle'
2 | import SortableItemComponent from './SortableItem'
3 | import SortableListComponent from './SortableList'
4 |
5 | export default Vue => {
6 | Vue.component(SortableHandleComponent.name, SortableHandleComponent)
7 | Vue.component(SortableItemComponent.name, SortableItemComponent)
8 | Vue.component(SortableListComponent.name, SortableListComponent)
9 | }
--------------------------------------------------------------------------------
/src/scss/_utilities.scss:
--------------------------------------------------------------------------------
1 | @tailwind utilities;
2 |
3 | /**
4 | * Here you would add any custom utilities you need that don't come out of the
5 | * box with Tailwind.
6 | *
7 | * Example :
8 | *
9 | * .bg-pattern-graph-paper { ... }
10 | * .skew-45 { ... }
11 | *
12 | * Or if using a preprocessor or `postcss-import`:
13 | *
14 | * @import "utilities/background-patterns";
15 | * @import "utilities/skew-transforms";
16 | */
17 |
18 | @import "./utilities/animate";
--------------------------------------------------------------------------------
/src/scss/components/_card.scss:
--------------------------------------------------------------------------------
1 | .card {
2 | @apply .rounded .shadow .bg-white .relative;
3 |
4 | &__body {
5 | @apply .p-6;
6 | }
7 |
8 | &--primary {
9 | @apply .rounded .shadow .bg-teal;
10 |
11 | > p {
12 | @apply .text-white;
13 | }
14 | }
15 |
16 | &--dark {
17 | @apply .rounded .shadow .bg-black .text-white;
18 |
19 | > p {
20 | @apply .text-white;
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/src/scss/components/_upload.scss:
--------------------------------------------------------------------------------
1 | .upload {
2 | &__container {
3 | @apply .w-full .border-4 .border-grey-light .border-dashed .bg-grey-lightest .relative .rounded .p-3;
4 | }
5 |
6 | &__container--dragged {
7 | @apply .border-grey;
8 | }
9 |
10 | &__control {
11 | @apply .hidden;
12 | }
13 |
14 | &__label {
15 | @apply .block .text-center .align-middle;
16 |
17 | &:hover {
18 | @apply .cursor-pointer;
19 | }
20 | }
21 |
22 | &__files {
23 | @apply .border .rounded .shadow .mt-3;
24 | }
25 |
26 | &__file {
27 | &--actions {
28 | @apply .float-right;
29 | }
30 | }
31 | }
--------------------------------------------------------------------------------
/src/scss/components/_list.scss:
--------------------------------------------------------------------------------
1 | .list {
2 | @apply .list-reset .flex .flex-col;
3 |
4 | &--item {
5 | @apply .px-2 .text-grey-darker .rounded .bg-white;
6 | }
7 |
8 | &--item:hover {
9 | @apply .bg-grey-lightest .text-grey-darkest;
10 | }
11 |
12 | &--item:focus {
13 | @apply .outline-none;
14 | }
15 |
16 | &--separator {
17 | @apply .uppercase .px-2 .pt-6 .text-grey .text-xs .font-bold;
18 | }
19 |
20 | > .router-link-active {
21 | @apply .bg-black .text-white;
22 | }
23 |
24 | .draggable-source--is-dragging {
25 | background-color: #f1f5f8;
26 | }
27 |
28 | .draggable-source--is-dragging > * {
29 | opacity: 0;
30 | }
31 | }
--------------------------------------------------------------------------------
/src/scss/_components.scss:
--------------------------------------------------------------------------------
1 | @tailwind components;
2 |
3 | /**
4 | * Here you would add any of your custom component classes; stuff that you'd
5 | * want loaded *before* the utilities so that the utilities could still
6 | * override them.
7 | */
8 |
9 | @import "components/button";
10 | @import "components/card";
11 | @import "components/collapse";
12 | @import "components/dropdown";
13 | @import "components/form";
14 | @import "components/list";
15 | @import "components/modal";
16 | @import "components/pagination";
17 | @import "components/select";
18 | @import "components/tab";
19 | @import "components/toast";
20 | @import "components/toggle";
21 | @import "components/tooltip";
22 | @import "components/treeview";
23 | @import "components/upload";
--------------------------------------------------------------------------------
/src/scss/components/_tab.scss:
--------------------------------------------------------------------------------
1 | .tabs {
2 | @apply .bg-white .rounded .shadow;
3 | }
4 |
5 | .tab {
6 | @apply .flex-none;
7 |
8 | &__list {
9 | @apply .flex .border-b .border-grey-lighter .p-0 .m-0 .list-reset .overflow-x-auto;
10 | }
11 |
12 | &__link {
13 | @apply .block .px-6 .py-2 .text-grey-dark .font-normal .border-b-4 .border-transparent;
14 | }
15 |
16 | &__link:hover {
17 | @apply .bg-grey-lightest .text-grey-darkest;
18 | }
19 |
20 | &__link:focus {
21 | @apply .outline-none;
22 | }
23 |
24 | &__panel {
25 | @apply .p-6;
26 | }
27 |
28 | &--active {
29 | a {
30 | @apply .text-black .border-b-4 .border-grey-light;
31 | }
32 | }
33 | }
--------------------------------------------------------------------------------
/src/scss/components/_treeview.scss:
--------------------------------------------------------------------------------
1 | .treeview {
2 | @apply .list-reset;
3 |
4 | &--node {
5 | @apply .flex .items-center .align-middle .py-2;
6 |
7 | :hover {
8 | @apply .cursor-pointer;
9 | }
10 | }
11 |
12 | &--toggle {
13 | @apply .flex .items-center pr-2;
14 | }
15 |
16 | &--icon {
17 | @apply .pointer-events-none .inline-flex .items-center .text-grey-darker .leading-tight;
18 | }
19 |
20 | &--label {
21 | @apply .flex .items-center .leading-tight .align-middle;
22 | }
23 |
24 | &--node__folder {
25 | //
26 | }
27 |
28 | &--node__selected {
29 | @apply .font-bold;
30 | }
31 |
32 | &--children {
33 | @apply .pl-3;
34 | }
35 | }
--------------------------------------------------------------------------------
/src/index.js:
--------------------------------------------------------------------------------
1 | import * as Components from './components'
2 | import * as Directives from './directives'
3 | import EventBusPlugin from './support/eventbus'
4 |
5 | const moment = require('moment')
6 |
7 | const Proton = {
8 | install(Vue) {
9 | Vue.use(EventBusPlugin)
10 |
11 | Vue.prototype.moment = function() {
12 | return moment
13 | }
14 |
15 | Object.values(Components).forEach((Component) => {
16 | Vue.use(Component)
17 | })
18 |
19 | Object.values(Directives).forEach((Directive) => {
20 | Vue.use(Directive)
21 | })
22 | }
23 | }
24 |
25 | // Automatic install Proton if Vue has been added to the global scope.
26 | if (typeof window !== 'undefined' && window.Vue) {
27 | window.Vue.use(Proton)
28 | }
29 |
30 | export default Proton
31 |
--------------------------------------------------------------------------------
/src/scss/components/_toggle.scss:
--------------------------------------------------------------------------------
1 | .toggle {
2 | @apply .relative .inline-flex .rounded-full .h-6 .w-12 .cursor-pointer .flex-no-shrink;
3 |
4 | &:focus {
5 | @apply .shadow-md .outline-none;
6 | }
7 |
8 | &:before {
9 | @apply .inline-block .rounded-full .h-full .w-full .shadow .bg-grey-lightest;
10 |
11 | content: "";
12 | transition: background-color 0.2s ease;
13 | }
14 |
15 | &:after {
16 | @apply .absolute .pin-t .pin-l .rounded-full .h-6 .w-6 .bg-white .border .border-grey-lightest .shadow-md;
17 |
18 | content: "";
19 | transform: translateX(0);
20 | transition: transform 0.2s ease;
21 | }
22 |
23 | &:checked:before {
24 | @apply .bg-grey-darkest;
25 | }
26 |
27 | &:checked:after {
28 | transform: translateX(1.5rem);
29 | }
30 | }
--------------------------------------------------------------------------------
/src/components/Tooltip/Tooltip.vue:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
| {{ file.name }} | 39 |{{ filesize(file.size) }} | 40 |
|
88 | {{ column_names[column] || column }}
89 | {{ column_names[column] || column }}
90 |
91 |
98 |
99 | |
100 | 101 | |
|---|---|
|
107 | |
111 |
112 | |
116 |