@skeletonlabs/skeleton 0.86.9 → 0.92.0

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.
Files changed (73) hide show
  1. package/components/Accordion/AccordionItem.svelte +5 -2
  2. package/components/ConicGradient/ConicGradient.svelte +1 -1
  3. package/{tailwind/colors.d.ts → components/ConicGradient/settings.d.ts} +1 -1
  4. package/{tailwind/colors.js → components/ConicGradient/settings.js} +1 -1
  5. package/components/FileDropzone/FileDropzone.svelte +1 -4
  6. package/components/InputChip/InputChip.svelte +107 -0
  7. package/components/InputChip/InputChip.svelte.d.ts +29 -0
  8. package/components/ListBox/ListBoxItem.svelte +3 -4
  9. package/components/SlideToggle/SlideToggle.svelte +1 -1
  10. package/components/Stepper/Step.svelte +25 -6
  11. package/components/Stepper/Step.svelte.d.ts +5 -0
  12. package/components/Stepper/Stepper.svelte +13 -0
  13. package/components/Stepper/Stepper.svelte.d.ts +2 -0
  14. package/components/SvgIcon/SvgIcon.svelte +1 -1
  15. package/components/SvgIcon/icons.js +2 -148
  16. package/components/Tab/Tab.svelte +1 -1
  17. package/components/TableOfContents/TableOfContents.svelte +132 -0
  18. package/components/TableOfContents/TableOfContents.svelte.d.ts +32 -0
  19. package/index.d.ts +2 -0
  20. package/index.js +2 -0
  21. package/package.json +20 -10
  22. package/styles/all.css +0 -3
  23. package/styles/core.css +3 -0
  24. package/styles/elements/alerts.css +43 -0
  25. package/styles/elements/badges.css +1 -1
  26. package/styles/elements/breadcrumbs.css +27 -0
  27. package/styles/elements/buttons.css +1 -1
  28. package/styles/elements/cards.css +1 -1
  29. package/styles/elements/chips.css +58 -7
  30. package/styles/elements/lists.css +1 -1
  31. package/styles/elements/logo-clouds.css +1 -1
  32. package/styles/elements/menus.css +1 -1
  33. package/styles/elements/placeholders.css +1 -1
  34. package/styles/elements/tooltips.css +1 -1
  35. package/styles/elements.css +2 -0
  36. package/styles/forms.css +57 -39
  37. package/styles/typography.css +2 -2
  38. package/tailwind/generated/allComponents.cjs +1 -0
  39. package/tailwind/generated/allComponents.d.cts +5552 -0
  40. package/tailwind/settings.cjs +20 -0
  41. package/tailwind/settings.d.cts +6 -0
  42. package/tailwind/skeleton.cjs +54 -0
  43. package/tailwind/skeleton.d.cts +5 -0
  44. package/tailwind/theme/colors.cjs +18 -0
  45. package/tailwind/theme/colors.d.cts +2 -0
  46. package/tailwind/tokens/backgrounds.cjs +40 -0
  47. package/tailwind/tokens/backgrounds.d.cts +2 -0
  48. package/tailwind/tokens/border-radius.cjs +21 -0
  49. package/tailwind/tokens/border-radius.d.cts +33 -0
  50. package/tailwind/tokens/borders.cjs +20 -0
  51. package/tailwind/tokens/borders.d.cts +6 -0
  52. package/tailwind/tokens/fills.cjs +20 -0
  53. package/tailwind/tokens/fills.d.cts +15 -0
  54. package/tailwind/tokens/rings.cjs +42 -0
  55. package/tailwind/tokens/rings.d.cts +17 -0
  56. package/tailwind/tokens/text.cjs +33 -0
  57. package/tailwind/tokens/text.d.cts +21 -0
  58. package/themes/theme-seasonal.css +2 -2
  59. package/themes/theme-skeleton.css +6 -6
  60. package/utilities/LightSwitch/LightSwitch.svelte +36 -13
  61. package/utilities/LightSwitch/stores.d.ts +2 -3
  62. package/utilities/Modal/Modal.svelte +4 -3
  63. package/utilities/Modal/types.d.ts +4 -2
  64. package/utilities/Toast/stores.js +0 -1
  65. package/styles/tokens/backgrounds.css +0 -329
  66. package/styles/tokens/border-radius.css +0 -41
  67. package/styles/tokens/borders.css +0 -253
  68. package/styles/tokens/fills.css +0 -38
  69. package/styles/tokens/rings.css +0 -253
  70. package/styles/tokens/text.css +0 -293
  71. package/styles/tokens.css +0 -8
  72. package/tailwind/theme.cjs +0 -39
  73. package/tailwind/theme.d.cts +0 -5
