@pathscale/ui 1.2.10 → 1.3.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.
- package/LICENSE +22 -22
- package/README.md +132 -59
- package/dist/components/accordion/Accordion.css +158 -158
- package/dist/components/alert/Alert.css +116 -116
- package/dist/components/avatar/Avatar.css +124 -124
- package/dist/components/badge/Badge.css +164 -164
- package/dist/components/breadcrumbs/Breadcrumbs.css +63 -63
- package/dist/components/button/Button.css +194 -194
- package/dist/components/button-group/ButtonGroup.css +117 -117
- package/dist/components/calendar/Calendar.css +258 -258
- package/dist/components/card/Card.css +110 -110
- package/dist/components/chatbubble/ChatBubble.css +164 -164
- package/dist/components/checkbox/Checkbox.css +183 -183
- package/dist/components/checkbox-group/CheckboxGroup.css +10 -10
- package/dist/components/chip/Chip.css +197 -197
- package/dist/components/close-button/CloseButton.css +81 -81
- package/dist/components/color-area/ColorArea.css +54 -54
- package/dist/components/color-field/ColorField.css +88 -88
- package/dist/components/color-picker/ColorPicker.css +28 -28
- package/dist/components/color-slider/ColorSlider.css +57 -57
- package/dist/components/color-swatch/ColorSwatch.css +84 -84
- package/dist/components/color-swatch-picker/ColorSwatchPicker.css +12 -12
- package/dist/components/color-wheel-flower/ColorWheelFlower.css +147 -147
- package/dist/components/combo-box/ComboBox.css +344 -344
- package/dist/components/date-field/DateField.css +215 -215
- package/dist/components/date-picker/DatePicker.css +143 -143
- package/dist/components/date-range-picker/DateRangePicker.css +149 -149
- package/dist/components/description/Description.css +10 -10
- package/dist/components/disclosure/Disclosure.css +84 -84
- package/dist/components/disclosure-group/DisclosureGroup.css +9 -9
- package/dist/components/drawer/Drawer.css +463 -463
- package/dist/components/dropdown/Dropdown.css +211 -211
- package/dist/components/empty-state/EmptyState.css +39 -39
- package/dist/components/error-message/ErrorMessage.css +20 -20
- package/dist/components/field-error/FieldError.css +27 -27
- package/dist/components/fieldset/Fieldset.css +30 -30
- package/dist/components/flex/Flex.css +5 -5
- package/dist/components/floating-dock/FloatingDock.css +208 -208
- package/dist/components/footer/footer.css +51 -51
- package/dist/components/form/Form.css +5 -5
- package/dist/components/glass-panel/GlassPanel.css +359 -359
- package/dist/components/glow-card/GlowCard.css +100 -100
- package/dist/components/grid/Grid.css +5 -5
- package/dist/components/header/Header.css +13 -13
- package/dist/components/icon/Icon.css +10 -10
- package/dist/components/immersive-landing/ImmersiveLanding.css +565 -565
- package/dist/components/input/Input.css +155 -155
- package/dist/components/input-group/InputGroup.css +172 -172
- package/dist/components/input-otp/InputOTP.css +170 -170
- package/dist/components/kbd/Kbd.css +60 -60
- package/dist/components/label/Label.css +30 -30
- package/dist/components/language-switcher/LanguageSwitcher.css +56 -56
- package/dist/components/language-switcher/createI18n.d.ts +2 -1
- package/dist/components/link/Link.css +131 -131
- package/dist/components/list-box/ListBox.css +148 -148
- package/dist/components/live-chat/LiveChat.css +324 -324
- package/dist/components/menu/Menu.css +199 -199
- package/dist/components/metal-border/MetalBorder.classes.d.ts +26 -0
- package/dist/components/metal-border/MetalBorder.classes.js +27 -0
- package/dist/components/metal-border/MetalBorder.css +40 -0
- package/dist/components/metal-border/MetalBorder.d.ts +20 -0
- package/dist/components/metal-border/MetalBorder.js +322 -0
- package/dist/components/metal-border/engine/color.d.ts +4 -0
- package/dist/components/metal-border/engine/color.js +69 -0
- package/dist/components/metal-border/engine/glow/geometry.d.ts +35 -0
- package/dist/components/metal-border/engine/glow/geometry.js +176 -0
- package/dist/components/metal-border/engine/glow/glow.d.ts +38 -0
- package/dist/components/metal-border/engine/glow/glow.js +246 -0
- package/dist/components/metal-border/engine/index.d.ts +4 -0
- package/dist/components/metal-border/engine/index.js +2 -0
- package/dist/components/metal-border/engine/perfConfig.d.ts +9 -0
- package/dist/components/metal-border/engine/perfConfig.js +10 -0
- package/dist/components/metal-border/engine/presets.d.ts +57 -0
- package/dist/components/metal-border/engine/presets.js +214 -0
- package/dist/components/metal-border/engine/renderer/core.d.ts +69 -0
- package/dist/components/metal-border/engine/renderer/core.js +156 -0
- package/dist/components/metal-border/engine/renderer/loop.d.ts +30 -0
- package/dist/components/metal-border/engine/renderer/loop.js +248 -0
- package/dist/components/metal-border/engine/renderer/sampling.d.ts +14 -0
- package/dist/components/metal-border/engine/renderer/sampling.js +145 -0
- package/dist/components/metal-border/engine/shaders.d.ts +36 -0
- package/dist/components/metal-border/engine/shaders.js +215 -0
- package/dist/components/metal-border/engine/tween.d.ts +17 -0
- package/dist/components/metal-border/engine/tween.js +28 -0
- package/dist/components/metal-border/index.d.ts +2 -0
- package/dist/components/metal-border/index.js +1 -0
- package/dist/components/meter/Meter.css +89 -89
- package/dist/components/modal/Modal.css +320 -320
- package/dist/components/navbar/Navbar.css +110 -110
- package/dist/components/noise-background/NoiseBackground.css +66 -66
- package/dist/components/number-field/NumberField.css +198 -198
- package/dist/components/pagination/Pagination.css +121 -121
- package/dist/components/popover/Popover.css +117 -117
- package/dist/components/progress-bar/ProgressBar.css +104 -104
- package/dist/components/progress-circle/ProgressCircle.css +82 -82
- package/dist/components/radio/Radio.css +129 -129
- package/dist/components/radio-group/RadioGroup.css +58 -58
- package/dist/components/range-calendar/RangeCalendar.css +51 -51
- package/dist/components/scroll-shadow/ScrollShadow.css +93 -93
- package/dist/components/search-field/SearchField.css +183 -183
- package/dist/components/select/Select.css +284 -284
- package/dist/components/separator/Separator.css +35 -35
- package/dist/components/skeleton/Skeleton.css +95 -95
- package/dist/components/slider/Slider.css +122 -122
- package/dist/components/spinner/Spinner.css +131 -131
- package/dist/components/surface/Surface.css +37 -37
- package/dist/components/table/Table.css +426 -426
- package/dist/components/tabs/Tabs.css +203 -203
- package/dist/components/tag/Tag.css +121 -121
- package/dist/components/tag-group/TagGroup.css +22 -22
- package/dist/components/text/Text.css +66 -66
- package/dist/components/text-area/TextArea.css +95 -95
- package/dist/components/text-field/TextField.css +33 -33
- package/dist/components/time-field/TimeField.css +215 -215
- package/dist/components/toast/Toast.css +344 -344
- package/dist/components/toggle/Toggle.css +237 -237
- package/dist/components/toolbar/Toolbar.css +55 -55
- package/dist/components/tooltip/Tooltip.css +153 -153
- package/dist/index.css +74 -74
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist/purge-manifest.json +15836 -15583
- package/dist/styles/base/index.css +43 -43
- package/dist/styles/themes/dark.css +141 -141
- package/dist/styles/themes/light.css +143 -143
- package/package.json +17 -8
package/LICENSE
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 pathscale
|
|
4
|
-
Copyright (c) 2020 Pouya Saadeghi
|
|
5
|
-
|
|
6
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
-
in the Software without restriction, including without limitation the rights
|
|
9
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
-
furnished to do so, subject to the following conditions:
|
|
12
|
-
|
|
13
|
-
The above copyright notice and this permission notice shall be included in all
|
|
14
|
-
copies or substantial portions of the Software.
|
|
15
|
-
|
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 pathscale
|
|
4
|
+
Copyright (c) 2020 Pouya Saadeghi
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,59 +1,132 @@
|
|
|
1
|
-
# @pathscale/ui
|
|
2
|
-
|
|
3
|
-
Highly opinionated SolidJS component library — batteries and kitchen sink
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
1
|
+
# @pathscale/ui
|
|
2
|
+
|
|
3
|
+
Highly opinionated SolidJS component library — batteries and kitchen sink included, but
|
|
4
|
+
optimized and shiny.
|
|
5
|
+
|
|
6
|
+
**103 components.** HeroUI-parity API, daisyUI-style theming, Tailwind v4 tokens, light and
|
|
7
|
+
dark themes built in.
|
|
8
|
+
|
|
9
|
+
**[→ Browse every component, live](https://js.software)**
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
bun add @pathscale/ui
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
<details>
|
|
18
|
+
<summary>npm · pnpm · yarn</summary>
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
npm install @pathscale/ui
|
|
22
|
+
pnpm add @pathscale/ui
|
|
23
|
+
yarn add @pathscale/ui
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
</details>
|
|
27
|
+
|
|
28
|
+
## Setup
|
|
29
|
+
|
|
30
|
+
Two imports. Everything comes from the root barrel, and **one stylesheet is all you need** —
|
|
31
|
+
`index.css` pulls in the base styles, both themes and the icon set:
|
|
32
|
+
|
|
33
|
+
```tsx
|
|
34
|
+
import { Button, Flex } from "@pathscale/ui";
|
|
35
|
+
import "@pathscale/ui/index.css";
|
|
36
|
+
|
|
37
|
+
export const Example = () => (
|
|
38
|
+
<Flex direction="col" gap="sm">
|
|
39
|
+
<Button color="primary" size="md">Primary</Button>
|
|
40
|
+
</Flex>
|
|
41
|
+
);
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Theming
|
|
45
|
+
|
|
46
|
+
Two themes ship with the library: `light` (the default when no attribute is set) and `dark`.
|
|
47
|
+
Switch globally by setting an attribute on the document:
|
|
48
|
+
|
|
49
|
+
```ts
|
|
50
|
+
document.documentElement.setAttribute("data-theme", "dark");
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Every component also accepts a `dataTheme` prop, rendered as `data-theme` on that element —
|
|
54
|
+
use it to scope a theme to one subtree.
|
|
55
|
+
|
|
56
|
+
Tokens are CSS custom properties: `--color-primary`, `--color-base-100`, `--radius-field`,
|
|
57
|
+
and a glass set among others. `index.css` includes a Tailwind v4 `@theme` block, so in a
|
|
58
|
+
Tailwind v4 app the usual utilities — `bg-primary`, `text-base-content`, `bg-base-100` —
|
|
59
|
+
work against them directly.
|
|
60
|
+
|
|
61
|
+
## Components
|
|
62
|
+
|
|
63
|
+
| family | components |
|
|
64
|
+
|---|---|
|
|
65
|
+
| **Layout** | Flex, Grid, Join, Surface, Card, GlassPanel, Separator, ScrollShadow, Skeleton, EmptyState, Footer, Header, Navbar, Toolbar, FloatingDock |
|
|
66
|
+
| **Typography & misc** | Text, Link, Kbd, Badge, Chip, Tag, TagGroup, Avatar, Icon, Tooltip, Breadcrumbs, Pagination, Meter, ProgressBar, ProgressCircle, Spinner |
|
|
67
|
+
| **Inputs** | Input, InputGroup, InputOTP, TextField, TextArea, NumberField, SearchField, PasswordField, ColorField, Checkbox, CheckboxGroup, Radio, RadioGroup, Toggle, Slider, Select, ComboBox, ListBox, SizePicker |
|
|
68
|
+
| **Forms** | Form, Fieldset, Label, Description, ErrorMessage, FieldError, PasswordRequirements |
|
|
69
|
+
| **Dates** | Calendar, RangeCalendar, DatePicker, DateRangePicker, DateField, TimeField |
|
|
70
|
+
| **Color** | ColorPicker, ColorArea, ColorSlider, ColorSwatch, ColorSwatchPicker, ColorWheelFlower, ThemeColorPicker |
|
|
71
|
+
| **Overlays** | Modal, Drawer, Popover, Dropdown, Menu, Toast, Alert, Disclosure, DisclosureGroup, Accordion |
|
|
72
|
+
| **Data** | Table (headless compound + hooks), Tabs |
|
|
73
|
+
| **Auth kit** | AuthForm, AuthCard, AuthFieldGroup, AuthSubmitButton, AuthFooterLinks, AuthPoweredBy, AuthErrorMessage, AuthSuccessMessage |
|
|
74
|
+
| **Visual FX** | MetalBorder, GlowCard, NoiseBackground, ImmersiveLanding, VideoPreview, LiveChat, ChatBubble, LanguageSwitcher |
|
|
75
|
+
|
|
76
|
+
All of them rendered and interactive at **[js.software](https://js.software)**.
|
|
77
|
+
|
|
78
|
+
## Conventions
|
|
79
|
+
|
|
80
|
+
The rules that hold across every component — worth two minutes before your first hour:
|
|
81
|
+
|
|
82
|
+
- **Booleans are HeroUI-style `is*`**: `isDisabled`, `isOpen`, `isInvalid`, `isPending`,
|
|
83
|
+
`isIconOnly`. Native `disabled` is honored too.
|
|
84
|
+
- **Sizes** are `xs | sm | md | lg | xl`. **Colors** are
|
|
85
|
+
`neutral | primary | secondary | accent | info | success | warning | error | ghost`.
|
|
86
|
+
- **Both `class` and `className` work** everywhere, and your classes win — they are merged
|
|
87
|
+
last via twMerge.
|
|
88
|
+
- **Controlled/uncontrolled come in triples**: `isOpen/defaultOpen/onOpenChange`,
|
|
89
|
+
`value/defaultValue/onChange`. Callbacks pass **values, not events**.
|
|
90
|
+
- **Compound components** (`Modal.Trigger`, `Tabs.List`, `Select.Option`) are also exported
|
|
91
|
+
flat. Parts are styleable via `data-slot` and state attributes such as `data-open`.
|
|
92
|
+
- There is **no polymorphic `as` prop**.
|
|
93
|
+
|
|
94
|
+
Forms are TanStack Form plus any Standard Schema validator; Table is headless and assembled
|
|
95
|
+
from hooks. Both, with toasts, icons and dates, are covered in
|
|
96
|
+
**[docs/ui-usage.md](https://github.com/pathscale/ui/blob/master/docs/ui-usage.md)**.
|
|
97
|
+
|
|
98
|
+
## Requirements
|
|
99
|
+
|
|
100
|
+
- **SolidJS ^1.9**
|
|
101
|
+
- **Tailwind v4** — optional, but required for the `@theme` token utilities
|
|
102
|
+
|
|
103
|
+
Peers include `@solid-primitives/*`, `@tanstack/solid-form` and `@tanstack/solid-table`.
|
|
104
|
+
Two are optional and only needed for the features they back: `popmotion` (JS animation
|
|
105
|
+
driver) and `@standard-schema/spec` (schema validation).
|
|
106
|
+
|
|
107
|
+
## Subpath exports
|
|
108
|
+
|
|
109
|
+
Everything is available from the root barrel. These exist when you want to be narrower:
|
|
110
|
+
|
|
111
|
+
```ts
|
|
112
|
+
import { Button } from "@pathscale/ui/components/button";
|
|
113
|
+
import { useVirtualRows } from "@pathscale/ui/primitives/virtualizer";
|
|
114
|
+
import { runMotion, enablePopmotion } from "@pathscale/ui/motion";
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Also `@pathscale/ui/hooks/*` and `@pathscale/ui/styles/*`.
|
|
118
|
+
|
|
119
|
+
The package declares `"sideEffects": ["**/*.css"]`, so bundlers tree-shake what you don't
|
|
120
|
+
import — the published size is the whole library, not what ships to your users.
|
|
121
|
+
|
|
122
|
+
## Documentation
|
|
123
|
+
|
|
124
|
+
| | |
|
|
125
|
+
|---|---|
|
|
126
|
+
| **[Live showcase](https://js.software)** | every component, rendered and interactive |
|
|
127
|
+
| **[Usage reference](https://github.com/pathscale/ui/blob/master/docs/ui-usage.md)** | theming, conventions, forms, table, toast, icons, dates |
|
|
128
|
+
| **[Contributing](https://github.com/pathscale/ui/blob/master/CONTRIBUTING.md)** | local setup, playground, component checklist, proposal template |
|
|
129
|
+
|
|
130
|
+
## License
|
|
131
|
+
|
|
132
|
+
MIT
|
|
@@ -1,158 +1,158 @@
|
|
|
1
|
-
@layer components {
|
|
2
|
-
.accordion {
|
|
3
|
-
width: 100%;
|
|
4
|
-
contain: layout style;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.accordion__item {
|
|
8
|
-
position: relative;
|
|
9
|
-
border: 0;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.accordion__item::after {
|
|
13
|
-
content: "";
|
|
14
|
-
position: absolute;
|
|
15
|
-
bottom: 0;
|
|
16
|
-
left: 0;
|
|
17
|
-
height: 1px;
|
|
18
|
-
width: 100%;
|
|
19
|
-
border-radius: 9999px;
|
|
20
|
-
background-color: var(--color-base-300);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.accordion__item:last-child::after {
|
|
24
|
-
content: none;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.accordion__item--hide-separator::after {
|
|
28
|
-
display: none;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.accordion__item--disabled {
|
|
32
|
-
opacity: 0.65;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.accordion__trigger {
|
|
36
|
-
cursor: pointer;
|
|
37
|
-
display: flex;
|
|
38
|
-
width: 100%;
|
|
39
|
-
align-items: center;
|
|
40
|
-
justify-content: space-between;
|
|
41
|
-
border: 0;
|
|
42
|
-
background-color: transparent;
|
|
43
|
-
padding: 1rem;
|
|
44
|
-
text-align: left;
|
|
45
|
-
font-size: 0.875rem;
|
|
46
|
-
font-weight: 500;
|
|
47
|
-
color: inherit;
|
|
48
|
-
user-select: none;
|
|
49
|
-
transition:
|
|
50
|
-
opacity 150ms ease,
|
|
51
|
-
background-color 150ms ease,
|
|
52
|
-
box-shadow 150ms ease;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.accordion__trigger:focus-visible,
|
|
56
|
-
.accordion__trigger[data-focus-visible="true"] {
|
|
57
|
-
outline: 2px solid var(--color-base-content);
|
|
58
|
-
outline-offset: 2px;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.accordion__item--disabled .accordion__trigger,
|
|
62
|
-
.accordion__trigger:disabled,
|
|
63
|
-
.accordion__trigger[aria-disabled="true"] {
|
|
64
|
-
cursor: not-allowed;
|
|
65
|
-
opacity: 0.55;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
@media (hover: hover) {
|
|
69
|
-
.accordion__trigger:hover:not([aria-expanded="true"]):not(:disabled):not(
|
|
70
|
-
[aria-disabled="true"]
|
|
71
|
-
),
|
|
72
|
-
.accordion__trigger[data-hovered="true"]:not(
|
|
73
|
-
[aria-expanded="true"]
|
|
74
|
-
):not(:disabled):not([aria-disabled="true"]) {
|
|
75
|
-
background-color: color-mix(
|
|
76
|
-
in oklab,
|
|
77
|
-
var(--color-base-content),
|
|
78
|
-
transparent 96%
|
|
79
|
-
);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.accordion__indicator {
|
|
84
|
-
margin-inline-start: auto;
|
|
85
|
-
height: 1rem;
|
|
86
|
-
width: 1rem;
|
|
87
|
-
flex-shrink: 0;
|
|
88
|
-
opacity: 0.65;
|
|
89
|
-
transition: transform 250ms ease;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.accordion__indicator--expanded {
|
|
93
|
-
transform: rotate(-180deg);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.accordion__content {
|
|
97
|
-
display: grid;
|
|
98
|
-
grid-template-rows: 0fr;
|
|
99
|
-
opacity: 0;
|
|
100
|
-
overflow: hidden;
|
|
101
|
-
transition:
|
|
102
|
-
grid-template-rows 200ms ease,
|
|
103
|
-
opacity 200ms ease;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.accordion__content--expanded {
|
|
107
|
-
grid-template-rows: 1fr;
|
|
108
|
-
opacity: 1;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.accordion__body {
|
|
112
|
-
min-height: 0;
|
|
113
|
-
overflow: hidden;
|
|
114
|
-
font-size: 0.875rem;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.accordion__body-inner {
|
|
118
|
-
padding-inline: 1rem;
|
|
119
|
-
padding-top: 0;
|
|
120
|
-
padding-bottom: 1rem;
|
|
121
|
-
color: color-mix(in oklab, var(--color-base-content), transparent 25%);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
.accordion--surface {
|
|
125
|
-
border-radius: 1.5rem;
|
|
126
|
-
background-color: var(--color-base-100);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
.accordion--surface .accordion__item::after {
|
|
130
|
-
left: 3%;
|
|
131
|
-
width: 94%;
|
|
132
|
-
background-color: color-mix(
|
|
133
|
-
in oklab,
|
|
134
|
-
var(--color-base-content),
|
|
135
|
-
transparent 90%
|
|
136
|
-
);
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
.accordion--surface .accordion__item:first-child .accordion__trigger {
|
|
140
|
-
border-top-left-radius: 1.5rem;
|
|
141
|
-
border-top-right-radius: 1.5rem;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
.accordion--surface
|
|
145
|
-
.accordion__item:last-child:not(.accordion__item--expanded)
|
|
146
|
-
.accordion__trigger {
|
|
147
|
-
border-bottom-left-radius: 1.5rem;
|
|
148
|
-
border-bottom-right-radius: 1.5rem;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
@media (prefers-reduced-motion: reduce) {
|
|
152
|
-
.accordion__trigger,
|
|
153
|
-
.accordion__indicator,
|
|
154
|
-
.accordion__content {
|
|
155
|
-
transition: none;
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
}
|
|
1
|
+
@layer components {
|
|
2
|
+
.accordion {
|
|
3
|
+
width: 100%;
|
|
4
|
+
contain: layout style;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.accordion__item {
|
|
8
|
+
position: relative;
|
|
9
|
+
border: 0;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.accordion__item::after {
|
|
13
|
+
content: "";
|
|
14
|
+
position: absolute;
|
|
15
|
+
bottom: 0;
|
|
16
|
+
left: 0;
|
|
17
|
+
height: 1px;
|
|
18
|
+
width: 100%;
|
|
19
|
+
border-radius: 9999px;
|
|
20
|
+
background-color: var(--color-base-300);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.accordion__item:last-child::after {
|
|
24
|
+
content: none;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.accordion__item--hide-separator::after {
|
|
28
|
+
display: none;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.accordion__item--disabled {
|
|
32
|
+
opacity: 0.65;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.accordion__trigger {
|
|
36
|
+
cursor: pointer;
|
|
37
|
+
display: flex;
|
|
38
|
+
width: 100%;
|
|
39
|
+
align-items: center;
|
|
40
|
+
justify-content: space-between;
|
|
41
|
+
border: 0;
|
|
42
|
+
background-color: transparent;
|
|
43
|
+
padding: 1rem;
|
|
44
|
+
text-align: left;
|
|
45
|
+
font-size: 0.875rem;
|
|
46
|
+
font-weight: 500;
|
|
47
|
+
color: inherit;
|
|
48
|
+
user-select: none;
|
|
49
|
+
transition:
|
|
50
|
+
opacity 150ms ease,
|
|
51
|
+
background-color 150ms ease,
|
|
52
|
+
box-shadow 150ms ease;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.accordion__trigger:focus-visible,
|
|
56
|
+
.accordion__trigger[data-focus-visible="true"] {
|
|
57
|
+
outline: 2px solid var(--color-base-content);
|
|
58
|
+
outline-offset: 2px;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.accordion__item--disabled .accordion__trigger,
|
|
62
|
+
.accordion__trigger:disabled,
|
|
63
|
+
.accordion__trigger[aria-disabled="true"] {
|
|
64
|
+
cursor: not-allowed;
|
|
65
|
+
opacity: 0.55;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
@media (hover: hover) {
|
|
69
|
+
.accordion__trigger:hover:not([aria-expanded="true"]):not(:disabled):not(
|
|
70
|
+
[aria-disabled="true"]
|
|
71
|
+
),
|
|
72
|
+
.accordion__trigger[data-hovered="true"]:not(
|
|
73
|
+
[aria-expanded="true"]
|
|
74
|
+
):not(:disabled):not([aria-disabled="true"]) {
|
|
75
|
+
background-color: color-mix(
|
|
76
|
+
in oklab,
|
|
77
|
+
var(--color-base-content),
|
|
78
|
+
transparent 96%
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.accordion__indicator {
|
|
84
|
+
margin-inline-start: auto;
|
|
85
|
+
height: 1rem;
|
|
86
|
+
width: 1rem;
|
|
87
|
+
flex-shrink: 0;
|
|
88
|
+
opacity: 0.65;
|
|
89
|
+
transition: transform 250ms ease;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.accordion__indicator--expanded {
|
|
93
|
+
transform: rotate(-180deg);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.accordion__content {
|
|
97
|
+
display: grid;
|
|
98
|
+
grid-template-rows: 0fr;
|
|
99
|
+
opacity: 0;
|
|
100
|
+
overflow: hidden;
|
|
101
|
+
transition:
|
|
102
|
+
grid-template-rows 200ms ease,
|
|
103
|
+
opacity 200ms ease;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.accordion__content--expanded {
|
|
107
|
+
grid-template-rows: 1fr;
|
|
108
|
+
opacity: 1;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.accordion__body {
|
|
112
|
+
min-height: 0;
|
|
113
|
+
overflow: hidden;
|
|
114
|
+
font-size: 0.875rem;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.accordion__body-inner {
|
|
118
|
+
padding-inline: 1rem;
|
|
119
|
+
padding-top: 0;
|
|
120
|
+
padding-bottom: 1rem;
|
|
121
|
+
color: color-mix(in oklab, var(--color-base-content), transparent 25%);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.accordion--surface {
|
|
125
|
+
border-radius: 1.5rem;
|
|
126
|
+
background-color: var(--color-base-100);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.accordion--surface .accordion__item::after {
|
|
130
|
+
left: 3%;
|
|
131
|
+
width: 94%;
|
|
132
|
+
background-color: color-mix(
|
|
133
|
+
in oklab,
|
|
134
|
+
var(--color-base-content),
|
|
135
|
+
transparent 90%
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.accordion--surface .accordion__item:first-child .accordion__trigger {
|
|
140
|
+
border-top-left-radius: 1.5rem;
|
|
141
|
+
border-top-right-radius: 1.5rem;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.accordion--surface
|
|
145
|
+
.accordion__item:last-child:not(.accordion__item--expanded)
|
|
146
|
+
.accordion__trigger {
|
|
147
|
+
border-bottom-left-radius: 1.5rem;
|
|
148
|
+
border-bottom-right-radius: 1.5rem;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
@media (prefers-reduced-motion: reduce) {
|
|
152
|
+
.accordion__trigger,
|
|
153
|
+
.accordion__indicator,
|
|
154
|
+
.accordion__content {
|
|
155
|
+
transition: none;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|