Giter Club home page Giter Club logo

svelte's Introduction

uBeac - Svelte UI Component Library

npm version Build Status License npm GitHub issues GitHub stars GitHub forks

uBeac is a powerful and flexible Svelte UI component library, designed to help developers build enterprise-grade web applications quickly and easily. With a focus on rapid application development and framework independence, uBeac is the perfect complement to any CSS framework. The component's UI is inspired by Tabler UI Kit built on top of Bootstrap css.

Installation

To install uBeac, you can use npm:

npm install @ubeac/svelte

Usage

Once installed, you can import the components and use them in your Svelte application:

<script>
	import { Button } from '@ubeac/svelte'
</script>

<Button>Hello uBeac</Button>

Styles

uBeac components have default styles which is based on tabler. which you can use like this:

<script>
	import {Button} from '@ubeac/svelte'
	import '@ubeac/svelte/styles/tabler.css'

</script>

<Button>Hello World!</Button>

Demo

Check out the documentation website for live demos of each component and detailed usage instructions.

svelte's People

Contributors

abdolian avatar dependabot[bot] avatar fabian9799 avatar mhmdtaherian avatar mohammadsalehkarimi avatar plantir avatar pournasserian avatar smile-armin avatar thehadiahmadi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

svelte's Issues

Button Group Component Proposal

Properties

Name Type Implemented Sample
compact boolean YES
vertical boolean YES
size sm, md, lg
wrap boolean YES

Slots

  • default

Grid Component Proposal

Properties

Name Type Sample
alignContent start, center, end, stretch, between, around, evenly, undefined Yes
alignContentXs start, center, end, stretch, between, around, evenly, undefined Yes
alignContentSm start, center, end, stretch, between, around, evenly, undefined Yes
alignContentMd start, center, end, stretch, between, around, evenly, undefined Yes
alignContentLg start, center, end, stretch, between, around, evenly, undefined Yes
alignContentXl start, center, end, stretch, between, around, evenly, undefined Yes
alignContentXxl start, center, end, stretch, between, around, evenly, undefined Yes
alignItems start, center, end, stretch, undefined Yes
alignItemsXs start, center, end, stretch, undefined Yes
alignItemsSm start, center, end, stretch, undefined Yes
alignItemsMd start, center, end, stretch, undefined Yes
alignItemsLg start, center, end, stretch, undefined Yes
alignItemsXl start, center, end, stretch, undefined Yes
alignItemsXxl start, center, end, stretch, undefined Yes
gutter xs, sm, md, lg, xl, xxl, string, undefined Yes
gutterX xs, sm, md, lg, xl, xxl, string, undefined Yes
gutterY xs, sm, md, lg, xl, xxl, string, undefined Yes
justifyContent start, center, end, between, around, evenly, undefined Yes
justifyContentXs start, center, end, between, around, evenly, undefined Yes
justifyContentSm start, center, end, between, around, evenly, undefined Yes
justifyContentMd start, center, end, between, around, evenly, undefined Yes
justifyContentLg start, center, end, between, around, evenly, undefined Yes
justifyContentXl start, center, end, between, around, evenly, undefined Yes
justifyContentXxl start, center, end, between, around, evenly, undefined Yes
reverse boolean, undefined Yes
reverseXs boolean, undefined Yes
reverseSm boolean, undefined Yes
reverseMd boolean, undefined Yes
reverseLg boolean, undefined Yes
reverseXl boolean, undefined Yes
reverseXxl boolean, undefined Yes
vertical boolean, undefined Yes
wrap boolean, reverse, undefined Yes
wrapXs boolean, reverse, undefined Yes
wrapSm boolean, reverse, undefined Yes
wrapMd boolean, reverse, undefined Yes
wrapLg boolean, reverse, undefined Yes
wrapXl boolean, reverse, undefined Yes
wrapXxl boolean, reverse, undefined Yes

Slots

  • default

Select Component Proposal

Properties

Name Type Implemented Sample
forwardEvents function YES
items createOptions YES
key string, undefined YES
preview boolean YES
returnObject boolean
text string, undefined YES
value any YES

Events

  • changed

Badge Component Proposal

properties