@@ -0,0 +1,132 @@
1
+ <script>import { onDestroy, onMount } from 'svelte';
2
+ // Props (settings)
3
+ /** Query selector for the scrollable page element. */
4
+ export let scrollParent = '#page';
5
+ /** Query selector for the element to scan for headings. */
6
+ export let target = '#page';
7
+ /** Query selector for the allowed headings. From H2-H6. */
8
+ export let allowedHeadings = 'h2, h3';
9
+ /** Set the label text. */
10
+ export let label = 'On This Page';
11
+ // Props (styles)
12
+ /** Set the component width style. */
13
+ export let width = 'w-[240px]';
14
+ /** Set the vertical spacing styles. */
15
+ export let spacing = 'space-y-4';
16
+ /** Set the row text color styles. */
17
+ export let text = 'text-surface-600-300-token';
18
+ /** Set the row hover styles. */
19
+ export let hover = 'hover:bg-primary-hover-token';
20
+ /** Set the active row styles */
21
+ export let active = 'bg-primary-active-token !text-on-primary-token';
22
+ /** Set the row border radius styles. */
23
+ export let rounded = 'rounded-token';
24
+ // Props Regions
25
+ /** Provide arbitrary styles for the label element. */
26
+ export let regionLabel = 'font-bold';
27
+ /** Provide arbitrary styles for the list element. */
28
+ export let regionList = 'list-none';
29
+ // Classes
30
+ const cLabel = 'p-4 pt-0';
31
+ const cListItem = 'px-4 py-2 cursor-pointer';
32
+ // Local
33
+ let elemScrollParent;
34
+ let allowedHeadingsList = [];
35
+ let filteredHeadingsList = [];
36
+ let activeHeaderId;
37
+ function queryAllowedHeadingsList() {
38
+ const elemTarget = document.querySelector(target);
39
+ allowedHeadingsList = elemTarget?.querySelectorAll(allowedHeadings);
40
+ }
41
+ function generateHeadingList() {
42
+ // Select only relevant headings
43
+ allowedHeadingsList?.forEach((elem, i) => {
44
+ // Skip if `data-toc-ignore` attribute set
45
+ if (elem.hasAttribute('data-toc-ignore'))
46
+ return;
47
+ // Generate a unique ID if none present
48
+ if (!elem.id) {
49
+ let newId = elem.innerText
50
+ .replaceAll(/[^a-zA-Z0-9 ]/g, '')
51
+ .replaceAll(' ', '-')
52
+ .toLowerCase();
53
+ elem.id = `${newId}-${i}`;
54
+ }
55
+ // Generate headings whitelist
56
+ filteredHeadingsList.push(elem);
57
+ });
58
+ // Update Headings list
59
+ filteredHeadingsList = [...filteredHeadingsList];
60
+ }
61
+ // Sets the indentation amount per heading
62
+ function setHeadingClasses(headingElem) {
63
+ if (headingElem.tagName === 'H3')
64
+ return 'ml-3';
65
+ if (headingElem.tagName === 'H4')
66
+ return 'ml-6';
67
+ if (headingElem.tagName === 'H5')
68
+ return 'ml-9';
69
+ if (headingElem.tagName === 'H6')
70
+ return 'ml-12';
71
+ return '';
72
+ }
73
+ // Scrolls to the selected heading
74
+ // https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView
75
+ function scrollToHeading(headingElem) {
76
+ const elemTarget = document.querySelector(`#${headingElem.id}`);
77
+ elemTarget.scrollIntoView({ behavior: 'smooth' });
78
+ }
79
+ function pageScrollHandler() {
80
+ const headingSizeThreadshold = 40; // px
81
+ // List of visible headings
82
+ let visibleHeadings = [];
83
+ // Loop each allowed heading from the target element
84
+ allowedHeadingsList?.forEach((header) => {
85
+ const scrollableTop = elemScrollParent?.getBoundingClientRect().top || 0;
86
+ const headerBoundTop = header.getBoundingClientRect().top;
87
+ const offsetTop = headerBoundTop - scrollableTop + headingSizeThreadshold;
88
+ // If heading visible, add to visibleHeadings
89
+ if (offsetTop >= 0)
90
+ visibleHeadings.push(header);
91
+ });
92
+ // Set the top-most header as the active ID
93
+ activeHeaderId = visibleHeadings[0].id;
94
+ }
95
+ // Lifecycle
96
+ onMount(() => {
97
+ queryAllowedHeadingsList();
98
+ generateHeadingList();
99
+ // Add Scrollable Parent Listener
100
+ elemScrollParent = document.querySelector(scrollParent);
101
+ elemScrollParent?.addEventListener('scroll', pageScrollHandler);
102
+ // Set initial active heading on load
103
+ pageScrollHandler();
104
+ });
105
+ onDestroy(() => {
106
+ elemScrollParent?.removeEventListener('scroll', pageScrollHandler);
107
+ });
108
+ // Reactive
109
+ $: classesBase = `${width} ${spacing} ${$$props.class ?? ''}`;
110
+ $: classesLabel = `${cLabel} ${regionLabel}`;
111
+ $: classesList = `${regionList}`;
112
+ $: classesListItem = `${cListItem} ${text} ${hover} ${rounded}`;
113
+ </script>
114
+
115
+ <!-- @component Allows you to quickly navigate the hierarchy of headings for the current page. -->
116
+
117
+ <div class="toc {classesBase}">
118
+ <nav class="toc-list {classesList}">
119
+ <div class="toc-label {classesLabel}">{label}</div>
120
+ {#each filteredHeadingsList as headingElem, i}
121
+ <!-- prettier-ignore -->
122
+ <li
123
+ class="toc-list-item {classesListItem} {setHeadingClasses(headingElem)} {headingElem.id === activeHeaderId ? active : ''}"
124
+ on:click={() => { scrollToHeading(headingElem); }}
125
+ on:click
126
+ on:keypress
127
+ >
128
+ {headingElem.innerText}
129
+ </li>
130
+ {/each}
131
+ </nav>
132
+ </div>
@@ -0,0 +1,32 @@
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: {
4
+ [x: string]: any;
5
+ scrollParent?: string | undefined;
6
+ target?: string | undefined;
7
+ allowedHeadings?: string | undefined;
8
+ label?: string | undefined;
9
+ width?: string | undefined;
10
+ spacing?: string | undefined;
11
+ text?: string | undefined;
12
+ hover?: string | undefined;
13
+ active?: string | undefined;
14
+ rounded?: string | undefined;
15
+ regionLabel?: string | undefined;
16
+ regionList?: string | undefined;
17
+ };
18
+ events: {
19
+ click: MouseEvent;
20
+ keypress: KeyboardEvent;
21
+ } & {
22
+ [evt: string]: CustomEvent<any>;
23
+ };
24
+ slots: {};
25
+ };
26
+ export type TableOfContentsProps = typeof __propDef.props;
27
+ export type TableOfContentsEvents = typeof __propDef.events;
28
+ export type TableOfContentsSlots = typeof __propDef.slots;
29
+ /** Allows you to quickly navigate the hierarchy of headings for the current page. */
30
+ export default class TableOfContents extends SvelteComponentTyped<TableOfContentsProps, TableOfContentsEvents, TableOfContentsSlots> {
31
+ }
32
+ export {};
package/index.d.ts CHANGED
@@ -31,6 +31,7 @@ export { default as Divider } from './components/Divider/Divider.svelte';
31
31
  export { default as FileButton } from './components/FileButton/FileButton.svelte';
