Skip to content

Commit

Permalink
feat: add icons, resolve mjs compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
vojtechsimetka committed Jan 3, 2024
1 parent 810787e commit ae0d5e5
Show file tree
Hide file tree
Showing 8 changed files with 98 additions and 10 deletions.
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@
"exports": {
".": {
"types": "./dist/index.d.ts",
"svelte": "./dist/index.js"
"svelte": "./dist/index.js",
"import": "./dist/index.js"
},
"./icons": {
"types": "./dist/icons.d.ts",
"svelte": "./dist/icons.js"
"svelte": "./dist/icons.js",
"import": "./dist/icons.js"
}
},
"files": [
Expand Down Expand Up @@ -59,5 +61,6 @@
},
"svelte": "./dist/index.js",
"types": "./dist/index.d.ts",
"module": "dist/index.js",
"type": "module"
}
6 changes: 6 additions & 0 deletions src/lib/icons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,9 @@ export { default as ShowDataCards } from './icons/show-data-cards.svelte'
export { default as UserFollow } from './icons/user-follow.svelte'
export { default as Launch } from './icons/launch.svelte'
export { default as DocumentSigned } from './icons/document-signed.svelte'
export { default as DataBlob } from './icons/data-blob.svelte'
export { default as Search } from './icons/search.svelte'
export { default as Explore } from './icons/explore.svelte'
export { default as Home } from './icons/home.svelte'
export { default as Information } from './icons/information.svelte'
export { default as IBMWatsonxAssistant } from './icons/ibm-watsonx-assistant.svelte'
23 changes: 23 additions & 0 deletions src/lib/icons/data-blob.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<script lang="ts">
import type { IconProps } from '$lib/types'
type $$Props = IconProps
export let size: $$Props['size'] = 20
</script>

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width={size} height={size}>
<path
d="M28,30H4a2.0021,2.0021,0,0,1-2-2V4A2.0021,2.0021,0,0,1,4,2H28a2.0021,2.0021,0,0,1,2,2V28A2.0021,2.0021,0,0,1,28,30ZM4,4V28H28V4Z"
/>
<rect x="13" y="7" width="2" height="7" />
<rect x="8" y="7" width="2" height="7" />
<path
d="M22,14H20a2.0021,2.0021,0,0,1-2-2V9a2.0021,2.0021,0,0,1,2-2h2a2.0021,2.0021,0,0,1,2,2v3A2.0021,2.0021,0,0,1,22,14ZM20,9v3h2V9Z"
/>
<rect x="22" y="18" width="2" height="7" />
<rect x="8" y="18" width="2" height="7" />
<path
d="M17,25H15a2.0021,2.0021,0,0,1-2-2V20a2.0021,2.0021,0,0,1,2-2h2a2.0021,2.0021,0,0,1,2,2v3A2.0021,2.0021,0,0,1,17,25Zm-2-5v3h2V20Z"
/>
</svg>
16 changes: 16 additions & 0 deletions src/lib/icons/explore.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<script lang="ts">
import type { IconProps } from '$lib/types'
type $$Props = IconProps
export let size: $$Props['size'] = 20
</script>

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width={size} height={size}>
<path
d="M22.707,9.2931a.9992.9992,0,0,0-1.0234-.2417l-9,3a1.001,1.001,0,0,0-.6323.6323l-3,9a1,1,0,0,0,1.2651,1.2651l9-3a1.0013,1.0013,0,0,0,.6323-.6324l3-9A1,1,0,0,0,22.707,9.2931ZM11.5811,20.419l2.2094-6.6284L18.21,18.21Z"
/>
<path
d="M16,30A14,14,0,1,1,30,16,14.0158,14.0158,0,0,1,16,30ZM16,4A12,12,0,1,0,28,16,12.0137,12.0137,0,0,0,16,4Z"
/>
</svg>
13 changes: 13 additions & 0 deletions src/lib/icons/home.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<script lang="ts">
import type { IconProps } from '$lib/types'
type $$Props = IconProps
export let size: $$Props['size'] = 20
</script>

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width={size} height={size}>
<path
d="M16.6123,2.2138a1.01,1.01,0,0,0-1.2427,0L1,13.4194l1.2427,1.5717L4,13.6209V26a2.0041,2.0041,0,0,0,2,2H26a2.0037,2.0037,0,0,0,2-2V13.63L29.7573,15,31,13.4282ZM18,26H14V18h4Zm2,0V18a2.0023,2.0023,0,0,0-2-2H14a2.002,2.002,0,0,0-2,2v8H6V12.0615l10-7.79,10,7.8005V26Z"
/>
</svg>
22 changes: 22 additions & 0 deletions src/lib/icons/ibm-watsonx-assistant.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<script lang="ts">
import type { IconProps } from '$lib/types'
type $$Props = IconProps
export let size: $$Props['size'] = 20
</script>

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width={size} height={size}>
<path
d="m28,2h-10c-1.1035,0-2,.8965-2,2v6c0,1.1035.8965,2,2,2h2.4229s1.7314,3,1.7314,3l1.7324-1-2.3096-4h-3.5771V4h10v6h-3s0,2,0,2h3c1.1035,0,2-.8965,2-2V4c0-1.1035-.8965-2-2-2Z"
/>
<path
d="m14.6904,31l-1.7324-1,3.4648-6h5.5771c1.1046,0,2-.8954,2-2v-5h2v5c0,2.2091-1.7909,4-4,4h-4.4229l-2.8867,5Z"
/>
<circle cx="10" cy="17" r="1" />
<circle cx="14" cy="17" r="1" />
<circle cx="18" cy="17" r="1" />
<path
d="m12,26h-6c-2.2091,0-4-1.7909-4-4v-10c0-2.2091,1.7909-4,4-4h8v2H6c-1.1046,0-2,.8954-2,2v10c0,1.1046.8954,2,2,2h6v2Z"
/>
</svg>
13 changes: 13 additions & 0 deletions src/lib/icons/search.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<script lang="ts">
import type { IconProps } from '$lib/types'
type $$Props = IconProps
export let size: $$Props['size'] = 20
</script>

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width={size} height={size}>
<path
d="M29,27.5859l-7.5521-7.5521a11.0177,11.0177,0,1,0-1.4141,1.4141L27.5859,29ZM4,13a9,9,0,1,1,9,9A9.01,9.01,0,0,1,4,13Z"
/>
</svg>
8 changes: 0 additions & 8 deletions src/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,3 @@ export { default as DropdownItem } from './components/inputs/dropdown-item.svelt
export { default as Theme } from './theme.svelte'
export type { ThemeStore } from './stores/theme'
export type { DarkModeOption } from './types'

// Icons
import AddComment from './icons/add-comment.svelte'
import Add from './icons/add.svelte'
import ArrowDownRight from './icons/arrow-down-right.svelte'
import ArrowRight from './icons/arrow-right.svelte'

export { AddComment, Add, ArrowDownRight, ArrowRight }

0 comments on commit ae0d5e5

Please sign in to comment.