plasma-svelte 0.0.1 → 0.1.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 (119) hide show
  1. package/README.md +71 -37
  2. package/dist/accordion/Accordion.svelte +14 -18
  3. package/dist/accordion/Accordion.svelte.d.ts +2 -2
  4. package/dist/accordion/AccordionItem.svelte +171 -180
  5. package/dist/accordion/AccordionItem.svelte.d.ts +3 -3
  6. package/dist/appshell/AppShell.svelte +150 -0
  7. package/dist/appshell/AppShell.svelte.d.ts +4 -0
  8. package/dist/appshell/Aside.svelte +94 -0
  9. package/dist/appshell/Aside.svelte.d.ts +4 -0
  10. package/dist/appshell/Burger.svelte +176 -0
  11. package/dist/appshell/Burger.svelte.d.ts +4 -0
  12. package/dist/appshell/Footer.svelte +48 -0
  13. package/dist/appshell/Footer.svelte.d.ts +4 -0
  14. package/dist/appshell/Header.svelte +62 -0
  15. package/dist/appshell/Header.svelte.d.ts +4 -0
  16. package/dist/appshell/Main.svelte +95 -0
  17. package/dist/appshell/Main.svelte.d.ts +4 -0
  18. package/dist/appshell/Navbar.svelte +116 -0
  19. package/dist/appshell/Navbar.svelte.d.ts +4 -0
  20. package/dist/appshell/Section.svelte +49 -0
  21. package/dist/appshell/Section.svelte.d.ts +4 -0
  22. package/dist/appshell/Statusbar.svelte +144 -0
  23. package/dist/appshell/Statusbar.svelte.d.ts +4 -0
  24. package/dist/appshell/context.svelte.d.ts +34 -0
  25. package/dist/appshell/context.svelte.js +79 -0
  26. package/dist/appshell/index.d.ts +21 -0
  27. package/dist/appshell/index.js +29 -0
  28. package/dist/appshell/types.d.ts +87 -0
  29. package/dist/appshell/types.js +1 -0
  30. package/dist/avatar/Avatar.svelte +160 -165
  31. package/dist/avatar/Avatar.svelte.d.ts +4 -4
  32. package/dist/badge/Badge.svelte +145 -145
  33. package/dist/badge/Badge.svelte.d.ts +5 -5
  34. package/dist/breadcrumb/Breadcrumb.svelte +39 -48
  35. package/dist/breadcrumb/Breadcrumb.svelte.d.ts +2 -2
  36. package/dist/breadcrumb/BreadcrumbItem.svelte +119 -134
  37. package/dist/breadcrumb/BreadcrumbItem.svelte.d.ts +2 -2
  38. package/dist/button/Button.svelte +224 -225
  39. package/dist/button/Button.svelte.d.ts +5 -5
  40. package/dist/button/ButtonGroup.svelte +66 -72
  41. package/dist/button/ButtonGroup.svelte.d.ts +5 -5
  42. package/dist/card/Card.svelte +176 -176
  43. package/dist/card/Card.svelte.d.ts +5 -5
  44. package/dist/checkbox/Checkbox.svelte +186 -190
  45. package/dist/checkbox/Checkbox.svelte.d.ts +3 -3
  46. package/dist/datepicker/DatePicker.svelte +512 -494
  47. package/dist/datepicker/DatePicker.svelte.d.ts +3 -3
  48. package/dist/divider/Divider.svelte +91 -94
  49. package/dist/divider/Divider.svelte.d.ts +4 -4
  50. package/dist/drawer/Drawer.svelte +326 -312
  51. package/dist/drawer/Drawer.svelte.d.ts +3 -3
  52. package/dist/dropzone/DropZone.svelte +277 -273
  53. package/dist/dropzone/DropZone.svelte.d.ts +3 -3
  54. package/dist/emptystate/EmptyState.svelte +156 -156
  55. package/dist/emptystate/EmptyState.svelte.d.ts +3 -3
  56. package/dist/headerbar/HeaderBar.svelte +202 -200
  57. package/dist/headerbar/HeaderBar.svelte.d.ts +2 -2
  58. package/dist/index.d.ts +10 -8
  59. package/dist/index.js +10 -8
  60. package/dist/input/Input.svelte +198 -206
  61. package/dist/input/Input.svelte.d.ts +4 -4
  62. package/dist/layout/Flex.svelte +90 -94
  63. package/dist/layout/Flex.svelte.d.ts +7 -7
  64. package/dist/layout/Grid.svelte +76 -71
  65. package/dist/layout/Grid.svelte.d.ts +5 -5
  66. package/dist/layout/Space.svelte +53 -57
  67. package/dist/layout/Space.svelte.d.ts +5 -5
  68. package/dist/menu/Menu.svelte +130 -140
  69. package/dist/menu/Menu.svelte.d.ts +3 -3
  70. package/dist/menu/MenuDivider.svelte +10 -10
  71. package/dist/menu/MenuDivider.svelte.d.ts +1 -1
  72. package/dist/menu/MenuItem.svelte +101 -103
  73. package/dist/menu/MenuItem.svelte.d.ts +2 -2
  74. package/dist/message/InlineMessage.svelte +226 -216
  75. package/dist/message/InlineMessage.svelte.d.ts +3 -3
  76. package/dist/modal/ConfirmDialog.svelte +122 -131
  77. package/dist/modal/ConfirmDialog.svelte.d.ts +2 -2
  78. package/dist/modal/Modal.svelte +230 -238
  79. package/dist/modal/Modal.svelte.d.ts +3 -3
  80. package/dist/pagination/Pagination.svelte +240 -249
  81. package/dist/pagination/Pagination.svelte.d.ts +3 -3
  82. package/dist/progress/ProgressBar.svelte +152 -166
  83. package/dist/progress/ProgressBar.svelte.d.ts +3 -3
  84. package/dist/radio/Radio.svelte +144 -151
  85. package/dist/radio/Radio.svelte.d.ts +3 -3
  86. package/dist/searchfield/SearchField.svelte +213 -233
  87. package/dist/searchfield/SearchField.svelte.d.ts +3 -3
  88. package/dist/select/Select.svelte +332 -370
  89. package/dist/select/Select.svelte.d.ts +3 -3
  90. package/dist/sidebar/Sidebar.svelte +98 -62
  91. package/dist/sidebar/Sidebar.svelte.d.ts +4 -2
  92. package/dist/sidebar/SidebarGroup.svelte +60 -44
  93. package/dist/sidebar/SidebarGroup.svelte.d.ts +3 -2
  94. package/dist/sidebar/SidebarItem.svelte +195 -176
  95. package/dist/sidebar/SidebarItem.svelte.d.ts +3 -2
  96. package/dist/slider/Slider.svelte +188 -193
  97. package/dist/slider/Slider.svelte.d.ts +3 -3
  98. package/dist/spinbox/SpinBox.svelte +280 -284
  99. package/dist/spinbox/SpinBox.svelte.d.ts +4 -4
  100. package/dist/spinner/Spinner.svelte +117 -117
  101. package/dist/spinner/Spinner.svelte.d.ts +3 -3
  102. package/dist/style/base.css +174 -155
  103. package/dist/style/index.css +2 -0
  104. package/dist/style/token.css +285 -230
  105. package/dist/switch/Switch.svelte +176 -184
  106. package/dist/switch/Switch.svelte.d.ts +4 -4
  107. package/dist/table/Table.svelte +254 -260
  108. package/dist/table/Table.svelte.d.ts +6 -6
  109. package/dist/tabs/Tabs.svelte +198 -201
  110. package/dist/tabs/Tabs.svelte.d.ts +5 -5
  111. package/dist/textarea/TextArea.svelte +93 -93
  112. package/dist/textarea/TextArea.svelte.d.ts +2 -2
  113. package/dist/themeprovider/ThemeProvider.svelte +25 -0
  114. package/dist/themeprovider/ThemeProvider.svelte.d.ts +9 -0
  115. package/dist/timepicker/TimePicker.svelte +431 -437
  116. package/dist/timepicker/TimePicker.svelte.d.ts +4 -4
  117. package/dist/tooltip/Tooltip.svelte +97 -100
  118. package/dist/tooltip/Tooltip.svelte.d.ts +3 -3
  119. package/package.json +67 -65