32
32
  export { default as FileDropzone } from './components/FileDropzone/FileDropzone.svelte';
33
33
  export { default as GradientHeading } from './components/GradientHeading/GradientHeading.svelte';
34
+ export { default as InputChip } from './components/InputChip/InputChip.svelte';
34
35
  export { default as ListBox } from './components/ListBox/ListBox.svelte';
35
36
  export { default as ListBoxItem } from './components/ListBox/ListBoxItem.svelte';
36
37
  export { default as Paginator } from './components/Paginator/Paginator.svelte';
@@ -45,6 +46,7 @@ export { default as Step } from './components/Stepper/Step.svelte';
45
46
  export { default as Table } from './components/Table/Table.svelte';
46
47
  export { default as TabGroup } from './components/Tab/TabGroup.svelte';
47
48
  export { default as Tab } from './components/Tab/Tab.svelte';
49
+ export { default as TableOfContents } from './components/TableOfContents/TableOfContents.svelte';
48
50
  export { default as CodeBlock } from './utilities/CodeBlock/CodeBlock.svelte';
49
51
  export { default as Modal } from './utilities/Modal/Modal.svelte';
50
52
  export { default as Drawer } from './utilities/Drawer/Drawer.svelte';
package/index.js CHANGED
@@ -37,6 +37,7 @@ export { default as Divider } from './components/Divider/Divider.svelte';
37
37
  export { default as FileButton } from './components/FileButton/FileButton.svelte';
