Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 253
Feat: Functions G4#465
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Feat: Functions G4 #465
Changes from all commits
49e9c822866a84da589029f78abfb8e229d64eb85ea1501b4b37ee644129413fffdd22a4d777008060d14f74f80856431b62ba5f2a2b9c636a60f032aa2ac26cf439abfde571929bc1645c825a0d7c377c0d7d67468959c275c99de92e6ec83e6bca376f938c8223b903bfc4f9e818cbd358c7d2227d1b2e17e0a65bd2441dec4d20384830dff906f1baa6c99adb94c1d75b399256f2267ccbdc5304af1cd583f46e4bd597ef7cd354c42e07d62f90ebe4fb0f7a30b17ceed95c51d994168e8087fa2fe12d93a38f356104c813a1b60e1f346dd880797a978fc7a4c2eee3fc640c5f2c5adb38215f89e924bdde47aa01e7d7df35d462455493e7ca0e3ef78b40c0500eaa5abe055ac069f9b931b5e58cd5b159a4a1edbeeeaf602261fdb208475e36f0b4aa78f1002c8782c778f8932a433c357cf2ba163cebd5dbfe73fe080907efb12cfeb5ee646aa1278a38b140df722ba0ce02e7a9b2d720a9f11cc2fc975a4b951497ca24aac29590d67bcac64ce6a8ae70d2c647249b906d8c9ffa1ec99e6358194221a4cba690648befe5c663dc89bc4331ea1452fa1c090d165aa56f7cb4e542316b61ff5c8ad7f38d5fab39cb43e6c1b46fa1d130f242f71ec0956615b228a8b356b8a8a7e2b102aedc972b45ee6f7cd6ceeafa812abde7385ea3f43a18f33ffdd56e3a9521194ec67300fc153d9fe2867ea17b3e592c30b9a33917eba99a0f9b3f7ea9b2f7dd4ca4acdaa9e451e591dabbebfb9c68807b467e03ad0830b64f1996f1847df784c051bd1dc3798a8b3cf14f9d99c72330c621b918793993e582531a3523eea0d661f0f0b05be08aabb3657764b2ec1fe82ec33f31aa71495a9c22b88bf572f65ecd77d8d25724d4ff3ebccf1a652625421d442aeff71da84e3ba730931ae2838fd4a153e7c11f1e6a29340f968ecb7a83c83e7387ada4b4299d88bdcc15b2d5aa2bf5749211cad5a300620894db73877a758d404eddad2ee1ddab26aaea6e5044e74a3684d8579ba663ed55519558fd31f178852c46d525ae23424e18c73884440e6b0e85b4578c89b6cf7fa5cb15025241fb41db5a00bbee76ee7bd296d1d33719f106fe823fa9456b5579876261f6b6c449d4File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Uh oh!
There was an error while loading. Please reload this page.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,20 @@ | ||
| <div class="box"> | ||
| <div class="u-flex u-gap-16"> | ||
| <slot name="image" /> | ||
| <div class="u-cross-child-center u-line-height-1-5"> | ||
| <slot name="title" /> | ||
| <slot /> | ||
| </div> | ||
| </div> | ||
| <script lang="ts"> | ||
| export let radius: keyof typeof radiuses = 'small'; | ||
| export let padding = 24; | ||
| let classes = ''; | ||
| export { classes as class }; | ||
| enum radiuses { | ||
| xsmall = '--border-radius-extra-large', | ||
| small = '--border-radius-small', | ||
| medium = '--border-radius-medium', | ||
| large = '--border-radius-large' | ||
| } | ||
| </script> | ||
| <div | ||
| class="box {classes}" | ||
| style:--box-border-radius={`var(${radiuses[radius]})`} | ||
| style:--box-padding={`${padding / 16}rem`}> | ||
| <slot /> | ||
| </div> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| <div class="box"> | ||
| <div class="u-flex u-gap-16"> | ||
| <slot name="image" /> | ||
| <div class="u-cross-child-center u-line-height-1-5"> | ||
| <slot name="title" /> | ||
| <slot /> | ||
| </div> | ||
| </div> | ||
| </div> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| <ol class="numeric-list"> | ||
| <slot /> | ||
| </ol> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| <script lang="ts"> | ||
| export let fullWidth = false; | ||
| </script> | ||
| <li class="numeric-list-item"> | ||
| <div class="u-margin-block-start-8" class:u-width-full-line={fullWidth}><slot /></div> | ||
| </li> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -19,8 +19,8 @@ | ||
| TableRow | ||
| } from '$lib/elements/table'; | ||
| import { symmetricDifference } from '$lib/helpers/array'; | ||
| import { onDestroy, onMount } from 'svelte'; | ||
| import { writable, type Unsubscriber } from 'svelte/store'; | ||
| import { onMount } from 'svelte'; | ||
| import { writable } from 'svelte/store'; | ||
| import Actions from './actions.svelte'; | ||
| import Row from './row.svelte'; | ||
| import Table from '$lib/elements/table/table.svelte'; | ||
| @@ -32,26 +32,19 @@ | ||
| let showTeam = false; | ||
| let showCustom = false; | ||
| let showDropdown = false; | ||
| let unsubscribe: Unsubscriber; | ||
| const groups = writable<Map<string, Permission>>(new Map()); | ||
| onMount(() => { | ||
| permissions.forEach(fromPermissionString); | ||
| unsubscribe = groups.subscribe(() => { | ||
| return groups.subscribe(() => { | ||
ArmanNik marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| const current = exportRoles(); | ||
| if (symmetricDifference(current, permissions).length) { | ||
| permissions = current; | ||
| } | ||
| }); | ||
| }); | ||
| onDestroy(() => { | ||
| if (unsubscribe) { | ||
| unsubscribe(); | ||
| } | ||
| }); | ||
| function create(event: CustomEvent<string[]>) { | ||
| for (const role of event.detail) { | ||
| addRole(role); | ||
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.