rocksolidjs 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.
- package/LICENSE.txt +21 -0
- package/README.md +0 -0
- package/dist/Accordion/Accordion.d.ts +12 -0
- package/dist/Accordion/Accordion.js +1 -0
- package/dist/Accordion/index.d.ts +2 -0
- package/dist/Accordion/index.js +1 -0
- package/dist/Accordion/style.d.ts +4 -0
- package/dist/Accordion/style.js +1 -0
- package/dist/AccordionContext/AccordionContext.d.ts +10 -0
- package/dist/AccordionContext/AccordionContext.js +1 -0
- package/dist/AccordionContext/index.d.ts +1 -0
- package/dist/AccordionContext/index.js +1 -0
- package/dist/AccordionDetails/AccordionDetails.d.ts +8 -0
- package/dist/AccordionDetails/AccordionDetails.js +1 -0
- package/dist/AccordionDetails/index.d.ts +2 -0
- package/dist/AccordionDetails/index.js +1 -0
- package/dist/AccordionDetails/style.d.ts +64 -0
- package/dist/AccordionDetails/style.js +1 -0
- package/dist/AccordionSummary/AccordionSummary.d.ts +15 -0
- package/dist/AccordionSummary/AccordionSummary.js +1 -0
- package/dist/AccordionSummary/index.d.ts +2 -0
- package/dist/AccordionSummary/index.js +1 -0
- package/dist/AccordionSummary/style.d.ts +4 -0
- package/dist/AccordionSummary/style.js +1 -0
- package/dist/Alert/Alert.d.ts +26 -0
- package/dist/Alert/Alert.js +1 -0
- package/dist/Alert/index.d.ts +2 -0
- package/dist/Alert/index.js +1 -0
- package/dist/Alert/style.d.ts +82 -0
- package/dist/Alert/style.js +1 -0
- package/dist/Avatar/Avatar.d.ts +20 -0
- package/dist/Avatar/Avatar.js +1 -0
- package/dist/Avatar/index.d.ts +2 -0
- package/dist/Avatar/index.js +1 -0
- package/dist/Avatar/style.d.ts +130 -0
- package/dist/Avatar/style.js +1 -0
- package/dist/Backdrop/Backdrop.d.ts +7 -0
- package/dist/Backdrop/Backdrop.js +1 -0
- package/dist/Backdrop/index.d.ts +2 -0
- package/dist/Backdrop/index.js +1 -0
- package/dist/Backdrop/style.d.ts +4 -0
- package/dist/Backdrop/style.js +1 -0
- package/dist/Badge/Badge.d.ts +21 -0
- package/dist/Badge/Badge.js +1 -0
- package/dist/Badge/index.d.ts +2 -0
- package/dist/Badge/index.js +1 -0
- package/dist/Badge/style.d.ts +214 -0
- package/dist/Badge/style.js +1 -0
- package/dist/Breadcrumbs/Breadcrumbs.d.ts +14 -0
- package/dist/Breadcrumbs/Breadcrumbs.js +1 -0
- package/dist/Breadcrumbs/index.d.ts +2 -0
- package/dist/Breadcrumbs/index.js +1 -0
- package/dist/Breadcrumbs/style.d.ts +64 -0
- package/dist/Breadcrumbs/style.js +1 -0
- package/dist/Button/Button.d.ts +24 -0
- package/dist/Button/Button.js +1 -0
- package/dist/Button/index.d.ts +2 -0
- package/dist/Button/index.js +1 -0
- package/dist/Button/style.d.ts +238 -0
- package/dist/Button/style.js +1 -0
- package/dist/Card/Card.d.ts +10 -0
- package/dist/Card/Card.js +1 -0
- package/dist/Card/index.d.ts +2 -0
- package/dist/Card/index.js +1 -0
- package/dist/Card/style.d.ts +46 -0
- package/dist/Card/style.js +1 -0
- package/dist/CardContent/CardContent.d.ts +6 -0
- package/dist/CardContent/CardContent.js +1 -0
- package/dist/CardContent/index.d.ts +2 -0
- package/dist/CardContent/index.js +1 -0
- package/dist/CardContent/style.d.ts +4 -0
- package/dist/CardContent/style.js +1 -0
- package/dist/CardDescription/CardDescription.d.ts +8 -0
- package/dist/CardDescription/CardDescription.js +1 -0
- package/dist/CardDescription/index.d.ts +2 -0
- package/dist/CardDescription/index.js +1 -0
- package/dist/CardDescription/style.d.ts +4 -0
- package/dist/CardDescription/style.js +1 -0
- package/dist/CardFooter/CardFooter.d.ts +6 -0
- package/dist/CardFooter/CardFooter.js +1 -0
- package/dist/CardFooter/index.d.ts +2 -0
- package/dist/CardFooter/index.js +1 -0
- package/dist/CardFooter/style.d.ts +4 -0
- package/dist/CardFooter/style.js +1 -0
- package/dist/CardHeader/CardHeader.d.ts +6 -0
- package/dist/CardHeader/CardHeader.js +1 -0
- package/dist/CardHeader/index.d.ts +2 -0
- package/dist/CardHeader/index.js +1 -0
- package/dist/CardHeader/style.d.ts +4 -0
- package/dist/CardHeader/style.js +1 -0
- package/dist/CardTitle/CardTitle.d.ts +8 -0
- package/dist/CardTitle/CardTitle.js +1 -0
- package/dist/CardTitle/index.d.ts +2 -0
- package/dist/CardTitle/index.js +1 -0
- package/dist/CardTitle/style.d.ts +4 -0
- package/dist/CardTitle/style.js +1 -0
- package/dist/Checkbox/Checkbox.d.ts +18 -0
- package/dist/Checkbox/Checkbox.js +1 -0
- package/dist/Checkbox/index.d.ts +2 -0
- package/dist/Checkbox/index.js +1 -0
- package/dist/Checkbox/style.d.ts +88 -0
- package/dist/Checkbox/style.js +1 -0
- package/dist/Chip/Chip.d.ts +25 -0
- package/dist/Chip/Chip.js +1 -0
- package/dist/Chip/index.d.ts +2 -0
- package/dist/Chip/index.js +1 -0
- package/dist/Chip/style.d.ts +298 -0
- package/dist/Chip/style.js +1 -0
- package/dist/Dialog/Dialog.d.ts +20 -0
- package/dist/Dialog/Dialog.js +1 -0
- package/dist/Dialog/index.d.ts +2 -0
- package/dist/Dialog/index.js +1 -0
- package/dist/Dialog/style.d.ts +34 -0
- package/dist/Dialog/style.js +1 -0
- package/dist/DialogActions/DialogActions.d.ts +7 -0
- package/dist/DialogActions/DialogActions.js +1 -0
- package/dist/DialogActions/index.d.ts +2 -0
- package/dist/DialogActions/index.js +1 -0
- package/dist/DialogActions/style.d.ts +4 -0
- package/dist/DialogActions/style.js +1 -0
- package/dist/DialogContent/DialogContent.d.ts +7 -0
- package/dist/DialogContent/DialogContent.js +1 -0
- package/dist/DialogContent/index.d.ts +2 -0
- package/dist/DialogContent/index.js +1 -0
- package/dist/DialogContent/style.d.ts +4 -0
- package/dist/DialogContent/style.js +1 -0
- package/dist/DialogTitle/DialogTitle.d.ts +8 -0
- package/dist/DialogTitle/DialogTitle.js +1 -0
- package/dist/DialogTitle/index.d.ts +2 -0
- package/dist/DialogTitle/index.js +1 -0
- package/dist/DialogTitle/style.d.ts +4 -0
- package/dist/DialogTitle/style.js +1 -0
- package/dist/Divider/Divider.d.ts +11 -0
- package/dist/Divider/Divider.js +1 -0
- package/dist/Divider/index.d.ts +2 -0
- package/dist/Divider/index.js +1 -0
- package/dist/Divider/style.d.ts +34 -0
- package/dist/Divider/style.js +1 -0
- package/dist/IconButton/IconButton.d.ts +6 -0
- package/dist/IconButton/IconButton.js +1 -0
- package/dist/IconButton/index.d.ts +2 -0
- package/dist/IconButton/index.js +1 -0
- package/dist/IconButton/style.d.ts +40 -0
- package/dist/IconButton/style.js +1 -0
- package/dist/Input/Input.d.ts +27 -0
- package/dist/Input/Input.js +1 -0
- package/dist/Input/index.d.ts +2 -0
- package/dist/Input/index.js +1 -0
- package/dist/Input/style.d.ts +232 -0
- package/dist/Input/style.js +1 -0
- package/dist/Label/Label.d.ts +16 -0
- package/dist/Label/Label.js +1 -0
- package/dist/Label/index.d.ts +2 -0
- package/dist/Label/index.js +1 -0
- package/dist/Label/style.d.ts +118 -0
- package/dist/Label/style.js +1 -0
- package/dist/Link/Link.d.ts +15 -0
- package/dist/Link/Link.js +1 -0
- package/dist/Link/index.d.ts +2 -0
- package/dist/Link/index.js +1 -0
- package/dist/Link/style.d.ts +40 -0
- package/dist/Link/style.js +1 -0
- package/dist/Progress/Progress.d.ts +21 -0
- package/dist/Progress/Progress.js +1 -0
- package/dist/Progress/index.d.ts +2 -0
- package/dist/Progress/index.js +1 -0
- package/dist/Progress/style.d.ts +112 -0
- package/dist/Progress/style.js +1 -0
- package/dist/Radio/Radio.d.ts +19 -0
- package/dist/Radio/Radio.js +1 -0
- package/dist/Radio/index.d.ts +2 -0
- package/dist/Radio/index.js +1 -0
- package/dist/Radio/style.d.ts +76 -0
- package/dist/Radio/style.js +1 -0
- package/dist/RadioGroup/RadioGroup.d.ts +10 -0
- package/dist/RadioGroup/RadioGroup.js +1 -0
- package/dist/RadioGroup/index.d.ts +2 -0
- package/dist/RadioGroup/index.js +1 -0
- package/dist/RadioGroupContext/RadioGroupContext.d.ts +8 -0
- package/dist/RadioGroupContext/RadioGroupContext.js +1 -0
- package/dist/RadioGroupContext/index.d.ts +1 -0
- package/dist/RadioGroupContext/index.js +1 -0
- package/dist/Select/Select.d.ts +22 -0
- package/dist/Select/Select.js +1 -0
- package/dist/Select/index.d.ts +2 -0
- package/dist/Select/index.js +1 -0
- package/dist/Select/style.d.ts +124 -0
- package/dist/Select/style.js +1 -0
- package/dist/Skeleton/Skeleton.d.ts +9 -0
- package/dist/Skeleton/Skeleton.js +1 -0
- package/dist/Skeleton/index.d.ts +2 -0
- package/dist/Skeleton/index.js +1 -0
- package/dist/Skeleton/style.d.ts +34 -0
- package/dist/Skeleton/style.js +1 -0
- package/dist/Spinner/Spinner.d.ts +13 -0
- package/dist/Spinner/Spinner.js +1 -0
- package/dist/Spinner/index.d.ts +2 -0
- package/dist/Spinner/index.js +1 -0
- package/dist/Spinner/style.d.ts +112 -0
- package/dist/Spinner/style.js +1 -0
- package/dist/Switch/Switch.d.ts +23 -0
- package/dist/Switch/Switch.js +1 -0
- package/dist/Switch/index.d.ts +2 -0
- package/dist/Switch/index.js +1 -0
- package/dist/Switch/style.d.ts +226 -0
- package/dist/Switch/style.js +1 -0
- package/dist/Tab/Tab.d.ts +18 -0
- package/dist/Tab/Tab.js +1 -0
- package/dist/Tab/index.d.ts +2 -0
- package/dist/Tab/index.js +1 -0
- package/dist/Tab/style.d.ts +94 -0
- package/dist/Tab/style.js +1 -0
- package/dist/TabPanel/TabPanel.d.ts +7 -0
- package/dist/TabPanel/TabPanel.js +1 -0
- package/dist/TabPanel/index.d.ts +2 -0
- package/dist/TabPanel/index.js +1 -0
- package/dist/Table/Table.d.ts +7 -0
- package/dist/Table/Table.js +1 -0
- package/dist/Table/index.d.ts +2 -0
- package/dist/Table/index.js +1 -0
- package/dist/Table/style.d.ts +4 -0
- package/dist/Table/style.js +1 -0
- package/dist/TableBody/TableBody.d.ts +4 -0
- package/dist/TableBody/TableBody.js +1 -0
- package/dist/TableBody/index.d.ts +2 -0
- package/dist/TableBody/index.js +1 -0
- package/dist/TableCell/TableCell.d.ts +11 -0
- package/dist/TableCell/TableCell.js +1 -0
- package/dist/TableCell/index.d.ts +2 -0
- package/dist/TableCell/index.js +1 -0
- package/dist/TableCell/style.d.ts +70 -0
- package/dist/TableCell/style.js +1 -0
- package/dist/TableContext/TableContext.d.ts +6 -0
- package/dist/TableContext/TableContext.js +1 -0
- package/dist/TableContext/index.d.ts +1 -0
- package/dist/TableContext/index.js +1 -0
- package/dist/TableFooter/TableFooter.d.ts +4 -0
- package/dist/TableFooter/TableFooter.js +1 -0
- package/dist/TableFooter/index.d.ts +2 -0
- package/dist/TableFooter/index.js +1 -0
- package/dist/TableFooter/style.d.ts +4 -0
- package/dist/TableFooter/style.js +1 -0
- package/dist/TableHead/TableHead.d.ts +4 -0
- package/dist/TableHead/TableHead.js +1 -0
- package/dist/TableHead/index.d.ts +2 -0
- package/dist/TableHead/index.js +1 -0
- package/dist/TableHeadContext/TableHeadContext.d.ts +5 -0
- package/dist/TableHeadContext/TableHeadContext.js +1 -0
- package/dist/TableHeadContext/index.d.ts +1 -0
- package/dist/TableHeadContext/index.js +1 -0
- package/dist/TableRow/TableRow.d.ts +7 -0
- package/dist/TableRow/TableRow.js +1 -0
- package/dist/TableRow/index.d.ts +2 -0
- package/dist/TableRow/index.js +1 -0
- package/dist/TableRow/style.d.ts +34 -0
- package/dist/TableRow/style.js +1 -0
- package/dist/Tabs/Tabs.d.ts +12 -0
- package/dist/Tabs/Tabs.js +1 -0
- package/dist/Tabs/TabsContentContext.d.ts +7 -0
- package/dist/Tabs/TabsContentContext.js +1 -0
- package/dist/Tabs/index.d.ts +2 -0
- package/dist/Tabs/index.js +1 -0
- package/dist/Tabs/style.d.ts +94 -0
- package/dist/Tabs/style.js +1 -0
- package/dist/TabsContext/TabsContext.d.ts +10 -0
- package/dist/TabsContext/TabsContext.js +1 -0
- package/dist/TabsContext/context.d.ts +8 -0
- package/dist/TabsContext/context.js +3 -0
- package/dist/TabsContext/index.d.ts +2 -0
- package/dist/TabsContext/index.js +1 -0
- package/dist/Textarea/Textarea.d.ts +16 -0
- package/dist/Textarea/Textarea.js +1 -0
- package/dist/Textarea/index.d.ts +2 -0
- package/dist/Textarea/index.js +1 -0
- package/dist/Textarea/style.d.ts +160 -0
- package/dist/Textarea/style.js +1 -0
- package/dist/ThemeProvider/ThemeContext.d.ts +8 -0
- package/dist/ThemeProvider/ThemeContext.js +1 -0
- package/dist/ThemeProvider/ThemeProvider.d.ts +8 -0
- package/dist/ThemeProvider/ThemeProvider.js +1 -0
- package/dist/ThemeProvider/componentsTV.d.ts +1498 -0
- package/dist/ThemeProvider/componentsTV.js +1 -0
- package/dist/ThemeProvider/index.d.ts +3 -0
- package/dist/ThemeProvider/index.js +1 -0
- package/dist/Typography/Typography.d.ts +15 -0
- package/dist/Typography/Typography.js +1 -0
- package/dist/Typography/index.d.ts +2 -0
- package/dist/Typography/index.js +1 -0
- package/dist/Typography/style.d.ts +154 -0
- package/dist/Typography/style.js +1 -0
- package/dist/_chunks/dist-C-sN40SQ.js +1 -0
- package/dist/icons/Alert.d.ts +3 -0
- package/dist/icons/Alert.js +1 -0
- package/dist/icons/AngleDown.d.ts +3 -0
- package/dist/icons/AngleDown.js +1 -0
- package/dist/icons/AngleUp.d.ts +3 -0
- package/dist/icons/AngleUp.js +1 -0
- package/dist/icons/CheckboxChecked.d.ts +3 -0
- package/dist/icons/CheckboxChecked.js +1 -0
- package/dist/icons/CheckboxUnchecked.d.ts +3 -0
- package/dist/icons/CheckboxUnchecked.js +1 -0
- package/dist/icons/Checkmark.d.ts +3 -0
- package/dist/icons/Checkmark.js +1 -0
- package/dist/icons/Cross.d.ts +3 -0
- package/dist/icons/Cross.js +1 -0
- package/dist/icons/Error.d.ts +3 -0
- package/dist/icons/Error.js +1 -0
- package/dist/icons/Info.d.ts +3 -0
- package/dist/icons/Info.js +1 -0
- package/dist/icons/RadioChecked.d.ts +3 -0
- package/dist/icons/RadioChecked.js +1 -0
- package/dist/icons/RadioUnchecked.d.ts +3 -0
- package/dist/icons/RadioUnchecked.js +1 -0
- package/dist/icons/Warning.d.ts +3 -0
- package/dist/icons/Warning.js +1 -0
- package/dist/index.css +6 -0
- package/dist/index.d.ts +137 -0
- package/dist/index.js +1 -0
- package/dist/styles/createTheme.d.ts +4 -0
- package/dist/styles/createTheme.js +2 -0
- package/dist/styles/index.d.ts +8 -0
- package/dist/styles/index.js +1 -0
- package/dist/styles/theme/colors.d.ts +24 -0
- package/dist/styles/theme/colors.js +1 -0
- package/dist/styles/theme/disabled.d.ts +10 -0
- package/dist/styles/theme/disabled.js +1 -0
- package/dist/styles/theme/index.d.ts +20 -0
- package/dist/styles/theme/index.js +1 -0
- package/dist/styles/theme/rounded.d.ts +11 -0
- package/dist/styles/theme/rounded.js +1 -0
- package/dist/styles/theme/shadow.d.ts +10 -0
- package/dist/styles/theme/shadow.js +1 -0
- package/dist/styles/theme/themeSchema.d.ts +4 -0
- package/dist/styles/theme/themeSchema.js +1 -0
- package/dist/styles/theme/typography.d.ts +29 -0
- package/dist/styles/theme/typography.js +1 -0
- package/dist/styles/theme/utilities.d.ts +7 -0
- package/dist/styles/theme/utilities.js +1 -0
- package/dist/styles/useTheme.d.ts +2 -0
- package/dist/styles/useTheme.js +1 -0
- package/dist/utils/asVariant.d.ts +2 -0
- package/dist/utils/asVariant.js +1 -0
- package/dist/utils/cn.d.ts +2 -0
- package/dist/utils/cn.js +1 -0
- package/dist/utils/typedKeys.d.ts +2 -0
- package/dist/utils/typedKeys.js +1 -0
- package/package.json +257 -0
package/LICENSE.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Darshan Rajadhyaksha
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
File without changes
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ComponentProps } from 'solid-js';
|
|
2
|
+
export type AccordionProps = {
|
|
3
|
+
accordionId?: string;
|
|
4
|
+
class?: string;
|
|
5
|
+
defaultExpanded?: boolean;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
disableTransition?: boolean;
|
|
8
|
+
expanded?: boolean;
|
|
9
|
+
onChange?: (event: Event, expanded: boolean) => void;
|
|
10
|
+
} & Omit<ComponentProps<"div">, "onChange">;
|
|
11
|
+
declare const Accordion: (props: AccordionProps) => import("solid-js").JSX.Element;
|
|
12
|
+
export default Accordion;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"../utils/cn.js";import t from"./style.js";import{useThemeContext as n}from"../ThemeProvider/ThemeContext.js";import"../ThemeProvider/index.js";import{AccordionContext as r}from"../AccordionContext/AccordionContext.js";import"../AccordionContext/index.js";import{createComponent as i,insert as a,mergeProps as o,spread as s,template as c}from"solid-js/web";import{createMemo as l,createSignal as u,mergeProps as d,splitProps as f}from"solid-js";var p=c(`<div>`),m=c=>{let m=d({defaultExpanded:!1,disabled:!1,disableTransition:!1},c),[h,g]=f(m,[`accordionId`,`children`,`class`,`defaultExpanded`,`disabled`,`disableTransition`,`expanded`,`onChange`]),_=n(),v=typeof h.expanded==`boolean`,[y,b]=u(!!h.defaultExpanded),x=l(()=>v?h.expanded:y()),S=e=>{let t=!x();v||b(t),h.onChange?.(e,t)},C=l(()=>_?_.componentsTV.accordion():t()),w={accordionId:()=>h.accordionId,isExpanded:x,isDisabled:()=>h.disabled,disableTransition:()=>h.disableTransition,onToggleExpand:S};return(()=>{var t=p();return s(t,o(g,{get class(){return e(C(),h.class)}}),!1,!0),a(t,i(r.Provider,{value:w,get children(){return h.children}})),t})()};export{m as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./Accordion.js";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Theme } from '../styles/theme';
|
|
2
|
+
export declare const accordion: (theme?: Theme) => import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, string[], {} | {}, undefined, import('tailwind-variants').TVReturnTypeLike<unknown, undefined>>;
|
|
3
|
+
declare const _default: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, string[], {} | {}, undefined, import('tailwind-variants').TVReturnTypeLike<unknown, undefined>>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"../_chunks/dist-C-sN40SQ.js";import t from"../styles/theme/index.js";var n=(n=t)=>e({base:[`border-t border-l border-r`,`first-of-type:rounded-t-sm`,`last-of-type:border-b`,`last-of-type:rounded-b-sm`,n.divider]}),r=n();export{n as accordion,r as default};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Accessor } from 'solid-js';
|
|
2
|
+
export type AccordionContextValue = {
|
|
3
|
+
accordionId: Accessor<string | undefined>;
|
|
4
|
+
isDisabled: Accessor<boolean>;
|
|
5
|
+
disableTransition: Accessor<boolean>;
|
|
6
|
+
isExpanded: Accessor<boolean>;
|
|
7
|
+
onToggleExpand: (event: Event) => void;
|
|
8
|
+
};
|
|
9
|
+
export declare const AccordionContext: import('solid-js').Context<AccordionContextValue | undefined>;
|
|
10
|
+
export declare const useAccordionContext: () => AccordionContextValue;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createContext as e,useContext as t}from"solid-js";var n=e(),r=()=>{let e=t(n);if(!e)throw Error(`Use AccordionSummary and AccordionDetails inside Accordion component.`);return e};export{n as AccordionContext,r as useAccordionContext};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './AccordionContext';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./AccordionContext.js";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ComponentProps, JSXElement } from 'solid-js';
|
|
2
|
+
export type AccordionDetailsProps = {
|
|
3
|
+
children?: JSXElement;
|
|
4
|
+
class?: string;
|
|
5
|
+
onTransitionEnd?: (event: TransitionEvent) => void;
|
|
6
|
+
} & ComponentProps<"div">;
|
|
7
|
+
declare const AccordionDetails: (props: AccordionDetailsProps) => import("solid-js").JSX.Element;
|
|
8
|
+
export default AccordionDetails;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"../utils/cn.js";import t from"./style.js";import{useThemeContext as n}from"../ThemeProvider/ThemeContext.js";import"../ThemeProvider/index.js";import{useAccordionContext as r}from"../AccordionContext/AccordionContext.js";import"../AccordionContext/index.js";import{className as i,effect as a,insert as o,mergeProps as s,spread as c,template as l,use as u}from"solid-js/web";import{createMemo as d,createRenderEffect as f,onMount as p,splitProps as m}from"solid-js";var h=l(`<div><div>`),g=l=>{let[g,_]=m(l,[`class`,`children`,`onTransitionEnd`]),v=n(),y=r(),b=!1,x,S=()=>y.isExpanded(),C=()=>{if(y.disableTransition()){let e=S()?`auto`:`0px`;x&&(x.style.height=e);return}let e=S()?x?.scrollHeight??0:0;x&&(!S()&&b&&(x.style.height=`${x?.scrollHeight??0}px`),requestAnimationFrame(()=>{b=!1,x.style.height=`${e}px`}))},w=d(()=>{let e={disableTransition:y.disableTransition()};return v?v.componentsTV.accordionDetails(e):t(e)});p(()=>{C()}),f(()=>{C()});let T=e=>{e.propertyName===`height`&&S()&&(b=!0,x.style.height=`auto`),g.onTransitionEnd?.(e)},E=d(()=>{let e=y.accordionId();if(e)return{"aria-labelledby":`accordion-${e}-summary`,id:`accordion-${e}-details`,role:`region`}});return(()=>{var t=h(),n=t.firstChild,r=x;return typeof r==`function`?u(r,t):x=t,c(t,s(E,_,{get class(){return e(w().base(),g.class)},onTransitionEnd:T}),!1,!0),o(n,()=>g.children),a(()=>i(n,w().content())),t})()};export{g as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./AccordionDetails.js";
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { Theme } from '../styles/theme';
|
|
2
|
+
export declare const accordionDetails: (theme?: Theme) => import('tailwind-variants').TVReturnType<{
|
|
3
|
+
disableTransition: {
|
|
4
|
+
true: {};
|
|
5
|
+
false: {
|
|
6
|
+
base: string;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
}, {
|
|
10
|
+
base: string[];
|
|
11
|
+
content: string[];
|
|
12
|
+
}, undefined, {
|
|
13
|
+
disableTransition: {
|
|
14
|
+
true: {};
|
|
15
|
+
false: {
|
|
16
|
+
base: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
}, {
|
|
20
|
+
base: string[];
|
|
21
|
+
content: string[];
|
|
22
|
+
}, import('tailwind-variants').TVReturnTypeLike<{
|
|
23
|
+
disableTransition: {
|
|
24
|
+
true: {};
|
|
25
|
+
false: {
|
|
26
|
+
base: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
}, {
|
|
30
|
+
base: string[];
|
|
31
|
+
content: string[];
|
|
32
|
+
}>>;
|
|
33
|
+
declare const _default: import('tailwind-variants').TVReturnType<{
|
|
34
|
+
disableTransition: {
|
|
35
|
+
true: {};
|
|
36
|
+
false: {
|
|
37
|
+
base: string;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
}, {
|
|
41
|
+
base: string[];
|
|
42
|
+
content: string[];
|
|
43
|
+
}, undefined, {
|
|
44
|
+
disableTransition: {
|
|
45
|
+
true: {};
|
|
46
|
+
false: {
|
|
47
|
+
base: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
}, {
|
|
51
|
+
base: string[];
|
|
52
|
+
content: string[];
|
|
53
|
+
}, import('tailwind-variants').TVReturnTypeLike<{
|
|
54
|
+
disableTransition: {
|
|
55
|
+
true: {};
|
|
56
|
+
false: {
|
|
57
|
+
base: string;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
}, {
|
|
61
|
+
base: string[];
|
|
62
|
+
content: string[];
|
|
63
|
+
}>>;
|
|
64
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"../_chunks/dist-C-sN40SQ.js";import t from"../styles/theme/index.js";var n=(n=t)=>e({slots:{base:[`overflow-hidden`,n.typography.colors.textPrimary],content:[`pt-2 pb-3 px-4`,n.typography.variants.body2]},variants:{disableTransition:{true:{},false:{base:`transition-height duration-300`}}}}),r=n();export{n as accordionDetails,r as default};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ComponentProps, JSXElement } from 'solid-js';
|
|
2
|
+
import { ButtonProps } from '../Button';
|
|
3
|
+
type AccordionSummarySlotProps = {
|
|
4
|
+
button?: ButtonProps;
|
|
5
|
+
icon?: NonNullable<ButtonProps["slotProps"]>["endIcon"];
|
|
6
|
+
};
|
|
7
|
+
export type AccordionSummaryProps = {
|
|
8
|
+
children?: JSXElement;
|
|
9
|
+
class?: string;
|
|
10
|
+
collapsedIcon?: JSXElement;
|
|
11
|
+
expandedIcon?: JSXElement;
|
|
12
|
+
slotProps?: AccordionSummarySlotProps;
|
|
13
|
+
} & ComponentProps<"div">;
|
|
14
|
+
declare const AccordionSummary: (props: AccordionSummaryProps) => import("solid-js").JSX.Element;
|
|
15
|
+
export default AccordionSummary;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"../utils/cn.js";import t from"./style.js";import{useThemeContext as n}from"../ThemeProvider/ThemeContext.js";import"../ThemeProvider/index.js";import{useAccordionContext as r}from"../AccordionContext/AccordionContext.js";import"../AccordionContext/index.js";import i from"../Button/Button.js";import"../Button/index.js";import a from"../icons/AngleUp.js";import o from"../icons/AngleDown.js";import{createComponent as s,insert as c,mergeProps as l,spread as u,template as d}from"solid-js/web";import{createMemo as f,mergeProps as p,splitProps as m}from"solid-js";var h=d(`<div>`),g=d=>{let g=p({collapsedIcon:s(a,{class:`text-lg`}),expandedIcon:s(o,{class:`text-lg`})},d),[_,v]=m(g,[`class`,`children`,`collapsedIcon`,`expandedIcon`,`slotProps`]),y=n(),b=r(),x=f(()=>b.isExpanded()?_.expandedIcon:_.collapsedIcon),S=f(()=>y?y.componentsTV.accordionSummary():t()),C=f(()=>{let e=b.accordionId(),t={"aria-expanded":b.isExpanded()};return e?{...t,"aria-controls":`accordion-${e}-details`,id:`accordion-${e}-summary`}:t});return(()=>{var t=h();return u(t,v,!1,!0),c(t,s(i,l(C,()=>_.slotProps?.button,{get onClick(){return b.onToggleExpand},get endIcon(){return x()},get disabled(){return b.isDisabled()},variant:`ghost`,get class(){return e([S(),_.slotProps?.button?.class])},get slotProps(){return{startIcon:_.slotProps?.button?.slotProps?.startIcon,endIcon:_.slotProps?.icon}},fullWidth:!0,get children(){return _.children}}))),t})()};export{g as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./AccordionSummary.js";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Theme } from '../styles/theme';
|
|
2
|
+
export declare const accordionSummary: (theme?: Theme) => import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, string[], {} | {}, undefined, import('tailwind-variants').TVReturnTypeLike<unknown, undefined>>;
|
|
3
|
+
declare const _default: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, string[], {} | {}, undefined, import('tailwind-variants').TVReturnTypeLike<unknown, undefined>>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"../_chunks/dist-C-sN40SQ.js";import t from"../styles/theme/index.js";var n=(n=t)=>e({base:[`px-3 h-full min-h-10 justify-between gap-2`,`text-left rtl:text-right`,n.rounded.small]}),r=n();export{n as accordionSummary,r as default};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ComponentProps, JSXElement, ValidComponent } from 'solid-js';
|
|
2
|
+
import { VariantProps } from 'tailwind-variants';
|
|
3
|
+
import { TypographyProps } from '../Typography';
|
|
4
|
+
import { IconButtonProps } from '../IconButton';
|
|
5
|
+
import { ThemeColors } from '../styles/theme/colors';
|
|
6
|
+
import { default as alertDefaultStyles } from './style';
|
|
7
|
+
type AlertVariants = VariantProps<typeof alertDefaultStyles>;
|
|
8
|
+
type AlertSlotProps = {
|
|
9
|
+
icon?: TypographyProps;
|
|
10
|
+
content?: TypographyProps;
|
|
11
|
+
action?: ComponentProps<"div">;
|
|
12
|
+
closeButton?: IconButtonProps;
|
|
13
|
+
};
|
|
14
|
+
export type AlertProps<T extends ValidComponent = "div"> = {
|
|
15
|
+
action?: JSXElement;
|
|
16
|
+
as?: T;
|
|
17
|
+
children?: JSXElement;
|
|
18
|
+
class?: string;
|
|
19
|
+
color?: keyof ThemeColors;
|
|
20
|
+
icon?: JSXElement;
|
|
21
|
+
onClose?: (event: MouseEvent) => void;
|
|
22
|
+
slotProps?: AlertSlotProps;
|
|
23
|
+
variant?: AlertVariants["variant"];
|
|
24
|
+
} & Omit<ComponentProps<T>, "onClose">;
|
|
25
|
+
declare const Alert: <T extends ValidComponent = "div">(props: AlertProps<T>) => import("solid-js").JSX.Element;
|
|
26
|
+
export default Alert;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"../utils/cn.js";import t from"./style.js";import{useThemeContext as n}from"../ThemeProvider/ThemeContext.js";import"../ThemeProvider/index.js";import r from"../Typography/Typography.js";import"../Typography/index.js";import i from"../IconButton/IconButton.js";import"../IconButton/index.js";import a from"../icons/Alert.js";import o from"../icons/Error.js";import s from"../icons/Checkmark.js";import c from"../icons/Info.js";import l from"../icons/Warning.js";import u from"../icons/Cross.js";import{Dynamic as d,createComponent as f,insert as p,memo as m,mergeProps as h,spread as g,template as _}from"solid-js/web";import{createMemo as v,mergeProps as y,splitProps as b}from"solid-js";var x=_(`<div>`),S=_=>{let S=y({color:`default`,variant:`filled`},_),[C,w]=b(S,[`as`,`action`,`children`,`class`,`color`,`icon`,`onClose`,`slotProps`,`variant`]),T=n(),E=v(()=>{if(C.icon)return C.icon;switch(C.color){case`success`:return f(s,{});case`info`:return f(c,{});case`warning`:return f(l,{});case`error`:return f(o,{});default:return f(a,{})}}),D=v(()=>{let e={color:C.color,variant:C.variant};return T?T.componentsTV.alert(e):t(e)});return f(d,h({role:`alert`},w,{get component(){return C.as??`div`},get class(){return e(D().base(),C.class)},get children(){return[m(()=>m(()=>!!E())()?f(r,h({as:`span`},()=>C.slotProps?.icon,{get class(){return e(D().icon(),C.slotProps?.icon?.class)},get children(){return E()}})):null),f(r,h({as:`div`,variant:`inherit`},()=>C.slotProps?.content,{get class(){return e(D().content(),C.slotProps?.content?.class)},get children(){return C.children}})),m(()=>m(()=>!!C.action)()?(()=>{var e=x();return g(e,h(()=>C.slotProps?.action),!1,!0),p(e,()=>C.action),e})():null),m(()=>m(()=>typeof C.onClose==`function`)()?f(i,h({"aria-label":`Close`,get color(){return C.color},variant:`text`,size:`small`},()=>C.slotProps?.closeButton,{get onClick(){return C.onClose},get children(){return f(u,{})}})):null)]}}))};export{S as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./Alert.js";
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { Theme } from '../styles/theme';
|
|
2
|
+
export declare const alert: (theme?: Theme) => import('tailwind-variants').TVReturnType<{
|
|
3
|
+
color: Record<"default" | "success" | "warning" | "info" | "error", {}>;
|
|
4
|
+
variant: {
|
|
5
|
+
solid: {};
|
|
6
|
+
filled: {};
|
|
7
|
+
outlined: {
|
|
8
|
+
base: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
}, {
|
|
12
|
+
base: string[];
|
|
13
|
+
content: string;
|
|
14
|
+
icon: string;
|
|
15
|
+
}, undefined, {
|
|
16
|
+
color: Record<"default" | "success" | "warning" | "info" | "error", {}>;
|
|
17
|
+
variant: {
|
|
18
|
+
solid: {};
|
|
19
|
+
filled: {};
|
|
20
|
+
outlined: {
|
|
21
|
+
base: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
}, {
|
|
25
|
+
base: string[];
|
|
26
|
+
content: string;
|
|
27
|
+
icon: string;
|
|
28
|
+
}, import('tailwind-variants').TVReturnTypeLike<{
|
|
29
|
+
color: Record<"default" | "success" | "warning" | "info" | "error", {}>;
|
|
30
|
+
variant: {
|
|
31
|
+
solid: {};
|
|
32
|
+
filled: {};
|
|
33
|
+
outlined: {
|
|
34
|
+
base: string;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
}, {
|
|
38
|
+
base: string[];
|
|
39
|
+
content: string;
|
|
40
|
+
icon: string;
|
|
41
|
+
}>>;
|
|
42
|
+
declare const _default: import('tailwind-variants').TVReturnType<{
|
|
43
|
+
color: Record<"default" | "success" | "warning" | "info" | "error", {}>;
|
|
44
|
+
variant: {
|
|
45
|
+
solid: {};
|
|
46
|
+
filled: {};
|
|
47
|
+
outlined: {
|
|
48
|
+
base: string;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
}, {
|
|
52
|
+
base: string[];
|
|
53
|
+
content: string;
|
|
54
|
+
icon: string;
|
|
55
|
+
}, undefined, {
|
|
56
|
+
color: Record<"default" | "success" | "warning" | "info" | "error", {}>;
|
|
57
|
+
variant: {
|
|
58
|
+
solid: {};
|
|
59
|
+
filled: {};
|
|
60
|
+
outlined: {
|
|
61
|
+
base: string;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
}, {
|
|
65
|
+
base: string[];
|
|
66
|
+
content: string;
|
|
67
|
+
icon: string;
|
|
68
|
+
}, import('tailwind-variants').TVReturnTypeLike<{
|
|
69
|
+
color: Record<"default" | "success" | "warning" | "info" | "error", {}>;
|
|
70
|
+
variant: {
|
|
71
|
+
solid: {};
|
|
72
|
+
filled: {};
|
|
73
|
+
outlined: {
|
|
74
|
+
base: string;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
}, {
|
|
78
|
+
base: string[];
|
|
79
|
+
content: string;
|
|
80
|
+
icon: string;
|
|
81
|
+
}>>;
|
|
82
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"../_chunks/dist-C-sN40SQ.js";import t from"../styles/theme/index.js";import n from"../utils/asVariant.js";import r from"../utils/typedKeys.js";var i=[`solid`,`filled`,`outlined`],a=(a=t)=>e({slots:{base:[`flex items-center gap-2 w-full py-2 px-3 min-w-0 min-h-10`,a.rounded.small,a.typography.variants.body2],content:`grow-1 min-w-0`,icon:`text-lg shrink-0`},variants:{color:n(a.colors,()=>({})),variant:{solid:{},filled:{},outlined:{base:`border border-1`}}},compoundVariants:[...r(a.colors).flatMap(e=>i.map(t=>{let n=a.colors[e][t];return{color:e,variant:t,class:{base:[n.background,n.text,n.border]}}}))]}),o=a();export{a as alert,o as default};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ComponentProps, ValidComponent } from 'solid-js';
|
|
2
|
+
import { VariantProps } from 'tailwind-variants';
|
|
3
|
+
import { ThemeColors } from '../styles/theme/colors';
|
|
4
|
+
import { default as avatarDefaultStyles } from './style';
|
|
5
|
+
type AvatarVariants = VariantProps<typeof avatarDefaultStyles>;
|
|
6
|
+
type AvatarSlotProps = {
|
|
7
|
+
img?: ComponentProps<"img">;
|
|
8
|
+
};
|
|
9
|
+
export type AvatarProps<T extends ValidComponent = "div"> = {
|
|
10
|
+
alt?: string;
|
|
11
|
+
as?: T;
|
|
12
|
+
class?: string;
|
|
13
|
+
color?: keyof ThemeColors;
|
|
14
|
+
rounded?: AvatarVariants["rounded"];
|
|
15
|
+
size?: AvatarVariants["size"];
|
|
16
|
+
slotProps?: AvatarSlotProps;
|
|
17
|
+
src?: string;
|
|
18
|
+
} & ComponentProps<T>;
|
|
19
|
+
declare const Avatar: <T extends ValidComponent = "div">(props: AvatarProps<T>) => import("solid-js").JSX.Element;
|
|
20
|
+
export default Avatar;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"../utils/cn.js";import t from"./style.js";import{useThemeContext as n}from"../ThemeProvider/ThemeContext.js";import"../ThemeProvider/index.js";import{Dynamic as r,createComponent as i,memo as a,mergeProps as o,spread as s,template as c}from"solid-js/web";import{createMemo as l,createSignal as u,mergeProps as d,splitProps as f}from"solid-js";var p=c(`<img>`),m=e=>e.trim().split(/\s+/).filter(Boolean).map(e=>e[0]).slice(0,2).join(``).toUpperCase(),h=c=>{let h=d({color:`default`,rounded:`full`,size:`medium`},c),[g,_]=f(h,[`as`,`alt`,`class`,`color`,`children`,`rounded`,`size`,`slotProps`,`src`]),v=n(),[y,b]=u(g.src&&typeof g.src==`string`),x=()=>m(g.alt||``)||g.children,S=e=>{b(!1),g.slotProps?.img?.onError(e)},C=l(()=>{let e={rounded:g.rounded,color:g.color,size:g.size};return v?v.componentsTV.avatar(e):t(e)});return i(r,o(_,{get component(){return g.as??`div`},get class(){return e(C().base(),g.class)},get children(){return a(()=>!!y())()?(()=>{var t=p();return s(t,o(()=>g.slotProps?.img,{get src(){return g.src},get alt(){return g.alt},onError:S,get class(){return e(C().img(),g.slotProps?.img?.class)}}),!1,!1),t})():x()}}))};export{h as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./Avatar.js";
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { Theme } from '../styles/theme';
|
|
2
|
+
export declare const avatar: (theme?: Theme) => import('tailwind-variants').TVReturnType<{
|
|
3
|
+
color: Record<"default" | "success" | "warning" | "info" | "error", {
|
|
4
|
+
base: string[];
|
|
5
|
+
}>;
|
|
6
|
+
rounded: Record<"none" | "small" | "medium" | "large" | "full", {
|
|
7
|
+
base: string;
|
|
8
|
+
}>;
|
|
9
|
+
size: {
|
|
10
|
+
small: {
|
|
11
|
+
base: string;
|
|
12
|
+
};
|
|
13
|
+
medium: {
|
|
14
|
+
base: string;
|
|
15
|
+
};
|
|
16
|
+
large: {
|
|
17
|
+
base: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
}, {
|
|
21
|
+
base: string[];
|
|
22
|
+
img: string;
|
|
23
|
+
}, undefined, {
|
|
24
|
+
color: Record<"default" | "success" | "warning" | "info" | "error", {
|
|
25
|
+
base: string[];
|
|
26
|
+
}>;
|
|
27
|
+
rounded: Record<"none" | "small" | "medium" | "large" | "full", {
|
|
28
|
+
base: string;
|
|
29
|
+
}>;
|
|
30
|
+
size: {
|
|
31
|
+
small: {
|
|
32
|
+
base: string;
|
|
33
|
+
};
|
|
34
|
+
medium: {
|
|
35
|
+
base: string;
|
|
36
|
+
};
|
|
37
|
+
large: {
|
|
38
|
+
base: string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
}, {
|
|
42
|
+
base: string[];
|
|
43
|
+
img: string;
|
|
44
|
+
}, import('tailwind-variants').TVReturnTypeLike<{
|
|
45
|
+
color: Record<"default" | "success" | "warning" | "info" | "error", {
|
|
46
|
+
base: string[];
|
|
47
|
+
}>;
|
|
48
|
+
rounded: Record<"none" | "small" | "medium" | "large" | "full", {
|
|
49
|
+
base: string;
|
|
50
|
+
}>;
|
|
51
|
+
size: {
|
|
52
|
+
small: {
|
|
53
|
+
base: string;
|
|
54
|
+
};
|
|
55
|
+
medium: {
|
|
56
|
+
base: string;
|
|
57
|
+
};
|
|
58
|
+
large: {
|
|
59
|
+
base: string;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
}, {
|
|
63
|
+
base: string[];
|
|
64
|
+
img: string;
|
|
65
|
+
}>>;
|
|
66
|
+
declare const _default: import('tailwind-variants').TVReturnType<{
|
|
67
|
+
color: Record<"default" | "success" | "warning" | "info" | "error", {
|
|
68
|
+
base: string[];
|
|
69
|
+
}>;
|
|
70
|
+
rounded: Record<"none" | "small" | "medium" | "large" | "full", {
|
|
71
|
+
base: string;
|
|
72
|
+
}>;
|
|
73
|
+
size: {
|
|
74
|
+
small: {
|
|
75
|
+
base: string;
|
|
76
|
+
};
|
|
77
|
+
medium: {
|
|
78
|
+
base: string;
|
|
79
|
+
};
|
|
80
|
+
large: {
|
|
81
|
+
base: string;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
}, {
|
|
85
|
+
base: string[];
|
|
86
|
+
img: string;
|
|
87
|
+
}, undefined, {
|
|
88
|
+
color: Record<"default" | "success" | "warning" | "info" | "error", {
|
|
89
|
+
base: string[];
|
|
90
|
+
}>;
|
|
91
|
+
rounded: Record<"none" | "small" | "medium" | "large" | "full", {
|
|
92
|
+
base: string;
|
|
93
|
+
}>;
|
|
94
|
+
size: {
|
|
95
|
+
small: {
|
|
96
|
+
base: string;
|
|
97
|
+
};
|
|
98
|
+
medium: {
|
|
99
|
+
base: string;
|
|
100
|
+
};
|
|
101
|
+
large: {
|
|
102
|
+
base: string;
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
}, {
|
|
106
|
+
base: string[];
|
|
107
|
+
img: string;
|
|
108
|
+
}, import('tailwind-variants').TVReturnTypeLike<{
|
|
109
|
+
color: Record<"default" | "success" | "warning" | "info" | "error", {
|
|
110
|
+
base: string[];
|
|
111
|
+
}>;
|
|
112
|
+
rounded: Record<"none" | "small" | "medium" | "large" | "full", {
|
|
113
|
+
base: string;
|
|
114
|
+
}>;
|
|
115
|
+
size: {
|
|
116
|
+
small: {
|
|
117
|
+
base: string;
|
|
118
|
+
};
|
|
119
|
+
medium: {
|
|
120
|
+
base: string;
|
|
121
|
+
};
|
|
122
|
+
large: {
|
|
123
|
+
base: string;
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
}, {
|
|
127
|
+
base: string[];
|
|
128
|
+
img: string;
|
|
129
|
+
}>>;
|
|
130
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"../_chunks/dist-C-sN40SQ.js";import t from"../styles/theme/index.js";import n from"../utils/asVariant.js";var r=(r=t)=>e({slots:{base:[`size-8 grid place-items-center`,r.typography.variants.body2],img:`w-full h-full rounded-[inherit]`},variants:{color:n(r.colors,e=>({base:[e.solid.background,e.solid.text]})),rounded:n(r.rounded,e=>({base:e})),size:{small:{base:`size-6 text-sm`},medium:{base:`size-8 text-sm`},large:{base:`size-10 text-md`}}}}),i=r();export{r as avatar,i as default};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ComponentProps } from 'solid-js';
|
|
2
|
+
export type BackdropProps = {
|
|
3
|
+
class?: string;
|
|
4
|
+
onClick?: (event: MouseEvent) => void;
|
|
5
|
+
} & Omit<ComponentProps<"div">, "onClick">;
|
|
6
|
+
declare const Backdrop: (props: BackdropProps) => import("solid-js").JSX.Element;
|
|
7
|
+
export default Backdrop;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"../utils/cn.js";import t from"./style.js";import{useThemeContext as n}from"../ThemeProvider/ThemeContext.js";import"../ThemeProvider/index.js";import{insert as r,mergeProps as i,spread as a,template as o}from"solid-js/web";import{createMemo as s,splitProps as c}from"solid-js";var l=o(`<div>`),u=o=>{let[u,d]=c(o,[`children`,`class`]),f=n(),p=s(()=>f?f.componentsTV.backdrop():t());return(()=>{var t=l();return a(t,i(d,{get class(){return e(p(),u.class)}}),!1,!0),r(t,()=>u.children),t})()};export{u as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./Backdrop.js";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Theme } from '../styles/theme';
|
|
2
|
+
export declare const backdrop: (_theme?: Theme) => import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, string[], {} | {}, undefined, import('tailwind-variants').TVReturnTypeLike<unknown, undefined>>;
|
|
3
|
+
declare const _default: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, string[], {} | {}, undefined, import('tailwind-variants').TVReturnTypeLike<unknown, undefined>>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"../_chunks/dist-C-sN40SQ.js";import t from"../styles/theme/index.js";var n=(n=t)=>e({base:[`fixed inset-0 w-full h-full z-50`,`flex justify-center items-center`,`bg-black/50 backdrop-blur-sm`]}),r=n();export{n as backdrop,r as default};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ComponentProps, JSXElement, ParentProps } from 'solid-js';
|
|
2
|
+
import { VariantProps } from 'tailwind-variants';
|
|
3
|
+
import { ThemeColors } from '../styles/theme/colors';
|
|
4
|
+
import { default as badgeDefaultStyles } from './style';
|
|
5
|
+
type BadgeVariants = VariantProps<typeof badgeDefaultStyles>;
|
|
6
|
+
type BadgeSlotProps = {
|
|
7
|
+
badge?: ComponentProps<"span">;
|
|
8
|
+
};
|
|
9
|
+
export type BadgeProps = {
|
|
10
|
+
badgeContent?: JSXElement;
|
|
11
|
+
class?: string;
|
|
12
|
+
color?: keyof ThemeColors;
|
|
13
|
+
overlap?: BadgeVariants["overlap"];
|
|
14
|
+
position?: {
|
|
15
|
+
x: BadgeVariants["xPos"];
|
|
16
|
+
y: BadgeVariants["yPos"];
|
|
17
|
+
};
|
|
18
|
+
slotProps?: BadgeSlotProps;
|
|
19
|
+
} & ComponentProps<"span">;
|
|
20
|
+
declare const Badge: (props: ParentProps<BadgeProps>) => import("solid-js").JSX.Element;
|
|
21
|
+
export default Badge;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"../utils/cn.js";import t from"./style.js";import{useThemeContext as n}from"../ThemeProvider/ThemeContext.js";import"../ThemeProvider/index.js";import{insert as r,mergeProps as i,spread as a,template as o}from"solid-js/web";import{createMemo as s,mergeProps as c,splitProps as l}from"solid-js";var u=o(`<span><span>`),d=o=>{let d=c({color:`default`,overlap:`circle`},o),[f,p]=l(d,[`badgeContent`,`children`,`class`,`color`,`position`,`overlap`,`slotProps`]),m=n(),h=s(()=>f.badgeContent===void 0),g=s(()=>{let e={color:f.color,overlap:f.overlap,xPos:f.position?.x??`right`,yPos:f.position?.y??`top`,empty:h()};return m?m.componentsTV.badge(e):t(e)});return(()=>{var t=u(),n=t.firstChild;return a(t,i(p,{get class(){return e(g().base(),f.class)}}),!1,!0),r(t,()=>f.children,n),a(n,i({get"aria-hidden"(){return h()}},()=>f.slotProps?.badge,{get class(){return e(g().badge(),f.slotProps?.badge?.class)}}),!1,!0),r(n,()=>f.badgeContent),t})()};export{d as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./Badge.js";
|