38
38
  export { default as FileDropzone } from './components/FileDropzone/FileDropzone.svelte';
39
39
  export { default as GradientHeading } from './components/GradientHeading/GradientHeading.svelte';
40
+ export { default as InputChip } from './components/InputChip/InputChip.svelte';
40
41
  export { default as ListBox } from './components/ListBox/ListBox.svelte';
41
42
  export { default as ListBoxItem } from './components/ListBox/ListBoxItem.svelte';
42
43
  export { default as Paginator } from './components/Paginator/Paginator.svelte';
@@ -51,6 +52,7 @@ export { default as Step } from './components/Stepper/Step.svelte';
51
52
  export { default as Table } from './components/Table/Table.svelte';
52
53
  export { default as TabGroup } from './components/Tab/TabGroup.svelte';
53
54
  export { default as Tab } from './components/Tab/Tab.svelte';
55
+ export { default as TableOfContents } from './components/TableOfContents/TableOfContents.svelte';
54
56
  // Utility Components
55
57
  export { default as CodeBlock } from './utilities/CodeBlock/CodeBlock.svelte';
56
58
  export { default as Modal } from './utilities/Modal/Modal.svelte';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skeletonlabs/skeleton",
3
- "version": "0.86.9",
3
+ "version": "v0.92.0",
4
4
  "description": "A SvelteKit component library.",
5
5
  "author": "endigo9740 <chris@skeletonlabs.dev>",
