@skeletonlabs/skeleton 0.99.5 → 0.124.2
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/README.md +0 -1
- package/actions/Filters/filter.js +6 -9
- package/components/Accordion/Accordion.svelte +30 -0
- package/components/Accordion/Accordion.svelte.d.ts +37 -0
- package/components/Accordion/AccordionItem.svelte +75 -39
- package/components/Accordion/AccordionItem.svelte.d.ts +20 -6
- package/components/AppBar/AppBar.svelte +36 -21
- package/components/AppBar/AppBar.svelte.d.ts +20 -1
- package/components/AppRail/AppRail.svelte +3 -2
- package/components/AppRail/AppRail.svelte.d.ts +13 -1
- package/components/AppRail/AppRailTile.svelte +10 -7
- package/components/AppRail/AppRailTile.svelte.d.ts +10 -4
- package/components/AppShell/AppShell.svelte +3 -2
- package/components/AppShell/AppShell.svelte.d.ts +11 -0
- package/components/Avatar/Avatar.svelte +9 -9
- package/components/Avatar/Avatar.svelte.d.ts +16 -5
- package/components/ConicGradient/ConicGradient.svelte +18 -8
- package/components/ConicGradient/ConicGradient.svelte.d.ts +11 -0
- package/components/ConicGradient/settings.d.ts +2 -4
- package/components/ConicGradient/settings.js +2 -2
- package/components/FileButton/FileButton.svelte +8 -6
- package/components/FileButton/FileButton.svelte.d.ts +3 -1
- package/components/FileDropzone/FileDropzone.svelte +43 -63
- package/components/FileDropzone/FileDropzone.svelte.d.ts +24 -8
- package/components/InputChip/InputChip.svelte +97 -52
- package/components/InputChip/InputChip.svelte.d.ts +28 -4
- package/components/ListBox/ListBox.svelte +13 -29
- package/components/ListBox/ListBox.svelte.d.ts +11 -10
- package/components/ListBox/ListBoxItem.svelte +60 -50
- package/components/ListBox/ListBoxItem.svelte.d.ts +11 -7
- package/components/Paginator/Paginator.svelte +5 -5
- package/components/Paginator/Paginator.svelte.d.ts +13 -2
- package/components/ProgressBar/ProgressBar.svelte +17 -24
- package/components/ProgressBar/ProgressBar.svelte.d.ts +9 -1
- package/components/ProgressRadial/ProgressRadial.svelte +6 -8
- package/components/ProgressRadial/ProgressRadial.svelte.d.ts +9 -2
- package/components/Radio/RadioGroup.svelte +13 -16
- package/components/Radio/RadioGroup.svelte.d.ts +15 -7
- package/components/Radio/RadioItem.svelte +24 -20
- package/components/Radio/RadioItem.svelte.d.ts +10 -6
- package/components/RangeSlider/RangeSlider.svelte +9 -17
- package/components/RangeSlider/RangeSlider.svelte.d.ts +11 -2
- package/components/SlideToggle/SlideToggle.svelte +10 -9
- package/components/SlideToggle/SlideToggle.svelte.d.ts +11 -3
- package/components/Stepper/Step.svelte +64 -107
- package/components/Stepper/Step.svelte.d.ts +17 -18
- package/components/Stepper/Stepper.svelte +58 -37
- package/components/Stepper/Stepper.svelte.d.ts +28 -14
- package/components/Tab/Tab.svelte +40 -38
- package/components/Tab/Tab.svelte.d.ts +19 -14
- package/components/Tab/TabGroup.svelte +28 -41
- package/components/Tab/TabGroup.svelte.d.ts +25 -9
- package/components/Table/Table.svelte.d.ts +9 -0
- package/components/TableOfContents/TableOfContents.svelte +3 -2
- package/components/TableOfContents/TableOfContents.svelte.d.ts +12 -0
- package/index.d.ts +2 -1
- package/index.js +1 -1
- package/package.json +15 -6
- package/styles/all.css +0 -3
- package/styles/elements/breadcrumbs.css +3 -4
- package/styles/elements/buttons.css +2 -4
- package/styles/elements/forms.css +269 -0
- package/styles/elements/lists.css +1 -1
- package/styles/elements.css +1 -0
- package/styles/typography.css +2 -2
- package/styles/variants.css +7 -7
- package/tailwind/generated/intellisense-classes.cjs +1 -1
- package/tailwind/generated/intellisense-classes.d.cts +270 -213
- package/utilities/CodeBlock/CodeBlock.svelte +2 -0
- package/utilities/CodeBlock/CodeBlock.svelte.d.ts +8 -0
- package/utilities/Drawer/Drawer.svelte.d.ts +13 -0
- package/utilities/LightSwitch/LightSwitch.svelte.d.ts +2 -0
- package/utilities/Modal/Modal.svelte +1 -1
- package/utilities/Modal/Modal.svelte.d.ts +18 -0
- package/utilities/Modal/examples/ModalExampleForm.svelte +6 -6
- package/utilities/Modal/examples/ModalExampleList.svelte +8 -9
- package/utilities/Toast/Toast.svelte +1 -1
- package/utilities/Toast/Toast.svelte.d.ts +12 -0
- package/components/Accordion/AccordionGroup.svelte +0 -33
- package/components/Accordion/AccordionGroup.svelte.d.ts +0 -24
- package/components/SvgIcon/SvgIcon.svelte +0 -33
- package/components/SvgIcon/SvgIcon.svelte.d.ts +0 -26
- package/components/SvgIcon/icons.d.ts +0 -1
- package/components/SvgIcon/icons.js +0 -25
- package/styles/forms.css +0 -195
|
@@ -1,51 +1,38 @@
|
|
|
1
1
|
<script>import { setContext } from "svelte";
|
|
2
|
-
export let selected;
|
|
3
|
-
export let rail = true;
|
|
4
2
|
export let justify = "justify-start";
|
|
5
|
-
export let
|
|
6
|
-
export let
|
|
7
|
-
export let
|
|
8
|
-
export let
|
|
9
|
-
export let
|
|
3
|
+
export let border = "border-b border-surface-400-500-token";
|
|
4
|
+
export let active = "border-b-2 border-surface-900-50-token";
|
|
5
|
+
export let hover = "hover:variant-soft";
|
|
6
|
+
export let flex = "flex-none";
|
|
7
|
+
export let padding = "px-4 py-2";
|
|
10
8
|
export let rounded = "rounded-tl-container-token rounded-tr-container-token";
|
|
11
|
-
export let
|
|
12
|
-
export let
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
setContext("
|
|
16
|
-
setContext("color", color);
|
|
17
|
-
setContext("fill", fill);
|
|
9
|
+
export let regionList = "";
|
|
10
|
+
export let regionPanel = "";
|
|
11
|
+
export let labelledby = "";
|
|
12
|
+
export let panel = "";
|
|
13
|
+
setContext("active", active);
|
|
18
14
|
setContext("hover", hover);
|
|
15
|
+
setContext("flex", flex);
|
|
16
|
+
setContext("padding", padding);
|
|
19
17
|
setContext("rounded", rounded);
|
|
20
|
-
const cBase = "
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
if (["Home", "End"].includes(event.code)) {
|
|
24
|
-
event.preventDefault();
|
|
25
|
-
if (event.code === "Home") {
|
|
26
|
-
elemTabGroup.children[0].focus();
|
|
27
|
-
}
|
|
28
|
-
if (event.code === "End") {
|
|
29
|
-
elemTabGroup.children[elemTabGroup.children.length - 1].focus();
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
18
|
+
const cBase = "space-y-4 overflow-x-auto hide-scrollbars";
|
|
19
|
+
const cList = "flex";
|
|
20
|
+
const cPanel = "";
|
|
33
21
|
$:
|
|
34
|
-
|
|
22
|
+
classesBase = `${cBase} ${$$props.class ?? ""}`;
|
|
35
23
|
$:
|
|
36
|
-
|
|
24
|
+
classesList = `${cList} ${justify} ${border} ${regionList}`;
|
|
25
|
+
$:
|
|
26
|
+
classesPanel = `${cPanel} ${regionPanel}`;
|
|
37
27
|
</script>
|
|
38
28
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
<
|
|
42
|
-
bind:this={elemTabGroup}
|
|
43
|
-
on:keydown={keydown}
|
|
44
|
-
class="tab-group-list {classesGroup}"
|
|
45
|
-
role="tablist"
|
|
46
|
-
aria-labelledby={labeledby}
|
|
47
|
-
aria-label={label}
|
|
48
|
-
>
|
|
29
|
+
<div class="tab-group {classesBase}" data-testid="tab-group" on:click on:keypress on:keydown on:keyup>
|
|
30
|
+
<!-- Tab List -->
|
|
31
|
+
<div class="tab-list {classesList}" role="tablist" aria-labelledby={labelledby}>
|
|
49
32
|
<slot />
|
|
50
|
-
</
|
|
51
|
-
|
|
33
|
+
</div>
|
|
34
|
+
<!-- Tab Panel -->
|
|
35
|
+
{#if $$slots.panel}
|
|
36
|
+
<div class="tab-panel {classesPanel}" role="tabpanel" aria-labelledby={panel}><slot name="panel" /></div>
|
|
37
|
+
{/if}
|
|
38
|
+
</div>
|
|
@@ -1,25 +1,41 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type { Writable } from 'svelte/store';
|
|
3
2
|
declare const __propDef: {
|
|
4
3
|
props: {
|
|
5
4
|
[x: string]: any;
|
|
6
|
-
|
|
7
|
-
rail?: boolean | undefined;
|
|
5
|
+
/** Provide classes to set the tab list flex justification.*/
|
|
8
6
|
justify?: string | undefined;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
/** Provide classes to set the tab group border styles.*/
|
|
8
|
+
border?: string | undefined;
|
|
9
|
+
/** Provide classes to style each tab's active styles.*/
|
|
10
|
+
active?: string | undefined;
|
|
11
|
+
/** Provide classes to style each tab's hover styles.*/
|
|
13
12
|
hover?: string | undefined;
|
|
13
|
+
/** Provide classes to style each tab's flex styles.*/
|
|
14
|
+
flex?: string | undefined;
|
|
15
|
+
/** Provide classes to style each tab's padding styles.*/
|
|
16
|
+
padding?: string | undefined;
|
|
17
|
+
/** Provide classes to style each tab's box radius styles.*/
|
|
14
18
|
rounded?: string | undefined;
|
|
15
|
-
|
|
16
|
-
|
|
19
|
+
/** Provide arbitrary classes to style the tab list region.*/
|
|
20
|
+
regionList?: string | undefined;
|
|
21
|
+
/** Provide arbitrary classes to style the tab panel region.*/
|
|
22
|
+
regionPanel?: string | undefined;
|
|
23
|
+
/** Provide the ID of the element that labels the tab list.*/
|
|
24
|
+
labelledby?: string | undefined;
|
|
25
|
+
/** Matches the tab aria-control value, pairs with the panel.*/
|
|
26
|
+
panel?: string | undefined;
|
|
17
27
|
};
|
|
18
28
|
events: {
|
|
29
|
+
click: MouseEvent;
|
|
30
|
+
keypress: KeyboardEvent;
|
|
31
|
+
keydown: KeyboardEvent;
|
|
32
|
+
keyup: KeyboardEvent;
|
|
33
|
+
} & {
|
|
19
34
|
[evt: string]: CustomEvent<any>;
|
|
20
35
|
};
|
|
21
36
|
slots: {
|
|
22
37
|
default: {};
|
|
38
|
+
panel: {};
|
|
23
39
|
};
|
|
24
40
|
};
|
|
25
41
|
export type TabGroupProps = typeof __propDef.props;
|
|
@@ -3,16 +3,25 @@ import type { TableSource } from './types';
|
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
5
|
[x: string]: any;
|
|
6
|
+
/** Provide the full set of table source data.*/
|
|
6
7
|
source: TableSource;
|
|
8
|
+
/** Enables row hover style and `on:selected` event when rows are clicked.*/
|
|
7
9
|
interactive?: boolean | undefined;
|
|
10
|
+
/** Override the Tailwind Element class. Replace this for a headless UI.*/
|
|
8
11
|
element?: string | undefined;
|
|
12
|
+
/** Provide classes to set the table text size.*/
|
|
9
13
|
text?: string | undefined;
|
|
14
|
+
/** Provide classes to set the table text color.*/
|
|
10
15
|
color?: string | undefined;
|
|
16
|
+
/** Provide arbitrary classes for the table head.*/
|
|
11
17
|
regionHead?: string | undefined;
|
|
18
|
+
/** Provide arbitrary classes for the table body.*/
|
|
12
19
|
regionBody?: string | undefined;
|
|
20
|
+
/** Provide arbitrary classes for the table foot.*/
|
|
13
21
|
regionFoot?: string | undefined;
|
|
14
22
|
};
|
|
15
23
|
events: {
|
|
24
|
+
/** {rowMetaData} selected - Fires when a table row is clicked.*/
|
|
16
25
|
selected: CustomEvent<any>;
|
|
17
26
|
} & {
|
|
18
27
|
[evt: string]: CustomEvent<any>;
|
|
@@ -10,8 +10,9 @@ export let hover = "hover:bg-primary-hover-token";
|
|
|
10
10
|
export let active = "bg-primary-active-token !text-on-primary-token";
|
|
11
11
|
export let rounded = "rounded-token";
|
|
12
12
|
export let regionLabel = "font-bold";
|
|
13
|
-
export let regionList = "
|
|
13
|
+
export let regionList = "";
|
|
14
14
|
const cLabel = "p-4 pt-0";
|
|
15
|
+
const cList = "list-none space-y-1";
|
|
15
16
|
const cListItem = "px-4 py-2 cursor-pointer";
|
|
16
17
|
let elemScrollParent;
|
|
17
18
|
let allowedHeadingsList = [];
|
|
@@ -75,7 +76,7 @@ $:
|
|
|
75
76
|
$:
|
|
76
77
|
classesLabel = `${cLabel} ${regionLabel}`;
|
|
77
78
|
$:
|
|
78
|
-
classesList = `${regionList}`;
|
|
79
|
+
classesList = `${cList} ${regionList}`;
|
|
79
80
|
$:
|
|
80
81
|
classesListItem = `${cListItem} ${text} ${hover} ${rounded}`;
|
|
81
82
|
</script>
|
|
@@ -2,17 +2,29 @@ import { SvelteComponentTyped } from "svelte";
|
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
4
|
[x: string]: any;
|
|
5
|
+
/** Query selector for the scrollable page element.*/
|
|
5
6
|
scrollParent?: string | undefined;
|
|
7
|
+
/** Query selector for the element to scan for headings.*/
|
|
6
8
|
target?: string | undefined;
|
|
9
|
+
/** Query selector for the allowed headings. From H2-H6.*/
|
|
7
10
|
allowedHeadings?: string | undefined;
|
|
11
|
+
/** Set the label text.*/
|
|
8
12
|
label?: string | undefined;
|
|
13
|
+
/** Set the component width style.*/
|
|
9
14
|
width?: string | undefined;
|
|
15
|
+
/** Set the vertical spacing styles.*/
|
|
10
16
|
spacing?: string | undefined;
|
|
17
|
+
/** Set the row text color styles.*/
|
|
11
18
|
text?: string | undefined;
|
|
19
|
+
/** Set the row hover styles.*/
|
|
12
20
|
hover?: string | undefined;
|
|
21
|
+
/** Set the active row styles*/
|
|
13
22
|
active?: string | undefined;
|
|
23
|
+
/** Set the row border radius styles.*/
|
|
14
24
|
rounded?: string | undefined;
|
|
25
|
+
/** Provide arbitrary styles for the label element.*/
|
|
15
26
|
regionLabel?: string | undefined;
|
|
27
|
+
/** Provide arbitrary styles for the list element.*/
|
|
16
28
|
regionList?: string | undefined;
|
|
17
29
|
};
|
|
18
30
|
events: {
|
package/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export type { DrawerSettings } from './utilities/Drawer/types';
|
|
|
3
3
|
export type { ModalSettings, ModalComponent } from './utilities/Modal/types';
|
|
4
4
|
export type { ToastSettings } from './utilities/Toast/types';
|
|
5
5
|
export type { TableSource } from './components/Table/types';
|
|
6
|
+
export type CssClasses = string;
|
|
6
7
|
export { storeHighlightJs } from './utilities/CodeBlock/stores';
|
|
7
8
|
export { drawerStore } from './utilities/Drawer/stores';
|
|
8
9
|
export { modalStore } from './utilities/Modal/stores';
|
|
@@ -16,7 +17,7 @@ export { filter } from './actions/Filters/filter';
|
|
|
16
17
|
export { focusTrap } from './actions/FocusTrap/focusTrap';
|
|
17
18
|
export { menu } from './utilities/Menu/menu';
|
|
18
19
|
export { tooltip } from './utilities/Tooltip/tooltip';
|
|
19
|
-
export { default as
|
|
20
|
+
export { default as Accordion } from './components/Accordion/Accordion.svelte';
|
|
20
21
|
export { default as AccordionItem } from './components/Accordion/AccordionItem.svelte';
|
|
21
22
|
export { default as AppBar } from './components/AppBar/AppBar.svelte';
|
|
22
23
|
export { default as AppRail } from './components/AppRail/AppRail.svelte';
|
package/index.js
CHANGED
|
@@ -22,7 +22,7 @@ export { focusTrap } from './actions/FocusTrap/focusTrap';
|
|
|
22
22
|
export { menu } from './utilities/Menu/menu';
|
|
23
23
|
export { tooltip } from './utilities/Tooltip/tooltip';
|
|
24
24
|
// Svelte Components ---
|
|
25
|
-
export { default as
|
|
25
|
+
export { default as Accordion } from './components/Accordion/Accordion.svelte';
|
|
26
26
|
export { default as AccordionItem } from './components/Accordion/AccordionItem.svelte';
|
|
27
27
|
export { default as AppBar } from './components/AppBar/AppBar.svelte';
|
|
28
28
|
export { default as AppRail } from './components/AppRail/AppRail.svelte';
|
package/package.json
CHANGED
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skeletonlabs/skeleton",
|
|
3
|
-
"version": "v0.
|
|
3
|
+
"version": "v0.124.2",
|
|
4
4
|
"description": "A SvelteKit component library.",
|
|
5
5
|
"author": "endigo9740 <chris@skeletonlabs.dev>",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/skeletonlabs/skeleton.git"
|
|
9
|
+
},
|
|
10
|
+
"bugs": {
|
|
11
|
+
"url": "https://github.com/skeletonlabs/skeleton/issues"
|
|
12
|
+
},
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"homepage": "https://skeleton.dev/",
|
|
6
15
|
"devDependencies": {
|
|
7
16
|
"@sveltejs/adapter-auto": "^1.0.2",
|
|
8
17
|
"@sveltejs/kit": "^1.1.3",
|
|
@@ -28,7 +37,6 @@
|
|
|
28
37
|
"prettier": "^2.8.3",
|
|
29
38
|
"prettier-plugin-svelte": "^2.9.0",
|
|
30
39
|
"sveld": "^0.18.0",
|
|
31
|
-
"svelte": "^3.55.1",
|
|
32
40
|
"svelte-check": "^3.0.2",
|
|
33
41
|
"svelte-preprocess": "^5.0.0",
|
|
34
42
|
"svelte2tsx": "^0.6.0",
|
|
@@ -41,6 +49,9 @@
|
|
|
41
49
|
},
|
|
42
50
|
"type": "module",
|
|
43
51
|
"types": "index.d.ts",
|
|
52
|
+
"dependencies": {
|
|
53
|
+
"svelte": "^3.55.1"
|
|
54
|
+
},
|
|
44
55
|
"exports": {
|
|
45
56
|
"./package.json": "./package.json",
|
|
46
57
|
"./.DS_Store": "./.DS_Store",
|
|
@@ -56,7 +67,7 @@
|
|
|
56
67
|
"./actions/Filters/svg-filters/Summer84.svelte": "./actions/Filters/svg-filters/Summer84.svelte",
|
|
57
68
|
"./actions/Filters/svg-filters/XPro.svelte": "./actions/Filters/svg-filters/XPro.svelte",
|
|
58
69
|
"./actions/FocusTrap/focusTrap": "./actions/FocusTrap/focusTrap.js",
|
|
59
|
-
"./components/Accordion/
|
|
70
|
+
"./components/Accordion/Accordion.svelte": "./components/Accordion/Accordion.svelte",
|
|
60
71
|
"./components/Accordion/AccordionItem.svelte": "./components/Accordion/AccordionItem.svelte",
|
|
61
72
|
"./components/AppBar/AppBar.svelte": "./components/AppBar/AppBar.svelte",
|
|
62
73
|
"./components/AppRail/AppRail.svelte": "./components/AppRail/AppRail.svelte",
|
|
@@ -81,8 +92,6 @@
|
|
|
81
92
|
"./components/SlideToggle/SlideToggle.svelte": "./components/SlideToggle/SlideToggle.svelte",
|
|
82
93
|
"./components/Stepper/Step.svelte": "./components/Stepper/Step.svelte",
|
|
83
94
|
"./components/Stepper/Stepper.svelte": "./components/Stepper/Stepper.svelte",
|
|
84
|
-
"./components/SvgIcon/SvgIcon.svelte": "./components/SvgIcon/SvgIcon.svelte",
|
|
85
|
-
"./components/SvgIcon/icons": "./components/SvgIcon/icons.js",
|
|
86
95
|
"./components/Tab/Tab.svelte": "./components/Tab/Tab.svelte",
|
|
87
96
|
"./components/Tab/TabGroup.svelte": "./components/Tab/TabGroup.svelte",
|
|
88
97
|
"./components/Table/Table.svelte": "./components/Table/Table.svelte",
|
|
@@ -98,6 +107,7 @@
|
|
|
98
107
|
"./styles/elements/buttons.css": "./styles/elements/buttons.css",
|
|
99
108
|
"./styles/elements/cards.css": "./styles/elements/cards.css",
|
|
100
109
|
"./styles/elements/chips.css": "./styles/elements/chips.css",
|
|
110
|
+
"./styles/elements/forms.css": "./styles/elements/forms.css",
|
|
101
111
|
"./styles/elements/lists.css": "./styles/elements/lists.css",
|
|
102
112
|
"./styles/elements/logo-clouds.css": "./styles/elements/logo-clouds.css",
|
|
103
113
|
"./styles/elements/menus.css": "./styles/elements/menus.css",
|
|
@@ -105,7 +115,6 @@
|
|
|
105
115
|
"./styles/elements/tables.css": "./styles/elements/tables.css",
|
|
106
116
|
"./styles/elements/tooltips.css": "./styles/elements/tooltips.css",
|
|
107
117
|
"./styles/elements.css": "./styles/elements.css",
|
|
108
|
-
"./styles/forms.css": "./styles/forms.css",
|
|
109
118
|
"./styles/highlight-js.css": "./styles/highlight-js.css",
|
|
110
119
|
"./styles/tailwind.css": "./styles/tailwind.css",
|
|
111
120
|
"./styles/typography.css": "./styles/typography.css",
|
package/styles/all.css
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
/* Tailwind Elements: breadcrumbs.css */
|
|
2
2
|
|
|
3
3
|
@layer components {
|
|
4
|
-
.breadcrumb
|
|
5
|
-
@apply flex items-center space-x-4 w-full hide-scrollbar overflow-x-auto;
|
|
6
|
-
}
|
|
4
|
+
.breadcrumb,
|
|
7
5
|
.breadcrumb-nonresponsive {
|
|
8
|
-
@apply
|
|
6
|
+
@apply flex items-center space-x-4 w-full hide-scrollbar overflow-x-auto;
|
|
9
7
|
}
|
|
8
|
+
|
|
10
9
|
.crumb {
|
|
11
10
|
@apply flex justify-center items-center space-x-2;
|
|
12
11
|
}
|
|
@@ -28,12 +28,10 @@
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
/* Button: Sizes */
|
|
31
|
+
/* Note: Default values are built into `.btn` */
|
|
31
32
|
.btn-sm {
|
|
32
33
|
@apply text-sm px-3 py-1.5;
|
|
33
34
|
}
|
|
34
|
-
.btn-base {
|
|
35
|
-
@apply text-base px-5 py-[9px];
|
|
36
|
-
}
|
|
37
35
|
.btn-lg {
|
|
38
36
|
@apply text-lg px-7 py-3;
|
|
39
37
|
}
|
|
@@ -69,7 +67,7 @@
|
|
|
69
67
|
|
|
70
68
|
/* File Input Button */
|
|
71
69
|
input[type='file']:not(.file-dropzone-input)::file-selector-button {
|
|
72
|
-
@apply border-0 btn variant-filled
|
|
70
|
+
@apply border-0 btn variant-filled btn-sm mr-2;
|
|
73
71
|
}
|
|
74
72
|
|
|
75
73
|
/* === Button Groups === */
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
/* Stylesheet: forms.css */
|
|
2
|
+
|
|
3
|
+
@layer base {
|
|
4
|
+
/* === Resets === */
|
|
5
|
+
|
|
6
|
+
fieldset,
|
|
7
|
+
legend,
|
|
8
|
+
label {
|
|
9
|
+
@apply block;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/* Placeholders */
|
|
13
|
+
::-moz-placeholder {
|
|
14
|
+
@apply text-surface-500-400-token;
|
|
15
|
+
}
|
|
16
|
+
:-ms-input-placeholder {
|
|
17
|
+
@apply text-surface-500-400-token;
|
|
18
|
+
}
|
|
19
|
+
::placeholder {
|
|
20
|
+
@apply text-surface-500-400-token;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/* Date Calendar Picker (Webkit) */
|
|
24
|
+
::-webkit-calendar-picker-indicator {
|
|
25
|
+
@apply dark:invert;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/* Progress Bar */
|
|
29
|
+
progress {
|
|
30
|
+
webkit-appearance: none;
|
|
31
|
+
-moz-appearance: none;
|
|
32
|
+
appearance: none;
|
|
33
|
+
@apply w-full h-2 overflow-hidden rounded-token;
|
|
34
|
+
@apply bg-surface-400-500-token;
|
|
35
|
+
}
|
|
36
|
+
progress::-webkit-progress-bar {
|
|
37
|
+
@apply bg-surface-400-500-token;
|
|
38
|
+
}
|
|
39
|
+
progress::-webkit-progress-value {
|
|
40
|
+
@apply bg-surface-900-50-token;
|
|
41
|
+
}
|
|
42
|
+
::-moz-progress-bar {
|
|
43
|
+
@apply bg-surface-900-50-token;
|
|
44
|
+
}
|
|
45
|
+
:indeterminate::-moz-progress-bar {
|
|
46
|
+
width: 0;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/* Range Input */
|
|
50
|
+
/* https://developer.mozilla.org/en-US/docs/Web/CSS/accent-color */
|
|
51
|
+
[type='range'] {
|
|
52
|
+
@apply w-full accent-surface-900 dark:accent-surface-50;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* === Text Labeling === */
|
|
56
|
+
|
|
57
|
+
.legend {
|
|
58
|
+
@apply font-heading-token text-xl md:text-2xl;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.label {
|
|
62
|
+
@apply space-y-1;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* === Core Styles === */
|
|
66
|
+
|
|
67
|
+
.input,
|
|
68
|
+
.textarea,
|
|
69
|
+
.select,
|
|
70
|
+
.input-group {
|
|
71
|
+
@apply w-full transition duration-200;
|
|
72
|
+
/* Background */
|
|
73
|
+
@apply bg-surface-200-700-token focus:brightness-105 hover:brightness-105;
|
|
74
|
+
/* Ring */
|
|
75
|
+
@apply !ring-0;
|
|
76
|
+
/* Border */
|
|
77
|
+
@apply border-token border-surface-400-500-token focus:border-primary-500;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/* Base Inputs */
|
|
81
|
+
.input,
|
|
82
|
+
.input-group {
|
|
83
|
+
@apply rounded-token;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/* Container Inputs */
|
|
87
|
+
.textarea,
|
|
88
|
+
.select {
|
|
89
|
+
@apply rounded-container-token;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/* Select (size/multiple) */
|
|
93
|
+
.select {
|
|
94
|
+
@apply p-2 space-y-1;
|
|
95
|
+
}
|
|
96
|
+
.select[size] {
|
|
97
|
+
@apply bg-none;
|
|
98
|
+
}
|
|
99
|
+
.select optgroup {
|
|
100
|
+
@apply space-y-1 font-bold;
|
|
101
|
+
}
|
|
102
|
+
.select optgroup option {
|
|
103
|
+
@apply ml-0 pl-0;
|
|
104
|
+
}
|
|
105
|
+
.select optgroup option:first-of-type {
|
|
106
|
+
@apply mt-3;
|
|
107
|
+
}
|
|
108
|
+
.select optgroup option:last-child {
|
|
109
|
+
@apply !mb-3;
|
|
110
|
+
}
|
|
111
|
+
.select option {
|
|
112
|
+
@apply px-4 py-2 rounded-token;
|
|
113
|
+
}
|
|
114
|
+
.select option:checked {
|
|
115
|
+
/* https://stackoverflow.com/questions/50618602/change-color-of-selected-option-in-select-multiple */
|
|
116
|
+
background: rgb(var(--color-surface-900)) linear-gradient(0deg, rgb(var(--color-surface-900)) 0%, rgb(var(--color-surface-900)) 100%);
|
|
117
|
+
@apply text-surface-50-900-token;
|
|
118
|
+
}
|
|
119
|
+
.dark .select option:checked {
|
|
120
|
+
/* https://stackoverflow.com/questions/50618602/change-color-of-selected-option-in-select-multiple */
|
|
121
|
+
background: rgb(var(--color-surface-50)) linear-gradient(0deg, rgb(var(--color-surface-50)) 0%, rgb(var(--color-surface-50)) 100%);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/* Checkbox & Radio */
|
|
125
|
+
.checkbox,
|
|
126
|
+
.radio {
|
|
127
|
+
@apply w-5 h-5 !ring-0 rounded cursor-pointer;
|
|
128
|
+
/* Background */
|
|
129
|
+
@apply bg-surface-200-700-token focus:brightness-105 hover:brightness-105;
|
|
130
|
+
/* Border */
|
|
131
|
+
@apply border-token border-surface-400-500-token focus:border-primary-500;
|
|
132
|
+
}
|
|
133
|
+
.checkbox:checked,
|
|
134
|
+
.radio:checked {
|
|
135
|
+
@apply bg-primary-500 hover:bg-primary-500 focus:bg-primary-500 focus:ring-0;
|
|
136
|
+
}
|
|
137
|
+
.radio {
|
|
138
|
+
@apply rounded-token;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/* === Specialized === */
|
|
142
|
+
|
|
143
|
+
/* File Inputs */
|
|
144
|
+
.input[type='file'] {
|
|
145
|
+
@apply p-1;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/* Color Picker */
|
|
149
|
+
/* https://stackoverflow.com/questions/11167281/webkit-css-to-control-the-box-around-the-color-in-an-inputtype-color */
|
|
150
|
+
.input[type='color'] {
|
|
151
|
+
@apply border-none w-10 h-10 overflow-hidden rounded-token cursor-pointer;
|
|
152
|
+
-webkit-appearance: none; /* WebKit Only */
|
|
153
|
+
}
|
|
154
|
+
.input[type='color']::-webkit-color-swatch-wrapper {
|
|
155
|
+
@apply p-0;
|
|
156
|
+
}
|
|
157
|
+
.input[type='color']::-webkit-color-swatch {
|
|
158
|
+
@apply border-none hover:brightness-110;
|
|
159
|
+
}
|
|
160
|
+
.input[type='color']::-moz-color-swatch {
|
|
161
|
+
@apply border-none;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/* === States === */
|
|
165
|
+
|
|
166
|
+
.input:disabled,
|
|
167
|
+
.textarea:disabled,
|
|
168
|
+
.select:disabled {
|
|
169
|
+
@apply !opacity-50 !cursor-not-allowed hover:!brightness-100;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.input[readonly],
|
|
173
|
+
.textarea[readonly],
|
|
174
|
+
.select[readonly] {
|
|
175
|
+
@apply !border-0 !cursor-not-allowed hover:!brightness-100;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/* === Input Groups === */
|
|
179
|
+
|
|
180
|
+
.input-group {
|
|
181
|
+
@apply grid overflow-hidden;
|
|
182
|
+
}
|
|
183
|
+
.input-group input,
|
|
184
|
+
.input-group select {
|
|
185
|
+
@apply border-0 ring-0 bg-transparent;
|
|
186
|
+
}
|
|
187
|
+
.input-group div,
|
|
188
|
+
.input-group a,
|
|
189
|
+
.input-group button {
|
|
190
|
+
@apply px-4 flex justify-between items-center;
|
|
191
|
+
}
|
|
192
|
+
.input-group-divider input,
|
|
193
|
+
.input-group-divider select,
|
|
194
|
+
.input-group-divider div,
|
|
195
|
+
.input-group-divider a {
|
|
196
|
+
@apply border-l border-surface-400-500-token focus:border-surface-400-500-token;
|
|
197
|
+
/* Disable Ring */
|
|
198
|
+
@apply !ring-0;
|
|
199
|
+
/* Prevent buttons from being squished */
|
|
200
|
+
@apply !min-w-fit;
|
|
201
|
+
}
|
|
202
|
+
.input-group-divider *:first-child {
|
|
203
|
+
@apply !border-l-0;
|
|
204
|
+
}
|
|
205
|
+
.input-group-shim {
|
|
206
|
+
@apply bg-surface-400/10 text-surface-600-300-token;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/* === Variants === */
|
|
210
|
+
|
|
211
|
+
/* success */
|
|
212
|
+
.input-success {
|
|
213
|
+
@apply !bg-success-200 !border-success-500 !text-success-700;
|
|
214
|
+
}
|
|
215
|
+
.input-success::-moz-placeholder {
|
|
216
|
+
@apply text-success-700;
|
|
217
|
+
}
|
|
218
|
+
.input-success:-ms-input-placeholder {
|
|
219
|
+
@apply text-success-700;
|
|
220
|
+
}
|
|
221
|
+
.input-success::placeholder {
|
|
222
|
+
@apply text-success-700;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/* warning */
|
|
226
|
+
.input-warning {
|
|
227
|
+
@apply !bg-warning-200 !border-warning-500 !text-warning-700;
|
|
228
|
+
}
|
|
229
|
+
.input-warning::-moz-placeholder {
|
|
230
|
+
@apply text-warning-700;
|
|
231
|
+
}
|
|
232
|
+
.input-warning:-ms-input-placeholder {
|
|
233
|
+
@apply text-warning-700;
|
|
234
|
+
}
|
|
235
|
+
.input-warning::placeholder {
|
|
236
|
+
@apply text-warning-700;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/* error */
|
|
240
|
+
.input-error {
|
|
241
|
+
@apply !bg-error-200 !border-error-500 !text-error-500;
|
|
242
|
+
}
|
|
243
|
+
.input-error::-moz-placeholder {
|
|
244
|
+
@apply text-error-500;
|
|
245
|
+
}
|
|
246
|
+
.input-error:-ms-input-placeholder {
|
|
247
|
+
@apply text-error-500;
|
|
248
|
+
}
|
|
249
|
+
.input-error::placeholder {
|
|
250
|
+
@apply text-error-500;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/* === Variants === */
|
|
254
|
+
|
|
255
|
+
/* Material */
|
|
256
|
+
.variant-form-material {
|
|
257
|
+
/* Border Radius */
|
|
258
|
+
@apply !rounded-tl !rounded-tr !rounded-bl-none !rounded-br-none;
|
|
259
|
+
/* Background */
|
|
260
|
+
@apply bg-surface-500/10 dark:bg-surface-500/20;
|
|
261
|
+
/* Border */
|
|
262
|
+
@apply border-0 border-b-2;
|
|
263
|
+
/* Blur */
|
|
264
|
+
@apply backdrop-blur;
|
|
265
|
+
}
|
|
266
|
+
.variant-form-material[type='file'] {
|
|
267
|
+
@apply !py-1.5;
|
|
268
|
+
}
|
|
269
|
+
}
|
package/styles/elements.css
CHANGED
package/styles/typography.css
CHANGED
|
@@ -56,8 +56,8 @@
|
|
|
56
56
|
@apply font-mono text-base bg-[#141517] text-white p-4 whitespace-pre-wrap overflow-x-auto rounded-container-token;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
code:not(.unstyled):
|
|
60
|
-
@apply font-mono text-xs text-primary-700 dark:text-primary-400;
|
|
59
|
+
code:not(.unstyled):is(:not(.prose *)):is(:not(pre *)) {
|
|
60
|
+
@apply font-mono text-xs text-primary-700 dark:text-primary-400 whitespace-nowrap;
|
|
61
61
|
@apply bg-primary-500/30 dark:bg-primary-500/20;
|
|
62
62
|
@apply py-0.5 px-1 rounded;
|
|
63
63
|
}
|