Skip to content

Commit

Permalink
Merge pull request #343 from AliMD/feat/alwatr-icon
Browse files Browse the repository at this point in the history
New package: `@alwatr/icon` Structure
  • Loading branch information
alimd authored Oct 31, 2022
2 parents c220872 + 9d8253f commit 982bcd3
Show file tree
Hide file tree
Showing 1,340 changed files with 1,456 additions and 1 deletion.
13 changes: 13 additions & 0 deletions demo/icon/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>@alwatr/icon</title>
<script type="module" src="./index.js"></script>
</head>

<body>
<alwatr-icon></alwatr-icon>
</body>
</html>
1 change: 1 addition & 0 deletions demo/icon/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import '@alwatr/icon';
1 change: 1 addition & 0 deletions demo/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
{"path": "../packages/core/logger"},
{"path": "../packages/core/fetch"},
{"path": "../packages/core/signal"},
{"path": "../packages/ui/icon"},
{"path": "../packages/core/router"},
{"path": "../packages/core/i18n"},
{"path": "../packages/core/math"},
Expand Down
1 change: 1 addition & 0 deletions packages/ui/icon/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Alwatr Icon Component
41 changes: 41 additions & 0 deletions packages/ui/icon/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"name": "@alwatr/icon",
"version": "0.0.1",
"description": "Premium icons",
"keywords": [
"icon",
"component",
"typescript",
"esm",
"alwatr"
],
"main": "icon.js",
"type": "module",
"types": "icon.d.ts",
"private": true,
"author": "S. Ali Mihandoost <[email protected]> (https://ali.mihandoost.com)",
"contributors": [
"MohammadMahdi Zamanian <[email protected]> (https://mm25zamanian.ir)"
],
"license": "MIT",
"files": [
"**/*.{d.ts.map,d.ts,js.map,js,html,md,svg}"
],
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "https://github.com/AliMD/alwatr",
"directory": "packages/ui/icon"
},
"homepage": "https://github.com/AliMD/alwatr/tree/main/packages/ui/icon#readme",
"bugs": {
"url": "https://github.com/AliMD/alwatr/issues"
},
"dependencies": {
"@alwatr/element": "^0.18.0",
"lit": "^2.4.0",
"tslib": "^2.3.1"
}
}
45 changes: 45 additions & 0 deletions packages/ui/icon/src/icon.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import {AlwatrElement} from '@alwatr/element';
import {html, css} from 'lit';
import {customElement} from 'lit/decorators/custom-element.js';
import {property} from 'lit/decorators/property.js';

import type {TemplateResult} from 'lit';

@customElement('alwatr-icon')
export class AlwatrIcon extends AlwatrElement {
static override styles = [
css`
:host {
display: inline-block;
width: 1em;
height: 1em;
contain: strict;
fill: currentColor;
box-sizing: content-box !important;
}
svg {
display: block;
height: 100%;
width: 100%;
}
`,
];

@property() name?: string;
@property({attribute: 'url-prefix'}) urlPrefix = 'https://cdn.jsdelivr.net/gh/ionic-team/[email protected]/src/svg/';

override render(): TemplateResult {
return html`<svg xmlns="http://www.w3.org/2000/svg" class="ionicon" viewBox="0 0 512 512">
<title>Book</title>
<path
d="M256 160c16-63.16 76.43-95.41 208-96a15.94 15.94 0 0116 16v288a16 16 0 01-16 16c-128 0-177.45 25.81-208 64-30.37-38-80-64-208-64-9.88 0-16-8.05-16-17.93V80a15.94 15.94 0 0116-16c131.57.59 192 32.84 208 96zM256 160v288"
fill="none"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="32"
/>
</svg>`;
}
}
1 change: 1 addition & 0 deletions packages/ui/icon/svg/accessibility-outline.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/ui/icon/svg/accessibility-sharp.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/ui/icon/svg/accessibility.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/ui/icon/svg/add-circle-outline.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/ui/icon/svg/add-circle-sharp.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/ui/icon/svg/add-circle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/ui/icon/svg/add-outline.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/ui/icon/svg/add-sharp.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/ui/icon/svg/add.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/ui/icon/svg/airplane-outline.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/ui/icon/svg/airplane-sharp.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/ui/icon/svg/airplane.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/ui/icon/svg/alarm-outline.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/ui/icon/svg/alarm-sharp.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/ui/icon/svg/alarm.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/ui/icon/svg/albums-outline.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/ui/icon/svg/albums-sharp.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/ui/icon/svg/albums.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/ui/icon/svg/alert-circle-outline.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/ui/icon/svg/alert-circle-sharp.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/ui/icon/svg/alert-circle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/ui/icon/svg/alert-outline.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/ui/icon/svg/alert-sharp.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/ui/icon/svg/alert.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/ui/icon/svg/american-football-outline.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/ui/icon/svg/american-football-sharp.svg
1 change: 1 addition & 0 deletions packages/ui/icon/svg/american-football.svg
1 change: 1 addition & 0 deletions packages/ui/icon/svg/analytics-outline.svg
1 change: 1 addition & 0 deletions packages/ui/icon/svg/analytics-sharp.svg
1 change: 1 addition & 0 deletions packages/ui/icon/svg/analytics.svg
Loading

0 comments on commit 982bcd3

Please sign in to comment.