6
6
  "devDependencies": {
@@ -21,7 +21,10 @@
21
21
  "highlight.js": "^11.7.0",
22
22
  "jsdom": "^20.0.3",
23
23
  "postcss": "^8.4.20",
24
+ "postcss-cli": "^10.1.0",
25
+ "postcss-import": "^15.0.1",
24
26
  "postcss-load-config": "^4.0.1",
27
+ "prejss-cli": "^0.3.3",
25
28
  "prettier": "^2.8.1",
26
29
  "prettier-plugin-svelte": "^2.9.0",
27
30
  "sveld": "^0.18.0",
@@ -63,11 +66,13 @@
63
66
  "./components/Breadcrumb/Breadcrumb.svelte": "./components/Breadcrumb/Breadcrumb.svelte",
64
67
  "./components/Breadcrumb/Crumb.svelte": "./components/Breadcrumb/Crumb.svelte",
65
68
  "./components/ConicGradient/ConicGradient.svelte": "./components/ConicGradient/ConicGradient.svelte",
69
+ "./components/ConicGradient/settings": "./components/ConicGradient/settings.js",
66
70
  "./components/ConicGradient/types": "./components/ConicGradient/types.js",
67
71
  "./components/Divider/Divider.svelte": "./components/Divider/Divider.svelte",
68
72
  "./components/FileButton/FileButton.svelte": "./components/FileButton/FileButton.svelte",
69
73
  "./components/FileDropzone/FileDropzone.svelte": "./components/FileDropzone/FileDropzone.svelte",
70
74
  "./components/GradientHeading/GradientHeading.svelte": "./components/GradientHeading/GradientHeading.svelte",
75
+ "./components/InputChip/InputChip.svelte": "./components/InputChip/InputChip.svelte",
71
76
  "./components/ListBox/ListBox.svelte": "./components/ListBox/ListBox.svelte",
72
77
  "./components/ListBox/ListBoxItem.svelte": "./components/ListBox/ListBoxItem.svelte",
73
78
  "./components/Paginator/Paginator.svelte": "./components/Paginator/Paginator.svelte",
@@ -87,10 +92,13 @@
87
92
  "./components/Table/Table.svelte": "./components/Table/Table.svelte",
88
93
  "./components/Table/types": "./components/Table/types.js",
89
94
  "./components/Table/utils": "./components/Table/utils.js",
95
+ "./components/TableOfContents/TableOfContents.svelte": "./components/TableOfContents/TableOfContents.svelte",
90
96
  ".": "./index.js",
91
97
  "./styles/all.css": "./styles/all.css",
92
98
  "./styles/core.css": "./styles/core.css",
99
+ "./styles/elements/alerts.css": "./styles/elements/alerts.css",
93
100
  "./styles/elements/badges.css": "./styles/elements/badges.css",
101
+ "./styles/elements/breadcrumbs.css": "./styles/elements/breadcrumbs.css",
94
102
  "./styles/elements/buttons.css": "./styles/elements/buttons.css",
95
103
  "./styles/elements/cards.css": "./styles/elements/cards.css",
96
104
  "./styles/elements/chips.css": "./styles/elements/chips.css",
@@ -104,16 +112,18 @@
104
112
  "./styles/forms.css": "./styles/forms.css",
105
113
  "./styles/highlight-js.css": "./styles/highlight-js.css",
106
114
  "./styles/tailwind.css": "./styles/tailwind.css",
107
- "./styles/tokens/backgrounds.css": "./styles/tokens/backgrounds.css",
108
- "./styles/tokens/border-radius.css": "./styles/tokens/border-radius.css",
109
- "./styles/tokens/borders.css": "./styles/tokens/borders.css",
110
- "./styles/tokens/fills.css": "./styles/tokens/fills.css",
111
- "./styles/tokens/rings.css": "./styles/tokens/rings.css",
112
- "./styles/tokens/text.css": "./styles/tokens/text.css",
113
- "./styles/tokens.css": "./styles/tokens.css",
114
115
  "./styles/typography.css": "./styles/typography.css",
115
- "./tailwind/colors": "./tailwind/colors.js",
116
- "./tailwind/theme.cjs": "./tailwind/theme.cjs",
116
+ "./tailwind/.DS_Store": "./tailwind/.DS_Store",
117
+ "./tailwind/generated/allComponents.cjs": "./tailwind/generated/allComponents.cjs",
118
+ "./tailwind/settings.cjs": "./tailwind/settings.cjs",
119
+ "./tailwind/skeleton.cjs": "./tailwind/skeleton.cjs",
120
+ "./tailwind/theme/colors.cjs": "./tailwind/theme/colors.cjs",
121
+ "./tailwind/tokens/backgrounds.cjs": "./tailwind/tokens/backgrounds.cjs",
122
+ "./tailwind/tokens/border-radius.cjs": "./tailwind/tokens/border-radius.cjs",
123
+ "./tailwind/tokens/borders.cjs": "./tailwind/tokens/borders.cjs",
124
+ "./tailwind/tokens/fills.cjs": "./tailwind/tokens/fills.cjs",
125
+ "./tailwind/tokens/rings.cjs": "./tailwind/tokens/rings.cjs",
126
+ "./tailwind/tokens/text.cjs": "./tailwind/tokens/text.cjs",
117
127
  "./themes/theme-crimson.css": "./themes/theme-crimson.css",
118
128
  "./themes/theme-gold-nouveau.css": "./themes/theme-gold-nouveau.css",
119
129
  "./themes/theme-hamlindigo.css": "./themes/theme-hamlindigo.css",
package/styles/all.css CHANGED
@@ -5,9 +5,6 @@
5
5
  /* Tailwind Directives */
6
6
  @import 'tailwind.css';
7
7
 
8
- /* Design Tokens */
9
- @import 'tokens.css';
10
-
11
8
  /* Global Styles */
12
9
  @import 'core.css';
13
10
 
package/styles/core.css CHANGED
@@ -50,4 +50,7 @@
50
50
  hr:not(.divider) {
51
51
  @apply block border-t border-solid border-surface-300-600-token;
52
52
  }
53
+ .divider-vertical {
54
+ @apply inline-block border-l border-solid border-surface-300-600-token min-h-[10px] mx-auto;
55
+ }
53
56
  }