Name Type Implemented Sample
color enum, string YES
dot boolean YES
ghost boolean YES
href string
outline boolean YES
overlap boolean
placement top,bottom,left,right,start,center,end
shape round,tile,circle,undefined YES
size enum

slots

  • default

Checkbox Componenet Proposal

Properties

Name Type Implemented Sample
forwardEvents function Yes
group any Yes
value any Yes
disabled boolean
size sm,md,lg
color Color
indeterminate boolean
icon? mui

Events

  • changed

Button Component Proposal

Properties

Name Type Implemented Sample
block boolean, full YES More
color enum(Colors), string YES
disabled boolean YES
elevation enum, number
ghost, text boolean YES
href string YES
loading boolean YES
outline boolean YES
shape round, tile, circle, default, link YES
size sm, md, lg, string YES*
icon boolean SMART
flat boolean ELEVATION
link boolean SHAPE
round/pill boolean SHAPE
tile/square boolean SHAPE
circle/fab boolean SHAPE
active/state/strong boolean

Slots

  • default
  • start
  • end

FormInput Component Proposal

Properties

Name Type Implemented Sample
col string, undefined YES
icon string, undefined YES
id string, undefined YES
label string, undefined YES
loading boolean YES
preview boolean YES
required boolean YES
value any YES

Slots

  • start
  • end
  • outer:start
  • middle:start
  • inner:start
  • inner:end
  • middle:end
  • outer:end

Card Status Component Proposal

Properties

Name Type Implemented Sample
color enum(Colors), string YES
placement top, start, end, bottom, undefined YES
size sm, md, lg YES

Card Component Proposal

Properties

Name Type Implemented Sample
elevation enum, number, undefined YES*
outline boolean YES
padding sm, md, lg
tile boolean YES
transparent boolean No

Slots

  • default

problem with importing Sass files

When I import the sass file to SvelteKit,
https://github.com/ubeac/svelte/blob/merge-doc-site/src/routes/__layout.svelte

import '../scss/index.scss'

There's comes and issue with Bootstrap

Error: Can't find stylesheet to import.
  ╷
1 │ @import "~bootstrap/scss/functions";
  │         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  ╵
  node_modules/@tabler/core/src/scss/_config.scss 1:9  @import
  node_modules/@tabler/core/src/scss/_core.scss 1:9    @import
  src/scss/index.scss 1:9                              root stylesheet

I expect this to work because this was the preprocess config of SvelteKit:
https://github.com/ubeac/svelte/blob/merge-doc-site/svelte.config.js

preprocess({
  scss: {
    importer: (url, prev) => {
      if (url[0] === '~') {
        url = path.resolve('node_modules', url.substr(1))
      }
      return { file: url }
    },
  },
}),

Any ideas about this error? @TheHadiAhmadi @pournasserian

Input Component Proposal

Properties

Name Type Implemented Sample
forwardEvents function Yes
disabled boolean
mask any
placeholder string
preview boolean YES
type enum
value any YES

FormCheckboxGroup Component Proposal

Properties

Name Type Implemented Sample
items Array, Object, undefined
label string
required boolean
key string, undefined
preview boolean
text string, undefined
value Array

list of some Atoms

Input
InputGroup
Textarea
Select
Label
Chckbox
Switch
Radio
NavItem
Menu
MenuItem
Image
Avatar
Progress
ProgressBar
Tooltip
Breadcrumbs
BreadcrumbItem
Spinner

Error: The target selector was not found.

I merged the latest changes from main to my branch merge-doc-site
And there's a problem with Sass extending:

Error: The target selector was not found.
Use "@extend .form-group !optional" to avoid this error.
  ╷
2 │     @extend .form-group;
  │     ^^^^^^^^^^^^^^^^^^^
  ╵
  src/scss/components/form/form-group.scss 2:2  root stylesheet

@pournasserian @TheHadiAhmadi Can you help with that?

Radio Component Proposal

Properties

Name Type Implemented Samples
forwardEvents function YES
group any YES
value any YES
id string, undefined
name string, undefined
disabled boolean

Events

  • change

Accordion Component Proposal

Component Properties:

Name Type Implemented Sample
group string Yes
id string, undefined Yes
open boolean Yes
title string, undefined Yes

Slots

  • default
  • title

Icons are hidden in Server Side Rendering

Iconify loads icons in frontend and store them in local storage or session storage, we don't have access to svg of icons in server side.

this would be great if we can serve icons as svg in server rendering.

Merge docs template with the other repo

Hey,
I tried to add the doc site I initiated on the other repo to this repo in /docs but that didn't work because components on src/components are using @app/ and that doesn't work well when I'm running another SvelteKit is in another directory.

In this situation I think we can handle everything on the same existing SvelteKit, so I merged my repo to the existing SvelteKit in this repo. I pushed to merge-doc-site branch and everything works fine except the Badge

On merge-doc-site branch when I import the Button from components and run SvelteKit, I get this error from Badge component

/src/components/badge/Badge.svelte:5:13 Unexpected token
 3 |  
 4 |    import { Root } from '@app/components'
 5 |    import type { Colors, PlacementEdge } from '@app/types'
                    ^
 6 |  
 7 |    /**

Do you know what's the problem?
@pournasserian @TheHadiAhmadi

Avatar Component Proposal

Properties

Name Type Implemented Sample
color enum(Colors), string YES
shape circle, round, tile YES
size xs, sm, ep, md, lg, xl YES
badge

Slots

  • default

Divider Component Proposal

Properties

Name Type Implemented Sample
placement start, end, center YES
type solid, dashed, dotted YES
variant middle, inset, full YES
vertical boolean YES
width medium, thick, thin YES

Slots

  • default

Alert type=error not working

tabler uses 'danger' instead of error.

we need to edit alert.scss file to add .u-alert-error class and extend alert-danger

Alert Component Proposal

Properties

Name Type Implemented Sample
dismissible boolean YES
duration number YES
icon string, undefined YES
open boolean YES
type Colors YES
variant outlined, filled, default YES

Slots

  • default
  • icon
  • actions

Events

Name
onClose

should not have readonly="false" attribute for Input

in current implementation if we pass readonly={false} prop for Input, the read-only style is applied for input

<!-- svelte file -->
<Input readonly={false} />

<!-- result html -->
<input class="u-input" readonly="false" />

disabled prop works as expected

Button bugs

  • loading spinner is not shown in default button (without color)
  • text prop doesn't work in default button
  • outline prop doesn't work in default button

Grid Item Component Proposal

Properties

Name Type Sample
alignSelf auto, stretch, start, center, end, undefined Yes
alignSelfXs auto, stretch, start, center, end, undefined Yes
alignSelfSm auto, stretch, start, center, end, undefined Yes
alignSelfMd auto, stretch, start, center, end, undefined Yes
alignSelfLg auto, stretch, start, center, end, undefined Yes
alignSelfXl auto, stretch, start, center, end, undefined Yes
alignSelfXxl auto, stretch, start, center, end, undefined Yes
xs 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, auto, grow, hide, hide-up, hide-down, undefined Yes
sm 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, auto, grow, hide, hide-up, hide-down, undefined Yes
md 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, auto, grow, hide, hide-up, hide-down, undefined Yes
lg 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, auto, grow, hide, hide-up, hide-down, undefined Yes
xl 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, auto, grow, hide, hide-up, hide-down, undefined Yes
xxl 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, auto, grow, hide, hide-up, hide-down, undefined Yes
hide boolean
hideXs boolean
hideSm boolean
hideMd boolean
hideLg boolean
hideXl boolean
hideXxl boolean
hideSmUp boolean
hideMdUp boolean
hideLgUp boolean
hideXlUp boolean
hideSmDown boolean
hideMdDown boolean
hideLgDown boolean
hideXlDown boolean
hideXxlDown boolean
offset 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, undefined Yes
offsetXs 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, undefined Yes
offsetSm 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, undefined Yes
offsetMd 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, undefined Yes
offsetLg 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, undefined Yes
offsetXl 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, undefined Yes
offsetXxl 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, undefined Yes
order 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, undefined Yes
orderXs 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, undefined Yes
orderSm 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, undefined Yes
orderMd 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, undefined Yes
orderLg 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, undefined Yes
orderXl 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, undefined Yes
orderXxl 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, undefined Yes

Slots

  • default

FormCheckbox Component Proposal

Properties

Name Type Implemented Sample
description string, undefined Yes
forwardEvents function Yes
label string,undefined Yes
inline boolean Yes
value boolean Yes

Events

  • changed

Textarea Component Proposal

Properties

Name Type Implemented Sample
forwardEvents function YES
value string, undefined YES

Events

  • forward all events

Badge Component Proposal

properties

Name Type Implemented Sample
color enum, string YES
dot boolean YES
ghost boolean YES
href string
outline boolean YES
overlap boolean
placement top,bottom,left,right,start,center,end
shape round,tile,circle,undefined YES
size enum

slots

  • default

Icon Component Proposal

Properties

Name Type Implemented Sample
color enum(Colors), string YES
name string, undefined YES
pack string, 'tabler' YES
size auto, xs, sm, md, lg, xl, 1x, 2x, 3x, 4x, 5x, 6x, 7x, 8x, 9x YES

Card Stamp Component Proposal

Properties

Name Type Implemented Sample
color string, enum(Colors) YES*
placement top-start, top-end, bottom-start, bottom-end YES*
size sm, md, lg YES

Slots

  • default

List of components

Name Is Atom Used In TS Implemented Documented Examples Skeleton Proposals
Accordion No Yes Yes Yes Yes Yes #12
AccordionActions Yes No No No No ‌ - #231
AccordionBody No Yes Yes Yes Yes ‌ No Need #252
AccordionHeader No Yes Yes Yes Yes ‌ No Need #253
Accordions No Yes Yes Yes Yes ‌ No Need #166
AccordionTitle No Yes Yes Yes Yes ‌ No Need #254
Alert No Yes Yes Yes Yes* ‌ - #8
AlertTitle No No Yes Yes Yes ‌ No Need #115
App No No Yes Yes Yes ‌ Yes #196
AppLoadingBar No No Yes Yes Yes ‌ No Need #114
Avatar Yes Yes Yes Yes Yes ‌ Yes #33
Avatar Group Yes No Yes Yes Yes ‌ Yes #36
Badge Yes Yes Yes Yes Yes ‌ Yes #17
Breadcrumbs Yes No Yes Yes Yes ‌ Yes #129
BreadcrumbItem Yes No Yes Yes Yes ‌ No Need #130
Button Yes Yes Yes Yes Yes ‌ Yes #4
Button Group Yes No Yes Yes Yes ‌ Yes #5
Card Yes Yes Yes Yes Yes ‌ - #9
CardActions Yes Yes Yes Yes Yes - #45
CardBody Yes Yes Yes Yes Yes No Need #38
CardFooter Yes Yes Yes Yes Yes Yes* #40
CardHeader Yes Yes Yes Yes Yes Yes #39
CardMedia Yes No Yes Yes Yes No Need #41
CardRibbon Yes No No No No No Need #268
CardStamp Yes No Yes Yes No No Need #46
CardStatus Yes No Yes Yes No No Need #42
CardTitle Yes Yes Yes Yes Yes No Need #43
Carousel No No Yes Yes Yes ‌ - #113
CarouselButton Yes No Yes Yes - - #203
CarouselIndicator Yes No Yes Yes - - #204
CarouselIndicators Yes No Yes Yes - - #205
CarouselItem Yes No Yes Yes Yes - #206
Collapse Yes Yes Yes Yes Yes No Need #207
CollapseToggler Yes Yes Yes Yes Yes No Need #208
Confirm No Yes Yes Yes Yes ‌ Yes #112
Data Grid - - - - - - #58
Dialog No Yes Yes Yes Yes ‌ - #111
DialogBody Yes No Yes Yes Yes No Need #226
DialogContent Yes No Yes Yes Yes - #227
DialogFooter Yes No Yes Yes Yes - #228
DialogHeader Yes No Yes Yes Yes - #229
DialogTitle Yes No Yes Yes Yes No Need #230
Divider Yes No Yes Yes Yes ‌ Yes #10
FormAutocomplete No No Yes Yes Yes* ‌ Yes #118
FormCheckbox No Yes Yes Yes Yes ‌ Yes #68
FormCheckboxGroup No Yes Yes Yes No ‌ - #165
FormDatePicker No Yes Yes Yes Yes ‌ Yes #119
FormFieldset No No Yes Yes Yes ‌ - #135
FormGroup No Yes Yes Yes Yes - #255
FormInput No Yes Yes Yes Yes ‌ Yes #51
FormRadio No Yes Yes Yes Yes ‌ Yes #71
FormSelect No Yes Yes Yes Yes ‌ Yes #136
FormSwitch No No Yes Yes Yes - #209
FormTextarea No No Yes Yes Yes ‌ Yes #137
GoogleMap Yes No Yes Yes Yes ‌ No Need #131
GoogleMapAutocomplete Yes No Yes Yes Yes ‌ - #132
Grid Yes No Yes Yes Yes ‌ No Need #6
GridItem Yes No Yes Yes Yes ‌ No Need #7
Icon Yes Yes Yes Yes Yes* ‌ No Need #11
Input Autocomplete Yes No Yes Yes Yes* ‌ Yes #116
Input Checkbox Yes Not Directly Yes Yes Yes ‌ No Need #67
Input DatePicker Yes Yes Yes Yes Yes ‌ Yes #117
Input Yes Not Directly Yes Yes Yes ‌ Yes #52
Input Radio Yes Not Directly Yes Yes Yes ‌ No Need #70
Input Select Yes Not Directly Yes No Yes ‌ Yes #59
Input Switch Yes No Yes Yes Yes ‌ Yes #139
Input Textarea Yes No Yes Yes Yes ‌ Yes #65
Label Yes Yes Yes Yes Yes ‌ No Need #37
Menu Yes No Yes Yes Yes Yes #211
MenuItem Yes No Yes No No - #214
Popup Yes No Yes Yes Yes Yes #251
Spinner Yes Yes* Yes Yes Yes ‌ No Need #138
Tabs - - Yes - - - #218
TabsItem - - Yes - - - #164
TabsItems - - Yes - - - #216
TabsPanel - - Yes - - - #217
TabsPanels - - Yes - - - #219
Table Yes Yes Yes Yes Yes ‌ - #85
TableBody Yes Yes Yes Yes Yes - #220
TableCell Yes Yes Yes Yes Yes - #221
TableFoot Yes Yes Yes Yes Yes - #222
TableHead Yes Yes Yes Yes Yes - #223
TableRow Yes Yes Yes Yes Yes - #222
Tooltip Yes No Yes No No Yes #202
Image
Progress
ProgressBar
Slider
Dropdown
RadioGroup
Drawer
Sidebar
Status No Yes Yes Yes Yes No #308

Cannot find module '@app/components' imported from

import { get_current_component, onDestroy, onMount } from 'svelte/internal';
import { Icon } from '@app/components';
import { forwardEventsBuilder } from '@app/directives';
import { classname, condition } from '@app/utils';

Cannot find module '@app/components' imported from '/Files/files/github/svelte/package/components/alert/Alert.svelte'
Error: Cannot find module '@app/components' imported from '/Files/files/github/svelte/package/components/alert/Alert.svelte'
at viteResolve (/Files/files/github/ubeac-test/node_modules/vite/dist/node/chunks/dep-8f5c9290.js:50310:25)
at nodeImport (/Files/files/github/ubeac-test/node_modules/vite/dist/node/chunks/dep-8f5c9290.js:50345:15)
at ssrImport (/Files/files/github/ubeac-test/node_modules/vite/dist/node/chunks/dep-8f5c9290.js:50241:20)
at eval (/@fs/Files/files/github/svelte/package/components/alert/Alert.svelte:11:37)
at async instantiateModule (/Files/files/github/ubeac-test/node_modules/vite/dist/node/chunks/dep-8f5c9290.js:50286:9

Form‌Radio Component Proposal

Properties

Name Type Implemented Samples
description string, undefined Yes
col string, undefined
id string, undefined
group any Yes
inline boolean Yes
label string, undefined Yes
required boolean
value boolean

Events

  • change

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.