package/README.md CHANGED
@@ -1,65 +1,99 @@
1
- # Svelte library
1
+ # plasma-svelte
2
2
 
3
- Everything you need to build a Svelte library, powered by [`sv`](https://npmjs.com/package/sv).
3
+ A sleek, lightweight, and modern Svelte 5 UI component library built for rapid UI development and fluid design systems.
4
4
 
5
- Read more about creating a library [in the docs](https://svelte.dev/docs/kit/packaging).
5
+ > [!WARNING]
6
+ > **✨ Vibe Code Notice**
7
+ > This library is vibe-coded! It is experimental, rapidly evolving, and built with pure vibes and speed in mind. Use it as your will, adapt it to your needs, fork it, or hack away on it freely.
6
8
 
7
- ## Creating a project
9
+ ---
8
10
 
9
- If you're seeing this, you've probably already done this step. Congrats!
11
+ ## Features
10
12
 
11
- ```sh
12
- # create a new project in the current directory
13
- npx sv create
13
+ - 🚀 **Svelte 5 Ready**: Built natively with Svelte 5 runes and modern component patterns.
14
+ - 🎨 **Design Tokens & Themeable**: Powered by a robust CSS variable token system (`token.css` + `base.css`).
15
+ - 🧩 **Extensive Component Suite**: Buttons, Cards, Badges, Modals, Drawers, Date/Time Pickers, Tables, Tabs, and layout primitives.
16
+ - 📖 **Storybook Integrated**: Interactive documentation and component exploration out of the box.
17
+ - 📦 **Zero-Config Export**: Full TypeScript types (`.d.ts`) and modern ESM module exports.
14
18
 
15
- # create a new project in my-app
16
- npx sv create my-app
17
- ```
19
+ ---
20
+
21
+ ## Quick Start
18
22
 
19
- To recreate this project with the same configuration:
23
+ ### 1. Install
20
24
 
21
- ```sh
22
- # recreate this project
23
- pnpm dlx sv@0.17.0 create --template library --types ts --add storybook --install pnpm plasma-svelte
25
+ ```bash
26
+ npm install plasma-svelte
27
+ # or
28
+ pnpm add plasma-svelte
29
+ # or
30
+ yarn add plasma-svelte
24
31
  ```
25
32
 
26
- ## Developing
33
+ ### 2. Import Styles
27
34
 
28
- Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
35
+ Include the library's design tokens and base stylesheet in your root layout (`+layout.svelte`) or entry point (`app.ts` / `main.ts`):
29
36
 
30
- ```sh
31
- npm run dev
37
+ ```svelte
38
+ <script lang="ts">
39
+ import "plasma-svelte/style.css";
40
+ </script>
32
41
 
33
- # or start the server and open the app in a new browser tab
34
- npm run dev -- --open
42
+ <slot />
35
43
  ```
36
44
 
37
- Everything inside `src/lib` is part of your library, everything inside `src/routes` can be used as a showcase or preview app.
45
+ > **Note**: You can also import individual sub-styles if you manage your own reset:
46
+ > ```ts
47
+ > import "plasma-svelte/style/token.css";
48
+ > import "plasma-svelte/style/base.css";
49
+ > ```
50
+
51
+ ### 3. Use Components
52
+
53
+ ```svelte
54
+ <script lang="ts">
55
+ import { Button, Badge, Card } from 'plasma-svelte';
56
+ </script>
57
+
58
+ <Card hoverable={true} padding="lg">
59
+ <Badge variant="primary" dot={true}>Active</Badge>
60
+ <h2>Welcome to Plasma</h2>
61
+ <p>Streamlined UI components for Svelte 5.</p>
62
+ <Button variant="primary">Get Started</Button>
63
+ </Card>
64
+ ```
65
+
66
+ ---
67
+
68
+ ## Development & Storybook
38
69
 
39
- ## Building
70
+ ### Start Storybook
40
71
 
41
- To build your library:
72
+ Explore and interact with components in isolated stories:
42
73
 
43
- ```sh
44
- npm pack
74
+ ```bash
75
+ npm run storybook
45
76
  ```
46
77
 
47
- To create a production version of your showcase app:
78
+ ### Run Dev Server
48
79
 
49
- ```sh
50
- npm run build
80
+ ```bash
81
+ npm run dev
51
82
  ```
52
83
 
53
- You can preview the production build with `npm run preview`.
84
+ ### Build & Package
85
+
86
+ Package the library for distribution (generates types & compiles to `./dist`):
54
87
 
55
- > To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment.
88
+ ```bash
89
+ npm run prepack
90
+ # or full build
91
+ npm run build
92
+ ```
56
93
 
57
- ## Publishing
94
+ ---
58
95
 
59
- Go into the `package.json` and give your package the desired name through the `"name"` option. Also consider adding a `"license"` field and point it to a `LICENSE` file which you can create from a template (one popular option is the [MIT license](https://opensource.org/license/mit/)).
96
+ ## License
60
97
 
61
- To publish your library to [npm](https://www.npmjs.com):
98
+ Use as your will! Distributed under the MIT License or your choice of terms.
62
99
 
63
- ```sh
64
- npm publish
65
- ```
@@ -1,28 +1,24 @@
1
1
  <script lang="ts">
2
- import type { Snippet } from "svelte";
3
- import type { HTMLAttributes } from "svelte/elements";
2
+ import type { Snippet } from 'svelte'
3
+ import type { HTMLAttributes } from 'svelte/elements'
4
4
 
5
- interface Props extends HTMLAttributes<HTMLDivElement> {
6
- children?: Snippet;
7
- }
5
+ interface Props extends HTMLAttributes<HTMLDivElement> {
6
+ children?: Snippet
7
+ }
8
8
 
9
- let {
10
- children,
11
- class: customClass = "",
12
- ...restProps
13
- }: Props = $props();
9
+ let { children, class: customClass = '', ...restProps }: Props = $props()
14
10
  </script>
15
11
 
16
12
  <div class="plasma-accordion-group {customClass}" {...restProps}>
17
- {@render children?.()}
13
+ {@render children?.()}
18
14
  </div>
19
15
 
20
16
  <style>
21
- .plasma-accordion-group {
22
- display: flex;
23
- flex-direction: column;
24
- gap: var(--plasma-space-sm);
25
- width: 100%;
26
- box-sizing: border-box;
27
- }
17
+ .plasma-accordion-group {
18
+ display: flex;
19
+ flex-direction: column;
20
+ gap: var(--plasma-space-sm);
21
+ width: 100%;
22
+ box-sizing: border-box;
23
+ }
28
24
  </style>
@@ -1,5 +1,5 @@
1
- import type { Snippet } from "svelte";
2
- import type { HTMLAttributes } from "svelte/elements";
1
+ import type { Snippet } from 'svelte';
2
+ import type { HTMLAttributes } from 'svelte/elements';
3
3
  interface Props extends HTMLAttributes<HTMLDivElement> {
4
4
  children?: Snippet;
5
5
  }
@@ -1,193 +1,184 @@
1
1
  <script lang="ts">
2
- import type { Snippet } from "svelte";
3
- import type { HTMLAttributes } from "svelte/elements";
4
-
5
- interface Props extends Omit<HTMLAttributes<HTMLDivElement>, "ontoggle"> {
6
- title?: string;
7
- open?: boolean;
8
- disabled?: boolean;
9
- icon?: Snippet;
10
- header?: Snippet;
11
- children?: Snippet;
12
- ontoggle?: (isOpen: boolean) => void;
13
- }
14
-
15
-
16
- let {
17
- title = "",
18
- open = $bindable(false),
19
- disabled = false,
20
- icon,
21
- header,
22
- children,
23
- ontoggle,
24
- class: customClass = "",
25
- id,
26
- ...restProps
27
- }: Props = $props();
28
-
29
- function toggle() {
30
- if (disabled) return;
31
- open = !open;
32
- ontoggle?.(open);
33
- }
2
+ import type { Snippet } from 'svelte'
3
+ import type { HTMLAttributes } from 'svelte/elements'
4
+
5
+ interface Props extends Omit<HTMLAttributes<HTMLDivElement>, 'ontoggle'> {
6
+ title?: string
7
+ open?: boolean
8
+ disabled?: boolean
9
+ icon?: Snippet
10
+ header?: Snippet
11
+ children?: Snippet
12
+ ontoggle?: (isOpen: boolean) => void
13
+ }
14
+
15
+ let {
16
+ title = '',
17
+ open = $bindable(false),
18
+ disabled = false,
19
+ icon,
20
+ header,
21
+ children,
22
+ ontoggle,
23
+ class: customClass = '',
24
+ id,
25
+ ...restProps
26
+ }: Props = $props()
27
+
28
+ function toggle() {
29
+ if (disabled) return
30
+ open = !open
31
+ ontoggle?.(open)
32
+ }
34
33
  </script>
35
34
 
36
35
  <div
37
- class="plasma-accordion-item {customClass}"
38
- class:plasma-accordion-item--open={open}
39
- class:plasma-accordion-item--disabled={disabled}
40
- {...restProps}
36
+ class="plasma-accordion-item {customClass}"
37
+ class:plasma-accordion-item--open={open}
38
+ class:plasma-accordion-item--disabled={disabled}
39
+ {...restProps}
41
40
  >
42
- <button
43
- {id}
44
- type="button"
45
- aria-expanded={open}
46
- {disabled}
47
- onclick={toggle}
48
- class="plasma-accordion-header"
49
- >
50
- {#if icon}
51
- <span class="plasma-accordion-icon">
52
- {@render icon()}
53
- </span>
54
- {/if}
55
-
56
- <span class="plasma-accordion-title">
57
- {#if header}
58
- {@render header()}
59
- {:else}
60
- {title}
61
- {/if}
62
- </span>
63
-
64
- <span class="plasma-accordion-chevron">
65
- <svg
66
- aria-hidden="true"
67
- viewBox="0 0 16 16"
68
- width="12"
69
- height="12"
70
- fill="currentColor"
71
- >
72
- <path
73
- fill-rule="evenodd"
74
- d="M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"
75
- />
76
- </svg>
77
- </span>
78
- </button>
79
-
80
- <div class="plasma-accordion-collapse" class:plasma-accordion-collapse--open={open}>
81
- <div class="plasma-accordion-content">
82
- {#if children}
83
- {@render children()}
84
- {/if}
85
- </div>
86
- </div>
41
+ <button
42
+ {id}
43
+ type="button"
44
+ aria-expanded={open}
45
+ {disabled}
46
+ onclick={toggle}
47
+ class="plasma-accordion-header"
48
+ >
49
+ {#if icon}
50
+ <span class="plasma-accordion-icon"> {@render icon()} </span>
51
+ {/if}
52
+
53
+ <span class="plasma-accordion-title">
54
+ {#if header}
55
+ {@render header()}
56
+ {:else}
57
+ {title}
58
+ {/if}
59
+ </span>
60
+
61
+ <span class="plasma-accordion-chevron">
62
+ <svg aria-hidden="true" viewBox="0 0 16 16" width="12" height="12" fill="currentColor">
63
+ <path
64
+ fill-rule="evenodd"
65
+ d="M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"
66
+ />
67
+ </svg>
68
+ </span>
69
+ </button>
70
+
71
+ <div class="plasma-accordion-collapse" class:plasma-accordion-collapse--open={open}>
72
+ <div class="plasma-accordion-content">
73
+ {#if children}
74
+ {@render children()}
75
+ {/if}
76
+ </div>
77
+ </div>
87
78
  </div>
88
79
 
89
80
  <style>
90
- .plasma-accordion-item {
91
- border: 1px solid var(--plasma-color-border);
92
- border-radius: var(--plasma-radius-lg);
93
- background-color: var(--plasma-color-surface);
94
- overflow: hidden;
95
- transition: var(--plasma-transition-fast);
96
- }
97
-
98
- .plasma-accordion-item:hover:not(.plasma-accordion-item--disabled) {
99
- border-color: var(--plasma-color-border-hover);
100
- }
101
-
102
- .plasma-accordion-item--open {
103
- border-color: var(--plasma-color-border-hover);
104
- }
105
-
106
- .plasma-accordion-item--disabled {
107
- opacity: 0.5;
108
- cursor: not-allowed;
109
- }
110
-
111
- /* --------------------------------------------------------------------------
81
+ .plasma-accordion-item {
82
+ border: 1px solid var(--plasma-color-border);
83
+ border-radius: var(--plasma-radius-lg);
84
+ background-color: var(--plasma-color-surface);
85
+ overflow: hidden;
86
+ transition: var(--plasma-transition-fast);
87
+ }
88
+
89
+ .plasma-accordion-item:hover:not(.plasma-accordion-item--disabled) {
90
+ border-color: var(--plasma-color-border-hover);
91
+ }
92
+
93
+ .plasma-accordion-item--open {
94
+ border-color: var(--plasma-color-border-hover);
95
+ }
96
+
97
+ .plasma-accordion-item--disabled {
98
+ opacity: 0.5;
99
+ cursor: not-allowed;
100
+ }
101
+
102
+ /* --------------------------------------------------------------------------
112
103
  Header Trigger Button
113
104
  -------------------------------------------------------------------------- */
114
- .plasma-accordion-header {
115
- display: flex;
116
- align-items: center;
117
- width: 100%;
118
- padding: var(--plasma-space-md) var(--plasma-space-lg);
119
- background: transparent;
120
- border: none;
121
- outline: none;
122
- font-family: var(--plasma-font-sans);
123
- font-size: var(--plasma-font-size-base);
124
- color: var(--plasma-color-text);
125
- cursor: pointer;
126
- user-select: none;
127
- text-align: left;
128
- gap: var(--plasma-space-sm);
129
- transition: var(--plasma-transition-fast);
130
- }
131
-
132
- .plasma-accordion-header:hover:not(:disabled) {
133
- background-color: var(--plasma-color-surface-hover);
134
- }
135
-
136
- .plasma-accordion-header:focus-visible {
137
- outline: 2px solid var(--plasma-color-highlight);
138
- outline-offset: -2px;
139
- }
140
-
141
- .plasma-accordion-icon {
142
- display: inline-flex;
143
- align-items: center;
144
- justify-content: center;
145
- color: var(--plasma-color-highlight);
146
- flex-shrink: 0;
147
- }
148
-
149
- .plasma-accordion-title {
150
- flex: 1;
151
- font-weight: var(--plasma-font-weight-medium);
152
- }
153
-
154
- .plasma-accordion-chevron {
155
- display: inline-flex;
156
- align-items: center;
157
- color: var(--plasma-color-text-muted);
158
- transition: transform var(--plasma-duration-base) var(--plasma-ease-default);
159
- flex-shrink: 0;
160
- }
161
-
162
- .plasma-accordion-item--open .plasma-accordion-chevron {
163
- transform: rotate(90deg);
164
- }
165
-
166
- /* --------------------------------------------------------------------------
105
+ .plasma-accordion-header {
106
+ display: flex;
107
+ align-items: center;
108
+ width: 100%;
109
+ padding: var(--plasma-space-md) var(--plasma-space-lg);
110
+ background: transparent;
111
+ border: none;
112
+ outline: none;
113
+ font-family: var(--plasma-font-sans);
114
+ font-size: var(--plasma-font-size-base);
115
+ color: var(--plasma-color-text);
116
+ cursor: pointer;
117
+ user-select: none;
118
+ text-align: left;
119
+ gap: var(--plasma-space-sm);
120
+ transition: var(--plasma-transition-fast);
121
+ }
122
+
123
+ .plasma-accordion-header:hover:not(:disabled) {
124
+ background-color: var(--plasma-color-surface-hover);
125
+ }
126
+
127
+ .plasma-accordion-header:focus-visible {
128
+ outline: 2px solid var(--plasma-color-highlight);
129
+ outline-offset: -2px;
130
+ }
131
+
132
+ .plasma-accordion-icon {
133
+ display: inline-flex;
134
+ align-items: center;
135
+ justify-content: center;
136
+ color: var(--plasma-color-highlight);
137
+ flex-shrink: 0;
138
+ }
139
+
140
+ .plasma-accordion-title {
141
+ flex: 1;
142
+ font-weight: var(--plasma-font-weight-medium);
143
+ }
144
+
145
+ .plasma-accordion-chevron {
146
+ display: inline-flex;
147
+ align-items: center;
148
+ color: var(--plasma-color-text-muted);
149
+ transition: transform var(--plasma-duration-base) var(--plasma-ease-default);
150
+ flex-shrink: 0;
151
+ }
152
+
153
+ .plasma-accordion-item--open .plasma-accordion-chevron {
154
+ transform: rotate(90deg);
155
+ }
156
+
157
+ /* --------------------------------------------------------------------------
167
158
  Collapsible Content Area (CSS Grid Height Transition)
168
159
  -------------------------------------------------------------------------- */
169
- .plasma-accordion-collapse {
170
- display: grid;
171
- grid-template-rows: 0fr;
172
- transition: grid-template-rows var(--plasma-duration-base) var(--plasma-ease-default);
173
- }
174
-
175
- .plasma-accordion-collapse--open {
176
- grid-template-rows: 1fr;
177
- border-top: 1px solid var(--plasma-color-border-subtle);
178
- }
179
-
180
- .plasma-accordion-content {
181
- overflow: hidden;
182
- padding: 0 var(--plasma-space-lg);
183
- font-size: var(--plasma-font-size-sm);
184
- color: var(--plasma-color-text-muted);
185
- line-height: var(--plasma-line-height-base);
186
- background-color: var(--plasma-color-surface-sunken);
187
- transition: padding var(--plasma-duration-base) var(--plasma-ease-default);
188
- }
189
-
190
- .plasma-accordion-collapse--open .plasma-accordion-content {
191
- padding: var(--plasma-space-md) var(--plasma-space-lg);
192
- }
160
+ .plasma-accordion-collapse {
161
+ display: grid;
162
+ grid-template-rows: 0fr;
163
+ transition: grid-template-rows var(--plasma-duration-base) var(--plasma-ease-default);
164
+ }
165
+
166
+ .plasma-accordion-collapse--open {
167
+ grid-template-rows: 1fr;
168
+ border-top: 1px solid var(--plasma-color-border-subtle);
169
+ }
170
+
171
+ .plasma-accordion-content {
172
+ overflow: hidden;
173
+ padding: 0 var(--plasma-space-lg);
174
+ font-size: var(--plasma-font-size-sm);
175
+ color: var(--plasma-color-text-muted);
176
+ line-height: var(--plasma-line-height-base);
177
+ background-color: var(--plasma-color-surface-sunken);
178
+ transition: padding var(--plasma-duration-base) var(--plasma-ease-default);
179
+ }
180
+
181
+ .plasma-accordion-collapse--open .plasma-accordion-content {
182
+ padding: var(--plasma-space-md) var(--plasma-space-lg);
183
+ }
193
184
  </style>
@@ -1,6 +1,6 @@
1
- import type { Snippet } from "svelte";
2
- import type { HTMLAttributes } from "svelte/elements";
3
- interface Props extends Omit<HTMLAttributes<HTMLDivElement>, "ontoggle"> {
1
+ import type { Snippet } from 'svelte';
2
+ import type { HTMLAttributes } from 'svelte/elements';
3
+ interface Props extends Omit<HTMLAttributes<HTMLDivElement>, 'ontoggle'> {
4
4
  title?: string;
5
5
  open?: boolean;
6
6
  disabled?: boolean;