@@ -0,0 +1,43 @@
1
+ /* Tailwind Elements: alerts.css */
2
+
3
+ @layer components {
4
+ .alert {
5
+ @apply flex flex-col items-start lg:items-center lg:flex-row p-4 space-y-4 lg:space-y-0 lg:space-x-4;
6
+ /* Background */
7
+ @apply bg-warning-500/20;
8
+ /* Border */
9
+ @apply border border-warning-500;
10
+ /* Rounded */
11
+ @apply rounded-container-token;
12
+ }
13
+ .alert-message {
14
+ @apply flex-auto space-y-2;
15
+ }
16
+ .alert-actions {
17
+ @apply flex items-center space-x-2;
18
+ }
19
+
20
+ /* === Variants === */
21
+
22
+ .alert-primary {
23
+ @apply bg-primary-500/20 border-primary-500;
24
+ }
25
+ .alert-secondary {
26
+ @apply bg-secondary-500/20 border-secondary-500;
27
+ }
28
+ .alert-tertiary {
29
+ @apply bg-tertiary-500/20 border-tertiary-500;
30
+ }
31
+ .alert-success {
32
+ @apply bg-success-500/20 border-success-500;
33
+ }
34
+ .alert-warning {
35
+ @apply bg-warning-500/20 border-warning-500;
36
+ }
37
+ .alert-error {
38
+ @apply bg-error-500/20 border-error-500;
39
+ }
40
+ .alert-surface {
41
+ @apply bg-surface-500/20 border-surface-500;
42
+ }
43
+ }
@@ -1,4 +1,4 @@
1
- /* Stylesheet Add-On: badges.css */
1
+ /* Tailwind Elements: badges.css */
2
2
 
