@skewedaspect/sleekspace-ui 0.2.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +111 -0
- package/dist/sleekspace-ui.css +12844 -0
- package/dist/sleekspace-ui.es.js +19021 -0
- package/dist/sleekspace-ui.umd.js +19040 -0
- package/docs/components/accordion.md +92 -0
- package/docs/components/alert.md +72 -0
- package/docs/components/avatar.md +69 -0
- package/docs/components/breadcrumbs.md +65 -0
- package/docs/components/button/_meta.yaml +12 -0
- package/docs/components/button/accessibility.md +16 -0
- package/docs/components/button/custom-colors.md +18 -0
- package/docs/components/button/icons.md +31 -0
- package/docs/components/button/intro.md +8 -0
- package/docs/components/button/kinds.md +25 -0
- package/docs/components/button/sizes.md +14 -0
- package/docs/components/button/states.md +12 -0
- package/docs/components/button/usage.md +23 -0
- package/docs/components/button/variants.md +14 -0
- package/docs/components/button.md +110 -0
- package/docs/components/card.md +87 -0
- package/docs/components/checkbox.md +77 -0
- package/docs/components/collapsible.md +71 -0
- package/docs/components/divider.md +62 -0
- package/docs/components/dropdown.md +88 -0
- package/docs/components/field.md +80 -0
- package/docs/components/group.md +41 -0
- package/docs/components/input.md +84 -0
- package/docs/components/listbox.md +82 -0
- package/docs/components/modal.md +101 -0
- package/docs/components/navbar.md +64 -0
- package/docs/components/number-input.md +78 -0
- package/docs/components/page.md +77 -0
- package/docs/components/pagination.md +88 -0
- package/docs/components/panel.md +74 -0
- package/docs/components/popover.md +93 -0
- package/docs/components/progress.md +76 -0
- package/docs/components/radio.md +86 -0
- package/docs/components/sidebar.md +74 -0
- package/docs/components/skeleton.md +76 -0
- package/docs/components/slider.md +94 -0
- package/docs/components/spinner.md +59 -0
- package/docs/components/switch.md +97 -0
- package/docs/components/table.md +91 -0
- package/docs/components/tabs.md +108 -0
- package/docs/components/tag.md +75 -0
- package/docs/components/tags-input.md +88 -0
- package/docs/components/textarea.md +80 -0
- package/docs/components/theme.md +65 -0
- package/docs/components/toast.md +95 -0
- package/docs/components/tooltip.md +90 -0
- package/docs/guides/custom-colors.md +84 -0
- package/docs/guides/design-tokens.md +105 -0
- package/docs/guides/getting-started.md +144 -0
- package/docs/guides/installation.md +62 -0
- package/docs/guides/theming.md +101 -0
- package/package.json +76 -0
- package/src/components/Accordion/SkAccordion.vue +133 -0
- package/src/components/Accordion/SkAccordionItem.vue +131 -0
- package/src/components/Accordion/index.ts +3 -0
- package/src/components/Accordion/types.ts +9 -0
- package/src/components/Alert/SkAlert.vue +137 -0
- package/src/components/Alert/types.ts +10 -0
- package/src/components/Avatar/SkAvatar.vue +141 -0
- package/src/components/Avatar/index.ts +8 -0
- package/src/components/Avatar/types.ts +31 -0
- package/src/components/Breadcrumbs/SkBreadcrumbItem.vue +76 -0
- package/src/components/Breadcrumbs/SkBreadcrumbSeparator.vue +38 -0
- package/src/components/Breadcrumbs/SkBreadcrumbs.vue +93 -0
- package/src/components/Breadcrumbs/index.ts +10 -0
- package/src/components/Breadcrumbs/types.ts +36 -0
- package/src/components/Button/SkButton.vue +148 -0
- package/src/components/Button/types.ts +21 -0
- package/src/components/Card/SkCard.vue +144 -0
- package/src/components/Card/types.ts +12 -0
- package/src/components/Checkbox/SkCheckbox.vue +136 -0
- package/src/components/Checkbox/index.ts +8 -0
- package/src/components/Checkbox/types.ts +10 -0
- package/src/components/Collapsible/SkCollapsible.vue +159 -0
- package/src/components/Collapsible/index.ts +2 -0
- package/src/components/Collapsible/types.ts +8 -0
- package/src/components/Divider/SkDivider.vue +63 -0
- package/src/components/Divider/types.ts +15 -0
- package/src/components/Dropdown/SkDropdown.vue +150 -0
- package/src/components/Dropdown/SkDropdownMenuItem.vue +58 -0
- package/src/components/Dropdown/SkDropdownMenuSeparator.vue +26 -0
- package/src/components/Dropdown/SkDropdownSubmenu.vue +107 -0
- package/src/components/Dropdown/index.ts +11 -0
- package/src/components/Dropdown/types.ts +11 -0
- package/src/components/Field/SkField.vue +152 -0
- package/src/components/Field/index.ts +8 -0
- package/src/components/Field/types.ts +7 -0
- package/src/components/Group/SkGroup.vue +52 -0
- package/src/components/Group/types.ts +10 -0
- package/src/components/Input/SkInput.vue +117 -0
- package/src/components/Input/index.ts +8 -0
- package/src/components/Input/types.ts +11 -0
- package/src/components/Listbox/SkListbox.vue +164 -0
- package/src/components/Listbox/SkListboxItem.vue +68 -0
- package/src/components/Listbox/SkListboxSeparator.vue +26 -0
- package/src/components/Listbox/index.ts +10 -0
- package/src/components/Listbox/types.ts +10 -0
- package/src/components/Modal/SkModal.vue +231 -0
- package/src/components/Modal/index.ts +8 -0
- package/src/components/Modal/types.ts +12 -0
- package/src/components/NavBar/SkNavBar.vue +83 -0
- package/src/components/NavBar/index.ts +8 -0
- package/src/components/NavBar/types.ts +15 -0
- package/src/components/NumberInput/SkNumberInput.vue +168 -0
- package/src/components/NumberInput/index.ts +8 -0
- package/src/components/NumberInput/types.ts +10 -0
- package/src/components/Page/SkPage.vue +94 -0
- package/src/components/Page/index.ts +8 -0
- package/src/components/Page/types.ts +21 -0
- package/src/components/Pagination/SkPagination.vue +185 -0
- package/src/components/Pagination/SkPaginationItem.vue +107 -0
- package/src/components/Pagination/index.ts +9 -0
- package/src/components/Pagination/types.ts +40 -0
- package/src/components/Panel/SkPanel.vue +96 -0
- package/src/components/Panel/types.ts +15 -0
- package/src/components/Popover/SkPopover.vue +185 -0
- package/src/components/Popover/index.ts +8 -0
- package/src/components/Popover/types.ts +11 -0
- package/src/components/Progress/SkProgress.vue +144 -0
- package/src/components/Progress/index.ts +8 -0
- package/src/components/Progress/types.ts +34 -0
- package/src/components/Radio/SkRadio.vue +110 -0
- package/src/components/Radio/SkRadioGroup.vue +92 -0
- package/src/components/Radio/index.ts +9 -0
- package/src/components/Radio/types.ts +11 -0
- package/src/components/Sidebar/README.md +405 -0
- package/src/components/Sidebar/SkSidebar.vue +88 -0
- package/src/components/Sidebar/SkSidebarItem.vue +58 -0
- package/src/components/Sidebar/SkSidebarSection.vue +40 -0
- package/src/components/Sidebar/types.ts +3 -0
- package/src/components/Skeleton/SkSkeleton.vue +171 -0
- package/src/components/Skeleton/index.ts +8 -0
- package/src/components/Skeleton/types.ts +31 -0
- package/src/components/Slider/SkSlider.vue +165 -0
- package/src/components/Slider/index.ts +8 -0
- package/src/components/Slider/types.ts +44 -0
- package/src/components/Spinner/SkSpinner.vue +105 -0
- package/src/components/Spinner/index.ts +8 -0
- package/src/components/Spinner/types.ts +28 -0
- package/src/components/Switch/SkSwitch.vue +215 -0
- package/src/components/Switch/index.ts +8 -0
- package/src/components/Switch/types.ts +12 -0
- package/src/components/Table/SkTable.vue +109 -0
- package/src/components/Table/index.ts +2 -0
- package/src/components/Table/types.ts +15 -0
- package/src/components/Tabs/README.md +331 -0
- package/src/components/Tabs/SkTab.vue +84 -0
- package/src/components/Tabs/SkTabList.vue +62 -0
- package/src/components/Tabs/SkTabPanel.vue +47 -0
- package/src/components/Tabs/SkTabPanels.vue +23 -0
- package/src/components/Tabs/SkTabs.vue +124 -0
- package/src/components/Tabs/types.ts +21 -0
- package/src/components/Tag/SkTag.vue +129 -0
- package/src/components/Tag/types.ts +15 -0
- package/src/components/TagsInput/SkTagsInput.vue +184 -0
- package/src/components/TagsInput/index.ts +8 -0
- package/src/components/TagsInput/types.ts +10 -0
- package/src/components/Textarea/SkTextarea.vue +117 -0
- package/src/components/Textarea/index.ts +8 -0
- package/src/components/Textarea/types.ts +10 -0
- package/src/components/Theme/SkTheme.vue +47 -0
- package/src/components/Theme/types.ts +17 -0
- package/src/components/Theme/useTheme.ts +131 -0
- package/src/components/Toast/SkToast.vue +156 -0
- package/src/components/Toast/SkToastProvider.vue +180 -0
- package/src/components/Toast/index.ts +15 -0
- package/src/components/Toast/types.ts +63 -0
- package/src/components/Toast/useToast.ts +78 -0
- package/src/components/Tooltip/SkTooltip.vue +162 -0
- package/src/components/Tooltip/SkTooltipProvider.vue +114 -0
- package/src/components/Tooltip/index.ts +9 -0
- package/src/components/Tooltip/types.ts +13 -0
- package/src/composables/useCustomColors.test.ts +505 -0
- package/src/composables/useCustomColors.ts +124 -0
- package/src/composables/usePortalContext.test.ts +402 -0
- package/src/composables/usePortalContext.ts +95 -0
- package/src/global.d.ts +76 -0
- package/src/index.ts +259 -0
- package/src/styles/_scrollbar.scss +100 -0
- package/src/styles/base/_fonts.scss +105 -0
- package/src/styles/base/_global.scss +47 -0
- package/src/styles/base/_index.scss +24 -0
- package/src/styles/base/_reset.scss +11 -0
- package/src/styles/base/_typography.scss +178 -0
- package/src/styles/components/_accordion.scss +250 -0
- package/src/styles/components/_alert.scss +239 -0
- package/src/styles/components/_avatar.scss +133 -0
- package/src/styles/components/_breadcrumbs.scss +137 -0
- package/src/styles/components/_button.scss +731 -0
- package/src/styles/components/_card.scss +141 -0
- package/src/styles/components/_checkbox.scss +232 -0
- package/src/styles/components/_collapsible.scss +158 -0
- package/src/styles/components/_divider.scss +121 -0
- package/src/styles/components/_field.scss +87 -0
- package/src/styles/components/_group.scss +138 -0
- package/src/styles/components/_index.scss +46 -0
- package/src/styles/components/_input.scss +205 -0
- package/src/styles/components/_listbox.scss +453 -0
- package/src/styles/components/_menu.scss +216 -0
- package/src/styles/components/_modal.scss +329 -0
- package/src/styles/components/_navbar.scss +258 -0
- package/src/styles/components/_number-input.scss +352 -0
- package/src/styles/components/_page.scss +98 -0
- package/src/styles/components/_pagination.scss +411 -0
- package/src/styles/components/_panel.scss +281 -0
- package/src/styles/components/_popover.scss +258 -0
- package/src/styles/components/_progress.scss +280 -0
- package/src/styles/components/_radio.scss +255 -0
- package/src/styles/components/_sidebar.scss +92 -0
- package/src/styles/components/_skeleton.scss +138 -0
- package/src/styles/components/_slider.scss +262 -0
- package/src/styles/components/_spinner.scss +331 -0
- package/src/styles/components/_switch.scss +370 -0
- package/src/styles/components/_table.scss +405 -0
- package/src/styles/components/_tabs.scss +486 -0
- package/src/styles/components/_tag.scss +425 -0
- package/src/styles/components/_tags-input.scss +279 -0
- package/src/styles/components/_textarea.scss +208 -0
- package/src/styles/components/_toast.scss +331 -0
- package/src/styles/components/_tooltip.scss +206 -0
- package/src/styles/fonts/Titillium_Web/OFL.txt +93 -0
- package/src/styles/fonts/Titillium_Web/TitilliumWeb-Black.ttf +0 -0
- package/src/styles/fonts/Titillium_Web/TitilliumWeb-Bold.ttf +0 -0
- package/src/styles/fonts/Titillium_Web/TitilliumWeb-BoldItalic.ttf +0 -0
- package/src/styles/fonts/Titillium_Web/TitilliumWeb-ExtraLight.ttf +0 -0
- package/src/styles/fonts/Titillium_Web/TitilliumWeb-ExtraLightItalic.ttf +0 -0
- package/src/styles/fonts/Titillium_Web/TitilliumWeb-Italic.ttf +0 -0
- package/src/styles/fonts/Titillium_Web/TitilliumWeb-Light.ttf +0 -0
- package/src/styles/fonts/Titillium_Web/TitilliumWeb-LightItalic.ttf +0 -0
- package/src/styles/fonts/Titillium_Web/TitilliumWeb-Regular.ttf +0 -0
- package/src/styles/fonts/Titillium_Web/TitilliumWeb-SemiBold.ttf +0 -0
- package/src/styles/fonts/Titillium_Web/TitilliumWeb-SemiBoldItalic.ttf +0 -0
- package/src/styles/index.scss +17 -0
- package/src/styles/mixins/_cut-border.scss +254 -0
- package/src/styles/mixins/_index.scss +7 -0
- package/src/styles/theme/_variables.scss +42 -0
- package/src/styles/themes/README.md +127 -0
- package/src/styles/themes/_colorful.scss +58 -0
- package/src/styles/themes/_greyscale.scss +58 -0
- package/src/styles/themes/index.scss +9 -0
- package/src/styles/tokens/README.md +268 -0
- package/src/styles/tokens/_foundation-borders.scss +26 -0
- package/src/styles/tokens/_foundation-colors.scss +169 -0
- package/src/styles/tokens/_foundation-glow.scss +36 -0
- package/src/styles/tokens/_foundation-radius.scss +53 -0
- package/src/styles/tokens/_foundation-scrollbar.scss +31 -0
- package/src/styles/tokens/_foundation-shadows.scss +37 -0
- package/src/styles/tokens/_foundation-space.scss +36 -0
- package/src/styles/tokens/_foundation-transitions.scss +37 -0
- package/src/styles/tokens/_foundation-typography.scss +58 -0
- package/src/styles/tokens/_semantic-color-kinds.scss +112 -0
- package/src/styles/tokens/_semantic-colors.scss +10 -0
- package/src/styles/tokens/_semantic-interactive.scss +29 -0
- package/src/styles/tokens/_semantic-scrollbar.scss +48 -0
- package/src/styles/tokens/_semantic-surfaces.scss +36 -0
- package/src/styles/tokens/index.scss +38 -0
- package/src/styles/tokens.scss +268 -0
- package/src/styles/utilities/_index.scss +9 -0
- package/src/styles/utilities/_typography.scss +121 -0
- package/src/types.ts +50 -0
- package/web-types.json +3524 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
component: SkNavBar
|
|
3
|
+
category: Navigation
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# SkNavBar
|
|
7
|
+
|
|
8
|
+
A top navigation bar component with three content zones: brand, navigation, and actions. Sticky by default so it stays visible during scroll.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
```vue
|
|
13
|
+
<template>
|
|
14
|
+
<SkNavBar kind="primary" sticky>
|
|
15
|
+
<template #brand>
|
|
16
|
+
<a href="/">MyApp</a>
|
|
17
|
+
</template>
|
|
18
|
+
<template #nav>
|
|
19
|
+
<a href="/about">About</a>
|
|
20
|
+
<a href="/docs">Docs</a>
|
|
21
|
+
</template>
|
|
22
|
+
<template #actions>
|
|
23
|
+
<SkButton kind="accent" size="sm">Sign In</SkButton>
|
|
24
|
+
</template>
|
|
25
|
+
</SkNavBar>
|
|
26
|
+
</template>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Slots
|
|
30
|
+
|
|
31
|
+
- **brand** -- Left-aligned area for logo or brand name.
|
|
32
|
+
- **nav** -- Center area for navigation links.
|
|
33
|
+
- **actions** -- Right-aligned area for action buttons.
|
|
34
|
+
|
|
35
|
+
## Kinds
|
|
36
|
+
|
|
37
|
+
```vue
|
|
38
|
+
<SkNavBar kind="primary">...</SkNavBar>
|
|
39
|
+
<SkNavBar kind="accent">...</SkNavBar>
|
|
40
|
+
<SkNavBar kind="neutral">...</SkNavBar>
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Sticky Behavior
|
|
44
|
+
|
|
45
|
+
The navbar is sticky by default (`sticky: true`). Set `sticky` to `false` for a static navbar:
|
|
46
|
+
|
|
47
|
+
```vue
|
|
48
|
+
<SkNavBar :sticky="false">...</SkNavBar>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Custom Colors
|
|
52
|
+
|
|
53
|
+
```vue
|
|
54
|
+
<SkNavBar
|
|
55
|
+
base-color="oklch(0.2 0.05 260)"
|
|
56
|
+
text-color="oklch(0.9 0 0)"
|
|
57
|
+
>
|
|
58
|
+
<template #brand>Dark Nav</template>
|
|
59
|
+
</SkNavBar>
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Accessibility
|
|
63
|
+
|
|
64
|
+
Renders as a semantic `<nav>` element. The developer should provide meaningful link text and aria attributes for the navigation structure.
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
component: SkNumberInput
|
|
3
|
+
category: Forms
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# SkNumberInput
|
|
7
|
+
|
|
8
|
+
A numeric input component with increment/decrement stepper buttons. Supports keyboard navigation, min/max bounds, and step increments. Built on RekaUI's NumberField primitive.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
```vue
|
|
13
|
+
<script setup>
|
|
14
|
+
import { ref } from 'vue';
|
|
15
|
+
|
|
16
|
+
const quantity = ref(1);
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<SkNumberInput v-model="quantity" :min="0" :max="100" :step="1" />
|
|
21
|
+
</template>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Min, Max, and Step
|
|
25
|
+
|
|
26
|
+
```vue
|
|
27
|
+
<SkNumberInput v-model="value" :min="0" :max="10" :step="0.5" />
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Kinds
|
|
31
|
+
|
|
32
|
+
```vue
|
|
33
|
+
<SkNumberInput v-model="val" kind="primary" />
|
|
34
|
+
<SkNumberInput v-model="val" kind="danger" />
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
When nested inside SkField, the kind is automatically injected based on field validation state.
|
|
38
|
+
|
|
39
|
+
## Sizes
|
|
40
|
+
|
|
41
|
+
```vue
|
|
42
|
+
<SkNumberInput v-model="val" size="sm" />
|
|
43
|
+
<SkNumberInput v-model="val" size="md" />
|
|
44
|
+
<SkNumberInput v-model="val" size="lg" />
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## States
|
|
48
|
+
|
|
49
|
+
```vue
|
|
50
|
+
<SkNumberInput v-model="val" disabled />
|
|
51
|
+
<SkNumberInput v-model="val" readonly />
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Custom Colors
|
|
55
|
+
|
|
56
|
+
```vue
|
|
57
|
+
<SkNumberInput
|
|
58
|
+
v-model="val"
|
|
59
|
+
base-color="oklch(0.5 0.2 280)"
|
|
60
|
+
text-color="white"
|
|
61
|
+
/>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Composition
|
|
65
|
+
|
|
66
|
+
Pair with SkField for labels and validation:
|
|
67
|
+
|
|
68
|
+
```vue
|
|
69
|
+
<SkField label="Quantity" :error="quantityError">
|
|
70
|
+
<template #default="{ id, ...attrs }">
|
|
71
|
+
<SkNumberInput :id="id" v-bind="attrs" v-model="quantity" :min="0" />
|
|
72
|
+
</template>
|
|
73
|
+
</SkField>
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Accessibility
|
|
77
|
+
|
|
78
|
+
Built on RekaUI NumberField which provides `role="spinbutton"`, `aria-valuemin`, `aria-valuemax`, and `aria-valuenow`. Arrow Up/Down keys increment and decrement the value. The stepper buttons are accessible via keyboard.
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
component: SkPage
|
|
3
|
+
category: Layout
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# SkPage
|
|
7
|
+
|
|
8
|
+
A full-page layout component that provides a structured page skeleton with header, sidebar, content, and footer regions. Designed for application-level layouts.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
```vue
|
|
13
|
+
<template>
|
|
14
|
+
<SkPage>
|
|
15
|
+
<template #header>
|
|
16
|
+
<SkNavBar kind="primary">
|
|
17
|
+
<template #brand>MyApp</template>
|
|
18
|
+
</SkNavBar>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<template #sidebar>
|
|
22
|
+
<SkSidebar>
|
|
23
|
+
<SkSidebarItem href="/">Home</SkSidebarItem>
|
|
24
|
+
<SkSidebarItem href="/settings">Settings</SkSidebarItem>
|
|
25
|
+
</SkSidebar>
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<h1>Page Content</h1>
|
|
29
|
+
<p>Main content area.</p>
|
|
30
|
+
|
|
31
|
+
<template #footer>
|
|
32
|
+
<p>Footer content</p>
|
|
33
|
+
</template>
|
|
34
|
+
</SkPage>
|
|
35
|
+
</template>
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Slots
|
|
39
|
+
|
|
40
|
+
- **header** -- Top region, typically for a navbar.
|
|
41
|
+
- **sidebar** -- Side navigation area.
|
|
42
|
+
- **default** -- Main content rendered in a `<main>` element.
|
|
43
|
+
- **footer** -- Bottom region.
|
|
44
|
+
|
|
45
|
+
All slots are optional; the layout adapts when slots are not provided.
|
|
46
|
+
|
|
47
|
+
## Sidebar Position
|
|
48
|
+
|
|
49
|
+
```vue
|
|
50
|
+
<SkPage sidebar-position="left">...</SkPage>
|
|
51
|
+
<SkPage sidebar-position="right">...</SkPage>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Fixed Header and Footer
|
|
55
|
+
|
|
56
|
+
Keep the header or footer fixed while the content area scrolls:
|
|
57
|
+
|
|
58
|
+
```vue
|
|
59
|
+
<SkPage fixed-header fixed-footer>
|
|
60
|
+
<template #header>...</template>
|
|
61
|
+
<template #footer>...</template>
|
|
62
|
+
Main content scrolls independently.
|
|
63
|
+
</SkPage>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Custom Sidebar Width
|
|
67
|
+
|
|
68
|
+
```vue
|
|
69
|
+
<SkPage sidebar-width="250px">
|
|
70
|
+
<template #sidebar>...</template>
|
|
71
|
+
Content
|
|
72
|
+
</SkPage>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Accessibility
|
|
76
|
+
|
|
77
|
+
Uses semantic HTML: the main content renders in a `<main>` element, header in `<header>`, and footer in `<footer>`. Sidebar renders in an `<aside>` element.
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
---
|
|
2
|
+
component: SkPagination
|
|
3
|
+
category: Navigation
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# SkPagination
|
|
7
|
+
|
|
8
|
+
A pagination control for navigating through pages of content. Automatically calculates page ranges with ellipsis for large page counts.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
```vue
|
|
13
|
+
<script setup>
|
|
14
|
+
import { ref } from 'vue';
|
|
15
|
+
|
|
16
|
+
const currentPage = ref(1);
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<SkPagination v-model="currentPage" :total="20" kind="primary" />
|
|
21
|
+
</template>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Navigation Controls
|
|
25
|
+
|
|
26
|
+
By default, first/last and previous/next buttons are shown. Disable them individually:
|
|
27
|
+
|
|
28
|
+
```vue
|
|
29
|
+
<SkPagination
|
|
30
|
+
v-model="page"
|
|
31
|
+
:total="10"
|
|
32
|
+
:show-first-last="false"
|
|
33
|
+
:show-prev-next="true"
|
|
34
|
+
/>
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Sibling Count
|
|
38
|
+
|
|
39
|
+
Control how many page numbers appear around the current page:
|
|
40
|
+
|
|
41
|
+
```vue
|
|
42
|
+
<!-- Shows: 1 ... 4 5 [6] 7 8 ... 20 -->
|
|
43
|
+
<SkPagination v-model="page" :total="20" :sibling-count="2" />
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Variants
|
|
47
|
+
|
|
48
|
+
```vue
|
|
49
|
+
<SkPagination variant="solid" v-model="page" :total="10" />
|
|
50
|
+
<SkPagination variant="outline" v-model="page" :total="10" />
|
|
51
|
+
<SkPagination variant="subtle" v-model="page" :total="10" />
|
|
52
|
+
<SkPagination variant="ghost" v-model="page" :total="10" />
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Kinds
|
|
56
|
+
|
|
57
|
+
```vue
|
|
58
|
+
<SkPagination kind="primary" v-model="page" :total="10" />
|
|
59
|
+
<SkPagination kind="accent" v-model="page" :total="10" />
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Sizes
|
|
63
|
+
|
|
64
|
+
```vue
|
|
65
|
+
<SkPagination size="sm" v-model="page" :total="10" />
|
|
66
|
+
<SkPagination size="lg" v-model="page" :total="10" />
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## States
|
|
70
|
+
|
|
71
|
+
```vue
|
|
72
|
+
<SkPagination disabled v-model="page" :total="10" />
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Custom Colors
|
|
76
|
+
|
|
77
|
+
```vue
|
|
78
|
+
<SkPagination
|
|
79
|
+
base-color="oklch(0.6 0.2 280)"
|
|
80
|
+
text-color="white"
|
|
81
|
+
v-model="page"
|
|
82
|
+
:total="10"
|
|
83
|
+
/>
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Accessibility
|
|
87
|
+
|
|
88
|
+
Renders inside a `<nav>` element with `aria-label="Pagination"`. Current page button is visually distinguished. First, last, previous, and next buttons are disabled when at boundary pages.
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
---
|
|
2
|
+
component: SkPanel
|
|
3
|
+
category: Layout
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# SkPanel
|
|
7
|
+
|
|
8
|
+
The foundational container component of SleekSpace UI. Provides borders, background colors, beveled corners, and an optional decorative accent line. Serves as the base for SkCard and other container components.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
```vue
|
|
13
|
+
<template>
|
|
14
|
+
<SkPanel kind="primary" size="lg">
|
|
15
|
+
<h2>Panel Content</h2>
|
|
16
|
+
<p>Any content goes here.</p>
|
|
17
|
+
</SkPanel>
|
|
18
|
+
</template>
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Kinds
|
|
22
|
+
|
|
23
|
+
```vue
|
|
24
|
+
<SkPanel kind="neutral">Neutral</SkPanel>
|
|
25
|
+
<SkPanel kind="primary">Primary</SkPanel>
|
|
26
|
+
<SkPanel kind="accent">Accent</SkPanel>
|
|
27
|
+
<SkPanel kind="info">Info</SkPanel>
|
|
28
|
+
<SkPanel kind="success">Success</SkPanel>
|
|
29
|
+
<SkPanel kind="warning">Warning</SkPanel>
|
|
30
|
+
<SkPanel kind="danger">Danger</SkPanel>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Sizes
|
|
34
|
+
|
|
35
|
+
The `size` prop controls the bevel cut size:
|
|
36
|
+
|
|
37
|
+
```vue
|
|
38
|
+
<SkPanel size="xs">Extra Small</SkPanel>
|
|
39
|
+
<SkPanel size="sm">Small</SkPanel>
|
|
40
|
+
<SkPanel size="md">Medium</SkPanel>
|
|
41
|
+
<SkPanel size="lg">Large</SkPanel>
|
|
42
|
+
<SkPanel size="xl">Extra Large</SkPanel>
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Decoration
|
|
46
|
+
|
|
47
|
+
Panels include a decorative accent border by default. Disable it with `show-decoration`:
|
|
48
|
+
|
|
49
|
+
```vue
|
|
50
|
+
<SkPanel :show-decoration="false">No accent line.</SkPanel>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Remove the entire border with `no-border`:
|
|
54
|
+
|
|
55
|
+
```vue
|
|
56
|
+
<SkPanel no-border>Borderless panel.</SkPanel>
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Setting `no-border` also disables the decoration.
|
|
60
|
+
|
|
61
|
+
## Custom Colors
|
|
62
|
+
|
|
63
|
+
```vue
|
|
64
|
+
<SkPanel
|
|
65
|
+
base-color="oklch(0.2 0.1 260)"
|
|
66
|
+
text-color="oklch(0.9 0 0)"
|
|
67
|
+
>
|
|
68
|
+
Dark panel with custom colors.
|
|
69
|
+
</SkPanel>
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Accessibility
|
|
73
|
+
|
|
74
|
+
SkPanel is a presentational container. Apply appropriate ARIA roles and labels based on the content it wraps.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
---
|
|
2
|
+
component: SkPopover
|
|
3
|
+
category: Feedback
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# SkPopover
|
|
7
|
+
|
|
8
|
+
A floating panel positioned relative to a trigger element. Combines tooltip-like positioning with card-like structure, supporting a header with title, body content, footer, and a connecting arrow. Built on RekaUI's Popover primitive and uses a portal.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
```vue
|
|
13
|
+
<template>
|
|
14
|
+
<SkPopover title="Settings">
|
|
15
|
+
<template #trigger>
|
|
16
|
+
<SkButton>Open Settings</SkButton>
|
|
17
|
+
</template>
|
|
18
|
+
<p>Adjust your preferences here.</p>
|
|
19
|
+
</SkPopover>
|
|
20
|
+
</template>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Slots
|
|
24
|
+
|
|
25
|
+
- **trigger** -- The element that opens the popover on click.
|
|
26
|
+
- **header** -- Additional header content alongside the title.
|
|
27
|
+
- **default** -- Body content of the popover.
|
|
28
|
+
- **footer** -- Footer area for actions.
|
|
29
|
+
|
|
30
|
+
```vue
|
|
31
|
+
<SkPopover title="Confirm" kind="danger">
|
|
32
|
+
<template #trigger>
|
|
33
|
+
<SkButton kind="danger">Delete</SkButton>
|
|
34
|
+
</template>
|
|
35
|
+
<p>Are you sure?</p>
|
|
36
|
+
<template #footer>
|
|
37
|
+
<SkButton variant="ghost" size="sm">Cancel</SkButton>
|
|
38
|
+
<SkButton kind="danger" size="sm">Delete</SkButton>
|
|
39
|
+
</template>
|
|
40
|
+
</SkPopover>
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Positioning
|
|
44
|
+
|
|
45
|
+
```vue
|
|
46
|
+
<SkPopover side="right" align="start" :side-offset="12">
|
|
47
|
+
...
|
|
48
|
+
</SkPopover>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Available `side` values: `top`, `right`, `bottom` (default), `left`. Available `align` values: `start`, `center` (default), `end`.
|
|
52
|
+
|
|
53
|
+
## Arrow
|
|
54
|
+
|
|
55
|
+
The connecting arrow is shown by default. Hide it with:
|
|
56
|
+
|
|
57
|
+
```vue
|
|
58
|
+
<SkPopover :show-arrow="false">...</SkPopover>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Closable
|
|
62
|
+
|
|
63
|
+
A close button appears in the header by default. Disable it:
|
|
64
|
+
|
|
65
|
+
```vue
|
|
66
|
+
<SkPopover :closable="false" title="Persistent">
|
|
67
|
+
...
|
|
68
|
+
</SkPopover>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Kinds
|
|
72
|
+
|
|
73
|
+
```vue
|
|
74
|
+
<SkPopover kind="primary" title="Primary Popover">...</SkPopover>
|
|
75
|
+
<SkPopover kind="accent" title="Accent Popover">...</SkPopover>
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Custom Colors
|
|
79
|
+
|
|
80
|
+
```vue
|
|
81
|
+
<SkPopover
|
|
82
|
+
base-color="oklch(0.3 0.1 260)"
|
|
83
|
+
text-color="white"
|
|
84
|
+
title="Custom"
|
|
85
|
+
>
|
|
86
|
+
<template #trigger><SkButton>Open</SkButton></template>
|
|
87
|
+
Dark popover content.
|
|
88
|
+
</SkPopover>
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Accessibility
|
|
92
|
+
|
|
93
|
+
Built on RekaUI Popover which manages focus movement into the popover on open, focus trapping within the popover content, and Escape to close. The close button has `aria-label="Close"`. Content is portaled and inherits the active theme.
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
component: SkProgress
|
|
3
|
+
category: Feedback
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# SkProgress
|
|
7
|
+
|
|
8
|
+
A progress bar component with both determinate and indeterminate modes. Supports percentage labels and custom colors. Built on RekaUI's Progress primitive.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
```vue
|
|
13
|
+
<script setup>
|
|
14
|
+
import { ref } from 'vue';
|
|
15
|
+
|
|
16
|
+
const progress = ref(45);
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<SkProgress :value="progress" kind="primary" />
|
|
21
|
+
</template>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Indeterminate Mode
|
|
25
|
+
|
|
26
|
+
Omit the `value` prop or pass `null` to show an animated indeterminate progress bar:
|
|
27
|
+
|
|
28
|
+
```vue
|
|
29
|
+
<SkProgress kind="accent" />
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Value Label
|
|
33
|
+
|
|
34
|
+
Display the current percentage:
|
|
35
|
+
|
|
36
|
+
```vue
|
|
37
|
+
<SkProgress :value="75" show-value />
|
|
38
|
+
<SkProgress :value="75" show-value value-position="left" />
|
|
39
|
+
<SkProgress :value="75" show-value value-position="right" />
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Kinds
|
|
43
|
+
|
|
44
|
+
```vue
|
|
45
|
+
<SkProgress :value="60" kind="primary" />
|
|
46
|
+
<SkProgress :value="60" kind="success" />
|
|
47
|
+
<SkProgress :value="60" kind="warning" />
|
|
48
|
+
<SkProgress :value="60" kind="danger" />
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Sizes
|
|
52
|
+
|
|
53
|
+
Controls the bar height:
|
|
54
|
+
|
|
55
|
+
```vue
|
|
56
|
+
<SkProgress :value="50" size="xs" />
|
|
57
|
+
<SkProgress :value="50" size="sm" />
|
|
58
|
+
<SkProgress :value="50" size="md" />
|
|
59
|
+
<SkProgress :value="50" size="lg" />
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Custom Colors
|
|
63
|
+
|
|
64
|
+
Use `baseColor` for the filled bar and `trackColor` for the background track:
|
|
65
|
+
|
|
66
|
+
```vue
|
|
67
|
+
<SkProgress
|
|
68
|
+
:value="65"
|
|
69
|
+
base-color="oklch(0.7 0.25 300)"
|
|
70
|
+
track-color="oklch(0.2 0.05 300)"
|
|
71
|
+
/>
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Accessibility
|
|
75
|
+
|
|
76
|
+
Built on RekaUI Progress which provides `role="progressbar"`, `aria-valuemin`, `aria-valuemax`, `aria-valuenow` (omitted in indeterminate mode). Screen readers announce the progress value.
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
---
|
|
2
|
+
component: SkRadio
|
|
3
|
+
category: Forms
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# SkRadio
|
|
7
|
+
|
|
8
|
+
A radio button component for exclusive selection within a group. SkRadio must be used inside SkRadioGroup. Built on RekaUI's RadioGroup primitive.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
```vue
|
|
13
|
+
<script setup>
|
|
14
|
+
import { ref } from 'vue';
|
|
15
|
+
|
|
16
|
+
const selected = ref('option-a');
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<SkRadioGroup v-model="selected" kind="primary">
|
|
21
|
+
<SkRadio value="option-a" label="Option A" />
|
|
22
|
+
<SkRadio value="option-b" label="Option B" />
|
|
23
|
+
<SkRadio value="option-c" label="Option C" />
|
|
24
|
+
</SkRadioGroup>
|
|
25
|
+
</template>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Orientation
|
|
29
|
+
|
|
30
|
+
The radio group arranges items vertically by default. Switch to horizontal:
|
|
31
|
+
|
|
32
|
+
```vue
|
|
33
|
+
<SkRadioGroup v-model="val" orientation="horizontal">
|
|
34
|
+
<SkRadio value="a" label="A" />
|
|
35
|
+
<SkRadio value="b" label="B" />
|
|
36
|
+
</SkRadioGroup>
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Kinds
|
|
40
|
+
|
|
41
|
+
Set on the group to apply to all radios, or override per individual radio:
|
|
42
|
+
|
|
43
|
+
```vue
|
|
44
|
+
<SkRadioGroup v-model="val" kind="accent">
|
|
45
|
+
<SkRadio value="a" label="Inherits accent" />
|
|
46
|
+
<SkRadio value="b" label="Override to danger" kind="danger" />
|
|
47
|
+
</SkRadioGroup>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Sizes
|
|
51
|
+
|
|
52
|
+
Set on the group or individual radios:
|
|
53
|
+
|
|
54
|
+
```vue
|
|
55
|
+
<SkRadioGroup v-model="val" size="lg">
|
|
56
|
+
<SkRadio value="a" label="Large Radio" />
|
|
57
|
+
</SkRadioGroup>
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## States
|
|
61
|
+
|
|
62
|
+
```vue
|
|
63
|
+
<SkRadioGroup v-model="val" disabled>
|
|
64
|
+
<SkRadio value="a" label="All disabled" />
|
|
65
|
+
</SkRadioGroup>
|
|
66
|
+
|
|
67
|
+
<SkRadioGroup v-model="val">
|
|
68
|
+
<SkRadio value="a" label="Enabled" />
|
|
69
|
+
<SkRadio value="b" label="Individually disabled" disabled />
|
|
70
|
+
</SkRadioGroup>
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Custom Colors
|
|
74
|
+
|
|
75
|
+
```vue
|
|
76
|
+
<SkRadio
|
|
77
|
+
value="custom"
|
|
78
|
+
base-color="oklch(0.6 0.25 300)"
|
|
79
|
+
text-color="white"
|
|
80
|
+
label="Custom purple"
|
|
81
|
+
/>
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Accessibility
|
|
85
|
+
|
|
86
|
+
Built on RekaUI RadioGroup which provides `role="radiogroup"` on the group and `role="radio"` on each item. Arrow keys navigate between options, and the group supports `aria-required` when `required` is set. Labels are associated via wrapping `<label>` elements.
|