3
3
  @layer components {
4
4
  .badge {
@@ -0,0 +1,27 @@
1
+ /* Tailwind Elements: breadcrumbs.css */
2
+
3
+ @layer components {
4
+ .breadcrumb-nonresponsive {
5
+ @apply flex items-center space-x-4 w-full hide-scrollbar overflow-x-auto;
6
+ }
7
+ .breadcrumb {
8
+ @apply breadcrumb-nonresponsive;
9
+ }
10
+ .crumb {
11
+ @apply flex justify-center items-center space-x-2;
12
+ }
13
+ .crumb-separator {
14
+ @apply flex text-surface-700-200-token opacity-50;
15
+ }
16
+
17
+ /* === Auto-Responsive === */
18
+
19
+ .breadcrumb li {
20
+ @apply hidden md:block;
21
+ }
22
+ .breadcrumb li:nth-last-child(3),
23
+ .breadcrumb li:nth-last-child(2),
24
+ .breadcrumb li:nth-last-child(1) {
25
+ @apply block;
26
+ }
27
+ }
@@ -1,4 +1,4 @@
1
- /* Stylesheet Add-On: button.css */
1
+ /* Tailwind Elements: button.css */
2
2
 
3
3
  @layer components {
4
4
  /* === States === */
@@ -1,4 +1,4 @@
1
- /* Stylesheet Add-On: cards.css */
1
+ /* Tailwind Elements: cards.css */
2
2
 
3
3
  @layer components {
4
4
  /* === Card (parent) === */
@@ -1,20 +1,71 @@
1
- /* Stylesheet Add-On: chips.css */
1
+ /* Tailwind Elements: chips.css */
2
2
 
3
3
  /* NOTE: these are a work in progress; best not to use them yet! */
4
4
 
5
5
  @layer components {
6
6
  .chip {
7
7
  /* Core */
8
- @apply inline-flex items-center space-x-2 whitespace-nowrap;
8
+ @apply inline-flex items-center space-x-2 whitespace-nowrap cursor-pointer;
9
9
  /* Text */
10
- @apply text-xs text-primary-700 dark:text-primary-500;
10
+ @apply text-xs text-token;
11
11
  /* Padding */
12
- @apply px-2 py-1;
12
+ @apply px-3 py-1.5;
13
13
  /* Theme: Rounded */
14
14
  @apply rounded;
15
- /* Border */
16
- @apply border border-primary-700 dark:border-primary-500;
15
+ /* Ring */
16
+ @apply ring-[1px] ring-surface-500-400-token ring-inset;
17
17
  /* Background */
18
- @apply bg-primary-500/5 backdrop-blur-lg hover:bg-primary-500/20;
18
+ @apply hover:bg-surface-hover-token;
19
+ }
20
+
21
+ .chip-disabled,
22
+ .chip:disabled {
23
+ @apply !opacity-50 !cursor-not-allowed active:scale-100;
24
+ }
25
+
26
+ /* === Variations === */
27
+
28
+ .chip-primary {
29
+ @apply ring-primary-500-400-token hover:bg-primary-hover-token;
30
+ }
31
+ .chip-secondary {
32
+ @apply ring-secondary-500-400-token hover:bg-secondary-hover-token;
33
+ }
34
+ .chip-tertiary {
35
+ @apply ring-tertiary-500-400-token hover:bg-tertiary-hover-token;
36
+ }
37
+ .chip-success {
38
+ @apply ring-success-500-400-token hover:bg-success-hover-token;
39
+ }
40
+ .chip-warning {
41
+ @apply ring-warning-500-400-token hover:bg-warning-hover-token;
42
+ }
43
+ .chip-error {
44
+ @apply ring-error-500-400-token hover:bg-error-hover-token;
45
+ }
46
+
47
+ /* === States === */
48
+
49
+ .chip-active,
50
+ .chip-primary-active {
51
+ @apply !bg-primary-500 !text-on-primary-token ring-0;
52
+ }
53
+ .chip-secondary-active {
54
+ @apply !bg-secondary-500 !text-on-secondary-token ring-0;
55
+ }
56
+ .chip-tertiary-active {
57
+ @apply !bg-tertiary-500 !text-on-tertiary-token ring-0;
58
+ }
59
+ .chip-success-active {
60
+ @apply !bg-success-500 !text-on-success-token ring-0;
61
+ }
62
+ .chip-warning-active {
63
+ @apply !bg-warning-500 !text-on-warning-token ring-0;
64
+ }
65
+ .chip-error-active {
66
+ @apply !bg-error-500 !text-on-error-token ring-0;
67
+ }
68
+ .chip-surface-active {
69
+ @apply !bg-surface-500 !text-on-surface-token ring-0;
19
70
  }
20
71
  }
@@ -1,4 +1,4 @@
1
- /* Stylesheet Add-On: button.css */
1
+ /* Tailwind Elements: button.css */
2
2
 
3
3
  @layer components {
4
4
  /* === Lists (Parents) === */
@@ -1,4 +1,4 @@
1
- /* Stylesheet Add-On: logo-clouds.css */
1
+ /* Tailwind Elements: logo-clouds.css */
2
2
 
3
3
  @layer components {
4
4
  /* === Logo Cloud (Parent) === */
@@ -1,4 +1,4 @@
1
- /* Stylesheet Add-On: menus.css */
1
+ /* Tailwind Elements: menus.css */
2
2
 
3
3
  [data-menu] {
4
4
  @apply absolute z-20 hidden;
@@ -1,4 +1,4 @@
1
- /* Stylesheet Add-On: placeholders.css */
1
+ /* Tailwind Elements: placeholders.css */
2
2
 
3
3
  @layer components {
4
4
  /* === Base === */
@@ -1,4 +1,4 @@
1
- /* Stylesheet Add-On: tooltips.css */
1
+ /* Tailwind Elements: tooltips.css */
2
2
 
3
3
  /* FIXME: adding @layer components causes visual strobing effect bug */
4
4
 
@@ -2,7 +2,9 @@
2
2
  /* Import AFTER your theme, but BEFORE your global stylesheet. */
3
3
  /* Recommended as the LAST stylesheet in the set */
4
4
 
5
+ @import 'elements/alerts.css';
5
6
  @import 'elements/badges.css';
7
+ @import 'elements/breadcrumbs.css';
6
8
  @import 'elements/buttons.css';
7
9
  @import 'elements/cards.css';
8
10
  @import 'elements/chips.css';