@soybeanjs/ui 0.19.0 → 0.21.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/README.md +48 -1
- package/README.zh-CN.md +48 -1
- package/dist/components/accordion/variants.js +1 -1
- package/dist/components/alert/variants.js +1 -1
- package/dist/components/autocomplete/variants.js +1 -1
- package/dist/components/bottom-sheet/bottom-sheet.js +1 -1
- package/dist/components/bottom-sheet/variants.js +1 -1
- package/dist/components/button/button-group.js +1 -1
- package/dist/components/button/button-group.vue.d.ts +0 -1
- package/dist/components/button/variants.js +1 -1
- package/dist/components/calendar/calendar.js +1 -1
- package/dist/components/calendar/variants.js +1 -1
- package/dist/components/calendar-range/variants.js +1 -1
- package/dist/components/color-picker/variants.js +1 -1
- package/dist/components/command/variants.js +1 -1
- package/dist/components/config-provider/config-provider.js +1 -1
- package/dist/components/config-provider/config-provider.vue.d.ts +0 -2
- package/dist/components/date-picker/date-picker.js +1 -1
- package/dist/components/date-picker/variants.js +1 -1
- package/dist/components/dialog/dialog.js +1 -1
- package/dist/components/dialog/variants.js +1 -1
- package/dist/components/drawer/drawer.js +1 -1
- package/dist/components/drawer/variants.js +1 -1
- package/dist/components/editable/editable.js +1 -1
- package/dist/components/editable/editable.vue.d.ts +2 -63
- package/dist/components/editable/index.d.ts +1 -1
- package/dist/components/editable/types.d.ts +10 -38
- package/dist/components/empty/variants.js +1 -1
- package/dist/components/hover-card/hover-card.js +1 -1
- package/dist/components/hover-card/hover-card.vue.d.ts +2 -8
- package/dist/components/hover-card/index.d.ts +1 -1
- package/dist/components/hover-card/types.d.ts +9 -33
- package/dist/components/layout/variants.js +1 -1
- package/dist/components/link/index.d.ts +2 -2
- package/dist/components/menu/variants.js +1 -1
- package/dist/components/navigation-menu/index.d.ts +1 -1
- package/dist/components/navigation-menu/navigation-menu.js +1 -1
- package/dist/components/navigation-menu/navigation-menu.vue.d.ts +2 -23
- package/dist/components/navigation-menu/types.d.ts +10 -115
- package/dist/components/navigation-menu/variants.js +1 -1
- package/dist/components/page-tabs/page-tabs.vue.d.ts +1 -1
- package/dist/components/page-tabs/variants.js +1 -1
- package/dist/components/pagination/index.d.ts +1 -1
- package/dist/components/pagination/pagination.js +1 -1
- package/dist/components/pagination/pagination.vue.d.ts +2 -17
- package/dist/components/pagination/types.d.ts +8 -20
- package/dist/components/pagination/variants.js +1 -1
- package/dist/components/popover/variants.js +1 -1
- package/dist/components/radio-group/index.d.ts +2 -4
- package/dist/components/radio-group/index.js +1 -1
- package/dist/components/radio-group/radio-group-card.js +1 -0
- package/dist/components/radio-group/radio-group-card.vue.d.ts +22 -0
- package/dist/components/radio-group/radio-group.js +1 -1
- package/dist/components/radio-group/radio-group.vue.d.ts +6 -6
- package/dist/components/radio-group/types.d.ts +24 -67
- package/dist/components/radio-group/variants.js +1 -1
- package/dist/components/scroll-area/variants.js +1 -1
- package/dist/components/select/variants.js +1 -1
- package/dist/components/separator/variants.js +1 -1
- package/dist/components/splitter/variants.js +1 -1
- package/dist/components/stepper/index.d.ts +1 -1
- package/dist/components/stepper/stepper.js +1 -1
- package/dist/components/stepper/stepper.vue.d.ts +2 -104
- package/dist/components/stepper/types.d.ts +10 -55
- package/dist/components/stepper/variants.js +1 -1
- package/dist/components/switch/switch.js +1 -1
- package/dist/components/switch/variants.d.ts +3 -3
- package/dist/components/switch/variants.js +1 -1
- package/dist/components/table/variants.js +1 -1
- package/dist/components/tabs/variants.js +1 -1
- package/dist/components/toast/variants.js +1 -1
- package/dist/components/toggle-group/variants.js +1 -1
- package/dist/components/toolbar/toolbar.js +1 -1
- package/dist/components/toolbar/types.d.ts +5 -0
- package/dist/components/toolbar/variants.js +1 -1
- package/dist/components/tooltip/variants.js +1 -1
- package/dist/components/tree-menu/variants.js +1 -1
- package/dist/constants/components.js +1 -1
- package/dist/index.d.ts +39 -41
- package/dist/index.js +1 -1
- package/dist/styles.css +217 -177
- package/package.json +14 -14
- package/dist/components/navigation-menu/context.js +0 -1
- package/dist/components/navigation-menu/navigation-menu-item-slot.js +0 -1
- package/dist/components/navigation-menu/navigation-menu-option.js +0 -1
- package/dist/components/navigation-menu/navigation-menu-sub-option.js +0 -1
- package/dist/components/navigation-menu/shared.js +0 -1
- package/dist/components/radio-group/radio-card-group.js +0 -1
- package/dist/components/radio-group/radio-card-group.vue.d.ts +0 -23
- package/dist/components/radio-group/radio-card.js +0 -1
- package/dist/components/radio-group/radio-card.vue.d.ts +0 -22
- package/dist/components/radio-group/radio.js +0 -1
- package/dist/components/radio-group/radio.vue.d.ts +0 -18
package/README.md
CHANGED
|
@@ -66,9 +66,55 @@ provideAccordionUi(ui); // headless reads this via useAccordionUi()
|
|
|
66
66
|
|
|
67
67
|
- **`ThemeColor`** — 8 semantic colors: `primary` · `destructive` · `success` · `warning` · `info` · `carbon` · `secondary` · `accent`
|
|
68
68
|
- **`ThemeSize`** — 6 sizes: `xs` · `sm` · `md` · `lg` · `xl` · `2xl` (base 16px at `md`)
|
|
69
|
-
- **`ConfigProvider`** — sets global `dir`, `locale`, `nonce`, and default `tooltip` config for the entire component tree
|
|
69
|
+
- **`ConfigProvider`** — sets global `dir`, `locale`, `nonce`, and default `tooltip` config for the entire component tree, including RTL layout switching
|
|
70
70
|
- **`cn()`** — Tailwind-aware class merge (`clsx` + `tailwind-merge`), used for conflict-free class composition
|
|
71
71
|
|
|
72
|
+
### Locale Support
|
|
73
|
+
|
|
74
|
+
`ConfigProvider` supports the following locale bundles:
|
|
75
|
+
|
|
76
|
+
| Code | Language |
|
|
77
|
+
| ------- | ------------------- |
|
|
78
|
+
| `zh-CN` | Simplified Chinese |
|
|
79
|
+
| `zh-TW` | Traditional Chinese |
|
|
80
|
+
| `en` | English |
|
|
81
|
+
| `ar` | Arabic |
|
|
82
|
+
| `ja` | Japanese |
|
|
83
|
+
| `ko` | Korean |
|
|
84
|
+
| `de` | German |
|
|
85
|
+
| `fr` | French |
|
|
86
|
+
| `es` | Spanish |
|
|
87
|
+
| `pt-BR` | Portuguese (Brazil) |
|
|
88
|
+
| `ru` | Russian |
|
|
89
|
+
| `tr` | Turkish |
|
|
90
|
+
| `id` | Indonesian |
|
|
91
|
+
|
|
92
|
+
Only `en` and `zh-CN` are pre-registered by default. `registerLocale` supports two registration styles:
|
|
93
|
+
|
|
94
|
+
- Pass a `LocaleRegistry` object. Built-in locale files from `@soybeanjs/headless/locale/{code}` already export this shape, including `dir` metadata.
|
|
95
|
+
- Pass a locale key plus `LocaleMessages` for a lightweight custom locale.
|
|
96
|
+
|
|
97
|
+
The shorthand `registerLocale(key, messages)` form uses the key as the locale name and falls back to `ltr`. Use the object form when you need explicit metadata such as `rtl`.
|
|
98
|
+
|
|
99
|
+
```ts
|
|
100
|
+
import { en, registerLocale } from '@soybeanjs/headless/locale';
|
|
101
|
+
import type { LocaleMessages } from '@soybeanjs/headless/locale';
|
|
102
|
+
import ar from '@soybeanjs/headless/locale/ar';
|
|
103
|
+
|
|
104
|
+
registerLocale(ar);
|
|
105
|
+
|
|
106
|
+
const customMessages: LocaleMessages = {
|
|
107
|
+
...en.messages,
|
|
108
|
+
pagination: {
|
|
109
|
+
...en.messages.pagination,
|
|
110
|
+
nextPage: 'Next →',
|
|
111
|
+
prevPage: '← Prev'
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
registerLocale('custom', customMessages);
|
|
116
|
+
```
|
|
117
|
+
|
|
72
118
|
### Package Exports
|
|
73
119
|
|
|
74
120
|
**@soybeanjs/headless** ships fine-grained sub-paths:
|
|
@@ -194,6 +240,7 @@ import { AccordionRoot, AccordionItem, AccordionTrigger, AccordionContent } from
|
|
|
194
240
|
## ✨ Features
|
|
195
241
|
|
|
196
242
|
- **Accessible**: Follows WAI-ARIA patterns for roles, focus management, and keyboard navigation.
|
|
243
|
+
- **RTL ready**: Switch supported components between LTR and RTL layouts with `ConfigProvider`.
|
|
197
244
|
- **Headless-first**: Logic and styles are fully separated — use `@soybeanjs/headless` alone to build any design system.
|
|
198
245
|
- **Type Safe**: Written in strict TypeScript. All props, emits, slots, and context values are typed.
|
|
199
246
|
- **Customizable at every level**: Override individual slot classes via the `ui` prop, or swap the entire style layer.
|
package/README.zh-CN.md
CHANGED
|
@@ -66,9 +66,55 @@ provideAccordionUi(ui); // headless 通过 useAccordionUi() 读取
|
|
|
66
66
|
|
|
67
67
|
- **`ThemeColor`** — 8 种语义色:`primary` · `destructive` · `success` · `warning` · `info` · `carbon` · `secondary` · `accent`
|
|
68
68
|
- **`ThemeSize`** — 6 种尺寸:`xs` · `sm` · `md` · `lg` · `xl` · `2xl`(基准尺寸 `md` = 16px)
|
|
69
|
-
- **`ConfigProvider`** — 全局设置 `dir`、`locale`、`nonce` 及默认 `tooltip`
|
|
69
|
+
- **`ConfigProvider`** — 全局设置 `dir`、`locale`、`nonce` 及默认 `tooltip` 配置,应用于整个组件树,并支持 RTL 布局切换
|
|
70
70
|
- **`cn()`** — Tailwind 感知的类名合并工具(`clsx` + `tailwind-merge`),解决类名冲突
|
|
71
71
|
|
|
72
|
+
### 语言支持
|
|
73
|
+
|
|
74
|
+
`ConfigProvider` 当前支持以下 locale 文案包:
|
|
75
|
+
|
|
76
|
+
| 代码 | 语言 |
|
|
77
|
+
| ------- | ------------ |
|
|
78
|
+
| `zh-CN` | 简体中文 |
|
|
79
|
+
| `zh-TW` | 繁體中文 |
|
|
80
|
+
| `en` | 英语 |
|
|
81
|
+
| `ar` | 阿拉伯语 |
|
|
82
|
+
| `ja` | 日语 |
|
|
83
|
+
| `ko` | 韩语 |
|
|
84
|
+
| `de` | 德语 |
|
|
85
|
+
| `fr` | 法语 |
|
|
86
|
+
| `es` | 西班牙语 |
|
|
87
|
+
| `pt-BR` | 巴西葡萄牙语 |
|
|
88
|
+
| `ru` | 俄语 |
|
|
89
|
+
| `tr` | 土耳其语 |
|
|
90
|
+
| `id` | 印度尼西亚语 |
|
|
91
|
+
|
|
92
|
+
默认只有 `en` 和 `zh-CN` 会被预注册。`registerLocale` 支持两种注册方式:
|
|
93
|
+
|
|
94
|
+
- 直接传入 `LocaleRegistry` 对象。`@soybeanjs/headless/locale/{code}` 导出的内置语言文件已经是这种结构,并且自带 `dir` 元数据。
|
|
95
|
+
- 传入 locale key 和 `LocaleMessages`,用于快速注册一个轻量自定义语言。
|
|
96
|
+
|
|
97
|
+
简写形式 `registerLocale(key, messages)` 会将 key 作为语言名,并在未显式提供方向时回退到 `ltr`。如果你需要像 `ar` 这样的 `rtl` 元数据,请优先使用对象形式。
|
|
98
|
+
|
|
99
|
+
```ts
|
|
100
|
+
import { en, registerLocale } from '@soybeanjs/headless/locale';
|
|
101
|
+
import type { LocaleMessages } from '@soybeanjs/headless/locale';
|
|
102
|
+
import ar from '@soybeanjs/headless/locale/ar';
|
|
103
|
+
|
|
104
|
+
registerLocale(ar);
|
|
105
|
+
|
|
106
|
+
const customMessages: LocaleMessages = {
|
|
107
|
+
...en.messages,
|
|
108
|
+
pagination: {
|
|
109
|
+
...en.messages.pagination,
|
|
110
|
+
nextPage: '下一页 →',
|
|
111
|
+
prevPage: '← 上一页'
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
registerLocale('custom', customMessages);
|
|
116
|
+
```
|
|
117
|
+
|
|
72
118
|
### 包导出
|
|
73
119
|
|
|
74
120
|
**@soybeanjs/headless** 提供精细化子路径导出:
|
|
@@ -194,6 +240,7 @@ import { AccordionRoot, AccordionItem, AccordionTrigger, AccordionContent } from
|
|
|
194
240
|
## ✨ 特性
|
|
195
241
|
|
|
196
242
|
- **可访问性**:遵循 WAI-ARIA 模式,内置角色、焦点管理与键盘导航。
|
|
243
|
+
- **RTL 就绪**:通过 `ConfigProvider` 即可在已支持组件间切换 LTR / RTL 布局。
|
|
197
244
|
- **Headless 优先**:逻辑与样式完全分离—单独使用 `@soybeanjs/headless` 可构建任意设计系统。
|
|
198
245
|
- **类型安全**:严格 TypeScript 编写,所有 props、emits、slot 及 context 均有完整类型。
|
|
199
246
|
- **多级自定义**:通过 `ui` prop 覆盖单个橪位类名,也可替换整个样式层。
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{tv as e}from"tailwind-variants";const t=e({slots:{root:``,item:`border-b`,header:`flex`,content:[`overflow-hidden transition will-change-auto`,`data-[state=open]:animate-accordion-down data-[state=closed]:animate-accordion-up`],description:`m-0`,trigger:[`flex-1 flex items-center justify-start font-medium transition-all-200 bg-transparent`,`outline-none focus-visible:ring-3 focus-visible:ring-offset-background focus-visible:ring-primary/30`,`hover:underline [&[data-state=open]>.trigger-icon]:rotate-180`],triggerLeadingIcon:`shrink-0`,triggerIcon:`trigger-icon
|
|
1
|
+
import{tv as e}from"tailwind-variants";const t=e({slots:{root:``,item:`border-b`,header:`flex`,content:[`overflow-hidden transition will-change-auto`,`data-[state=open]:animate-accordion-down data-[state=closed]:animate-accordion-up`],description:`m-0`,trigger:[`flex-1 flex items-center justify-start font-medium transition-all-200 bg-transparent`,`outline-none focus-visible:ring-3 focus-visible:ring-offset-background focus-visible:ring-primary/30`,`hover:underline [&[data-state=open]>.trigger-icon]:rotate-180`],triggerLeadingIcon:`shrink-0`,triggerIcon:`trigger-icon ms-auto shrink-0 text-muted-foreground transition-transform-200`},variants:{size:{xs:{root:`text-2xs`,description:`pb-3`,trigger:`py-3 gap-2.5`},sm:{root:`text-xs`,description:`pb-3.5`,trigger:`py-3.5 gap-3`},md:{root:`text-sm`,description:`pb-4`,trigger:`py-4 gap-3.5`},lg:{root:`text-base`,description:`pb-4.5`,trigger:`py-4.5 gap-4`},xl:{root:`text-lg`,description:`pb-5`,trigger:`py-5 gap-4.5`},"2xl":{root:`text-2xl`,description:`pb-6`,trigger:`py-6 gap-5`}}},defaultVariants:{size:`md`}});export{t as accordionVariants};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{tv as e}from"tailwind-variants";const t=e({slots:{root:`relative flex w-full rounded-lg border`,content:`flex-1 flex flex-col`,icon:`shrink-0`,title:`font-medium tracking-tight m-0`,description:`[&_p]:leading-relaxed m-0`,close:`absolute`},variants:{color:{primary:{root:`border-primary text-primary`,icon:`text-primary`},destructive:{root:`border-destructive text-destructive`,icon:`text-destructive`},success:{root:`border-success text-success`,icon:`text-success`},warning:{root:`border-warning text-warning`,icon:`text-warning`},info:{root:`border-info text-info`,icon:`text-info`},carbon:{root:`border-carbon text-carbon`,icon:`text-carbon`},secondary:{root:`border-secondary-foreground/50 text-secondary-foreground`,icon:`text-secondary-foreground`},accent:{root:`border-accent-foreground/50 text-accent-foreground`,icon:`text-accent-foreground`}},variant:{solid:{root:``},pure:{root:`bg-background text-foreground border-border`},outline:{root:`bg-background`},soft:{root:`border-transparent`},ghost:{root:``}},size:{xs:{root:`gap-2 px-2 py-1.75 text-2xs`,content:`gap-0.75`,title:`text-xs leading-3.125`,close:`top-1.25
|
|
1
|
+
import{tv as e}from"tailwind-variants";const t=e({slots:{root:`relative flex w-full rounded-lg border`,content:`flex-1 flex flex-col`,icon:`shrink-0`,title:`font-medium tracking-tight m-0`,description:`[&_p]:leading-relaxed m-0`,close:`absolute`},variants:{color:{primary:{root:`border-primary text-primary`,icon:`text-primary`},destructive:{root:`border-destructive text-destructive`,icon:`text-destructive`},success:{root:`border-success text-success`,icon:`text-success`},warning:{root:`border-warning text-warning`,icon:`text-warning`},info:{root:`border-info text-info`,icon:`text-info`},carbon:{root:`border-carbon text-carbon`,icon:`text-carbon`},secondary:{root:`border-secondary-foreground/50 text-secondary-foreground`,icon:`text-secondary-foreground`},accent:{root:`border-accent-foreground/50 text-accent-foreground`,icon:`text-accent-foreground`}},variant:{solid:{root:``},pure:{root:`bg-background text-foreground border-border`},outline:{root:`bg-background`},soft:{root:`border-transparent`},ghost:{root:``}},size:{xs:{root:`gap-2 px-2 py-1.75 text-2xs`,content:`gap-0.75`,title:`text-xs leading-3.125`,close:`top-1.25 end-1.25`},sm:{root:`gap-2.5 px-3 py-2.5 text-xs`,content:`gap-1`,title:`text-sm leading-3.75`,close:`top-1.875 end-1.875`},md:{root:`gap-3 px-4 py-3 text-sm`,content:`gap-1`,title:`text-base leading-4.375`,close:`top-2.25 end-2.25`},lg:{root:`gap-3.5 px-5 py-3.5 text-base`,content:`gap-1.25`,title:`text-lg leading-5`,close:`top-2.5 end-2.5`},xl:{root:`gap-4 px-6 py-4 text-lg`,content:`gap-1.5`,title:`text-xl leading-5.625`,close:`top-2.75 end-2.75`},"2xl":{root:`gap-4.5 px-7 py-4.5 text-xl`,content:`gap-2`,title:`text-2xl leading-6.25`,close:`top-3 end-3`}}},compoundVariants:[{color:`primary`,variant:`solid`,class:{root:`bg-primary text-primary-foreground`,icon:`text-primary-foreground`,close:`text-primary-foreground`}},{color:`destructive`,variant:`solid`,class:{root:`bg-destructive text-destructive-foreground`,icon:`text-destructive-foreground`,close:`text-destructive-foreground`}},{color:`success`,variant:`solid`,class:{root:`bg-success text-success-foreground`,icon:`text-success-foreground`,close:`text-success-foreground`}},{color:`warning`,variant:`solid`,class:{root:`bg-warning text-warning-foreground`,icon:`text-warning-foreground`,close:`text-warning-foreground`}},{color:`info`,variant:`solid`,class:{root:`bg-info text-info-foreground`,icon:`text-info-foreground`,close:`text-info-foreground`}},{color:`carbon`,variant:`solid`,class:{root:`bg-carbon text-carbon-foreground`,icon:`text-carbon-foreground`,close:`text-carbon-foreground`}},{color:`secondary`,variant:`solid`,class:{root:`bg-secondary text-secondary-foreground`,icon:`text-secondary-foreground`,close:`text-secondary-foreground`}},{color:`accent`,variant:`solid`,class:{root:`bg-accent text-accent-foreground`,icon:`text-accent-foreground`,close:`text-accent-foreground`}},{color:`primary`,variant:[`soft`,`ghost`],class:{root:`bg-primary/10`}},{color:`destructive`,variant:[`soft`,`ghost`],class:{root:`bg-destructive/10`}},{color:`success`,variant:[`soft`,`ghost`],class:{root:`bg-success/10`}},{color:`warning`,variant:[`soft`,`ghost`],class:{root:`bg-warning/10`}},{color:`info`,variant:[`soft`,`ghost`],class:{root:`bg-info/10`}},{color:`carbon`,variant:[`soft`,`ghost`],class:{root:`bg-carbon/10`}},{color:`secondary`,variant:[`soft`,`ghost`],class:{root:`bg-secondary-foreground/5`}},{color:`accent`,variant:[`soft`,`ghost`],class:{root:`bg-accent-foreground/5`}}],defaultVariants:{color:`primary`,variant:`ghost`,size:`md`}});export{t as alertVariants};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{tv as e}from"tailwind-variants";const t=e({slots:{root:`flex w-full flex-col`,anchor:[`group flex w-full items-center rounded-md border border-input bg-background text-foreground shadow-xs transition-all-150`,`outline-none focus-within:ring-3 focus-within:ring-offset-background focus-within:ring-primary/30`,`data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50`],inputRoot:`flex min-w-0 grow items-center gap-2 bg-transparent`,inputControl:`min-w-0 grow border-0 bg-transparent px-0 outline-none placeholder:text-muted-foreground`,inputIcon:`shrink-0 text-muted-foreground`,inputClearable:[`flex shrink-0 items-center justify-center rounded-sm text-muted-foreground opacity-70 outline-none transition-opacity`,`hover:opacity-100 focus-visible:ring-2 focus-visible:ring-ring/50 focus-visible:ring-offset-1`,`disabled:cursor-not-allowed disabled:opacity-40`],trigger:`flex shrink-0 items-center justify-center text-muted-foreground outline-none disabled:cursor-not-allowed`,triggerIcon:`size-1em`,popup:[`relative z-50 min-w-[--soybean-popper-anchor-width] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md`,`data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,`data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95`,`data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`],viewport:`max-h-80 overflow-y-auto overflow-x-hidden p-1`,empty:`py-6 text-center text-sm text-muted-foreground`,group:`overflow-hidden`,groupLabel:`px-2 py-1.5 text-xs font-medium text-muted-foreground`,item:[`relative flex w-full items-center rounded-sm outline-none select-none`,`data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50`],itemIcon:`shrink-0 text-muted-foreground`,itemText:`grow truncate text-
|
|
1
|
+
import{tv as e}from"tailwind-variants";const t=e({slots:{root:`flex w-full flex-col`,anchor:[`group flex w-full items-center rounded-md border border-input bg-background text-foreground shadow-xs transition-all-150`,`outline-none focus-within:ring-3 focus-within:ring-offset-background focus-within:ring-primary/30`,`data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50`],inputRoot:`flex min-w-0 grow items-center gap-2 bg-transparent`,inputControl:`min-w-0 grow border-0 bg-transparent px-0 outline-none placeholder:text-muted-foreground`,inputIcon:`shrink-0 text-muted-foreground`,inputClearable:[`flex shrink-0 items-center justify-center rounded-sm text-muted-foreground opacity-70 outline-none transition-opacity`,`hover:opacity-100 focus-visible:ring-2 focus-visible:ring-ring/50 focus-visible:ring-offset-1`,`disabled:cursor-not-allowed disabled:opacity-40`],trigger:`flex shrink-0 items-center justify-center text-muted-foreground outline-none disabled:cursor-not-allowed`,triggerIcon:`size-1em`,popup:[`relative z-50 min-w-[--soybean-popper-anchor-width] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md`,`data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,`data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95`,`data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`],viewport:`max-h-80 overflow-y-auto overflow-x-hidden p-1`,empty:`py-6 text-center text-sm text-muted-foreground`,group:`overflow-hidden`,groupLabel:`px-2 py-1.5 text-xs font-medium text-muted-foreground`,item:[`relative flex w-full items-center rounded-sm outline-none select-none`,`data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50`],itemIcon:`shrink-0 text-muted-foreground`,itemText:`grow truncate text-start`,itemIndicator:`ms-auto shrink-0 text-muted-foreground`,separator:`-mx-1 my-1 h-px bg-border`},variants:{size:{xs:{anchor:`min-h-6 gap-1 px-1.5 text-2xs`,inputRoot:`gap-1`,popup:`text-2xs`,viewport:`max-h-70 p-0.75`,groupLabel:`px-1 py-1 text-3xs`,item:`gap-1 px-1 py-1`,separator:`-mx-0.75 my-0.75`},sm:{anchor:`min-h-7 gap-1.5 px-2 text-xs`,inputRoot:`gap-1.5`,popup:`text-xs`,viewport:`max-h-75 p-0.875`,groupLabel:`px-1.5 py-1.25 text-2xs`,item:`gap-1.5 px-1.5 py-1.25`,separator:`-mx-0.875 my-0.875`},md:{anchor:`min-h-8 gap-2 px-2.5 text-sm`,inputRoot:`gap-2`,popup:`text-sm`,viewport:`max-h-80 p-1`,groupLabel:`px-2 py-1.5 text-xs`,item:`gap-2 px-2 py-1.5`,separator:`-mx-1 my-1`},lg:{anchor:`min-h-9 gap-2.5 px-3 text-base`,inputRoot:`gap-2.5`,popup:`text-base`,viewport:`max-h-90 p-1.25`,groupLabel:`px-2.5 py-1.75 text-sm`,item:`gap-2.5 px-2.5 py-1.75`,separator:`-mx-1.25 my-1.25`},xl:{anchor:`min-h-10 gap-3 px-3.5 text-lg`,inputRoot:`gap-3`,popup:`text-lg`,viewport:`max-h-100 p-1.5`,groupLabel:`px-3 py-2 text-base`,item:`gap-3 px-3 py-2`,separator:`-mx-1.5 my-1.5`},"2xl":{anchor:`min-h-12 gap-3.5 px-4 text-xl`,inputRoot:`gap-3.5`,popup:`text-xl`,viewport:`max-h-115 p-1.75`,groupLabel:`px-3.5 py-2.5 text-lg`,item:`gap-3.5 px-3.5 py-2.5`,separator:`-mx-1.75 my-1.75`}}},defaultVariants:{size:`md`}});export{t as autocompleteVariants};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{mergeVariants as e}from"../../theme/shared.js";import{miniSizeMap as t}from"../../theme/config.js";import"../../theme/index.js";import{buttonIconVariants as n,buttonVariants as r}from"../button/variants.js";import{dialogVariants as i}from"../dialog/variants.js";import{drawerVariants as a}from"../drawer/variants.js";import{bottomSheetVariants as o}from"./variants.js";import{computed as s,createBlock as c,createSlots as l,defineComponent as u,guardReactiveProps as d,mergeProps as f,normalizeProps as p,openBlock as m,renderList as h,renderSlot as g,toHandlers as _,unref as v,useSlots as y,withCtx as b}from"vue";import{useForwardListeners as x,useOmitProps as S}from"@soybeanjs/headless/composables";import{keysOf as C}from"@soybeanjs/utils";import{BottomSheetCompact as w,provideBottomSheetUi as T}from"@soybeanjs/headless/bottom-sheet";const E=u({name:`SBottomSheet`,__name:`bottom-sheet`,props:{title:{},description:{},icon:{},showClose:{type:Boolean,default:!0},pure:{type:Boolean},showCancel:{type:[String,Boolean]},cancelText:{},showConfirm:{type:Boolean,default:!0},confirmText:{},triggerProps:{},overlayProps:{},portalProps:{},popupProps:{},headerProps:{},contentProps:{},footerProps:{},titleProps:{},descriptionProps:{},closeProps:{},cancelProps:{},confirmProps:{},isAlert:{type:Boolean},alertType:{},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean},modal:{type:Boolean,default:!0},activeSnapPoint:{},closeThreshold:{},shouldScaleBackground:{type:Boolean,default:!0},setBackgroundColorOnScale:{type:Boolean,default:!0},scrollLockTimeout:{},fixed:{type:Boolean},dismissible:{type:Boolean,default:!0},nested:{type:Boolean},direction:{},noBodyStyles:{type:Boolean},handleOnly:{type:Boolean},preventScrollRestoration:{type:Boolean},snapPoints:{},fadeFromIndex:{},handleProps:{},class:{type:[Boolean,null,String,Object,Array]},size:{},ui:{}},emits:[`update:open`,`click`,`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`,`confirm`,`cancel`,`drag`,`release`,`close`,`update:activeSnapPoint`],setup(u,{emit:E}){let D=u,O=E,k=y(),A=S(D,[`class`,`size`,`ui`]),j=x(O),M=s(()=>C(k));return T(s(()=>e(Object.assign(o({size:D.size}),
|
|
1
|
+
import{mergeVariants as e}from"../../theme/shared.js";import{miniSizeMap as t}from"../../theme/config.js";import"../../theme/index.js";import{buttonIconVariants as n,buttonVariants as r}from"../button/variants.js";import{dialogVariants as i}from"../dialog/variants.js";import{drawerVariants as a}from"../drawer/variants.js";import{bottomSheetVariants as o}from"./variants.js";import{computed as s,createBlock as c,createSlots as l,defineComponent as u,guardReactiveProps as d,mergeProps as f,normalizeProps as p,openBlock as m,renderList as h,renderSlot as g,toHandlers as _,unref as v,useSlots as y,withCtx as b}from"vue";import{useForwardListeners as x,useOmitProps as S}from"@soybeanjs/headless/composables";import{keysOf as C}from"@soybeanjs/utils";import{BottomSheetCompact as w,provideBottomSheetUi as T}from"@soybeanjs/headless/bottom-sheet";const E=u({name:`SBottomSheet`,__name:`bottom-sheet`,props:{title:{},description:{},icon:{},showClose:{type:Boolean,default:!0},pure:{type:Boolean},showCancel:{type:[String,Boolean]},cancelText:{},showConfirm:{type:Boolean,default:!0},confirmText:{},triggerProps:{},overlayProps:{},portalProps:{},popupProps:{},headerProps:{},contentProps:{},footerProps:{},titleProps:{},descriptionProps:{},closeProps:{},cancelProps:{},confirmProps:{},dir:{},isAlert:{type:Boolean},alertType:{},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean},modal:{type:Boolean,default:!0},activeSnapPoint:{},closeThreshold:{},shouldScaleBackground:{type:Boolean,default:!0},setBackgroundColorOnScale:{type:Boolean,default:!0},scrollLockTimeout:{},fixed:{type:Boolean},dismissible:{type:Boolean,default:!0},nested:{type:Boolean},direction:{},noBodyStyles:{type:Boolean},handleOnly:{type:Boolean},preventScrollRestoration:{type:Boolean},snapPoints:{},fadeFromIndex:{},handleProps:{},class:{type:[Boolean,null,String,Object,Array]},size:{},ui:{}},emits:[`update:open`,`click`,`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`,`confirm`,`cancel`,`drag`,`release`,`close`,`update:activeSnapPoint`],setup(u,{emit:E}){let D=u,O=E,k=y(),A=S(D,[`class`,`size`,`ui`]),j=x(O),M=s(()=>C(k));return T(s(()=>e(Object.assign(o({size:D.size}),i({size:D.size,pure:D.pure}),a({size:D.size,side:`bottom`}),{$base:{cancel:r({variant:`pure`,size:t[D.size??`md`]}),confirm:r({variant:`solid`,size:t[D.size??`md`]}),close:n({size:t[D.size??`md`]})}}),D.ui,{popup:D.class}))),(e,t)=>(m(),c(v(w),f(v(A),_(v(j))),l({_:2},[h(M.value,t=>({name:t,fn:b(n=>[g(e.$slots,t,p(d(n)))])}))]),1040))}});export{E as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{tv as e}from"tailwind-variants";const t=e({slots:{
|
|
1
|
+
import{tv as e}from"tailwind-variants";const t=e({slots:{handle:`mx-auto shrink-0 cursor-grab active:cursor-grabbing rounded-full bg-muted`},variants:{size:{xs:{handle:`mt-0.625 h-1.5 w-20`},sm:{handle:`mt-0.75 h-1.75 w-22`},md:{handle:`mt-1 h-2 w-25`},lg:{handle:`mt-1.25 h-2.5 w-30`},xl:{handle:`mt-1.5 h-3 w-35`},"2xl":{handle:`mt-1.75 h-3.5 w-40`}}},defaultVariants:{size:`md`}});export{t as bottomSheetVariants};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cn as e}from"../../theme/merge.js";import"../../theme/index.js";import{buttonGroupVariants as t}from"./variants.js";import{useConfigProvider as n}from"../config-provider/context.js";import
|
|
1
|
+
import{cn as e}from"../../theme/merge.js";import"../../theme/index.js";import{buttonGroupVariants as t}from"./variants.js";import{useConfigProvider as n}from"../config-provider/context.js";import{provideButtonGroupContext as r}from"./context.js";import{computed as i,createBlock as a,defineComponent as o,mergeProps as s,openBlock as c,renderSlot as l,unref as u,withCtx as d}from"vue";import{useOmitProps as f}from"@soybeanjs/headless/composables";import{Primitive as p}from"@soybeanjs/headless/primitive";import{transformPropsToContext as m}from"@soybeanjs/headless/shared";const h=o({name:`SButtonGroup`,__name:`button-group`,props:{orientation:{default:`horizontal`},dir:{},class:{type:[Boolean,null,String,Object,Array]},color:{},size:{},variant:{},shape:{},shadow:{},fitContent:{type:Boolean},type:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{}},setup(o){let h=o,g=f(h,[`class`,`orientation`,`color`,`size`,`variant`,`shape`,`shadow`,`disabled`]),_=n(`ButtonGroup`),v=i(()=>e(t({orientation:h.orientation}),h.class)),y=i(()=>h.dir??_.dir.value);return r(m(h,[`color`,`size`,`variant`,`shape`,`shadow`,`fitContent`,`disabled`])),(e,t)=>(c(),a(u(p),s(u(g),{class:v.value,dir:y.value}),{default:d(()=>[l(e.$slots,`default`)]),_:3},16,[`class`,`dir`]))}});export{h as default};
|
|
@@ -8,7 +8,6 @@ type __VLS_Slots = {} & {
|
|
|
8
8
|
default?: (props: typeof __VLS_8) => any;
|
|
9
9
|
};
|
|
10
10
|
declare const __VLS_base: _$vue.DefineComponent<ButtonGroupProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<ButtonGroupProps> & Readonly<{}>, {
|
|
11
|
-
dir: _$_soybeanjs_headless0.Direction;
|
|
12
11
|
orientation: _$_soybeanjs_headless0.DataOrientation;
|
|
13
12
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
14
13
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{tv as e}from"tailwind-variants";const t=e({base:[`inline-flex items-center justify-center font-medium transition-all-150`,`outline-none focus-visible:ring-3 focus-visible:ring-offset-background`,`data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50`],variants:{color:{primary:`focus-visible:ring-primary/30`,destructive:`focus-visible:ring-destructive/30`,success:`focus-visible:ring-success/30`,warning:`focus-visible:ring-warning/30`,info:`focus-visible:ring-info/30`,carbon:`focus-visible:ring-carbon/30`,secondary:`focus-visible:ring-secondary-foreground/20`,accent:`focus-visible:ring-accent-foreground/20`},variant:{solid:`bg-primary text-primary-foreground hover:bg-primary/80 active:bg-primary-600`,pure:`border border-border bg-background text-accent-foreground hover:bg-accent/60 active:bg-accent`,plain:`border border-border bg-background text-foreground`,outline:`border bg-background`,dashed:`border border-dashed bg-background`,soft:`bg-primary/10 hover:bg-primary/10 active:bg-primary/20`,ghost:`bg-transparent`,link:`bg-transparent underline-offset-4 hover:underline`},size:{xs:`gap-1 text-2xs`,sm:`gap-2 text-xs`,md:`gap-3 text-sm`,lg:`gap-4 text-base`,xl:`gap-5 text-lg`,"2xl":`gap-6 text-xl`},shape:{auto:`rounded-md`,rounded:`rounded-full`,square:`h-8 w-8 p-0 gap-0 rounded-md`,circle:`h-8 w-8 p-0 gap-0 rounded-full`},shadow:{none:`shadow-none`,sm:`shadow-sm`,md:`shadow-md`,lg:`shadow-lg`},fitContent:{true:`w-fit h-fit`,false:``}},compoundVariants:[{color:`destructive`,variant:`solid`,class:`bg-destructive text-destructive-foreground hover:bg-destructive/80 active:bg-destructive-600`},{color:`success`,variant:`solid`,class:`bg-success text-success-foreground hover:bg-success/80 active:bg-success-600`},{color:`warning`,variant:`solid`,class:`bg-warning text-warning-foreground hover:bg-warning/80 active:bg-warning-600`},{color:`info`,variant:`solid`,class:`bg-info text-info-foreground hover:bg-info/80 active:bg-info-600`},{color:`carbon`,variant:`solid`,class:`bg-carbon text-carbon-foreground hover:bg-carbon/80 active:bg-carbon-600`},{color:`secondary`,variant:`solid`,class:`bg-secondary text-secondary-foreground hover:bg-secondary/80 active:bg-secondary-foreground/20`},{color:`accent`,variant:`solid`,class:`bg-accent text-accent-foreground hover:bg-accent/80 active:bg-accent-foreground/20`},{color:`primary`,variant:[`outline`,`dashed`,`soft`,`ghost`,`link`],class:`text-primary`},{color:`destructive`,variant:[`outline`,`dashed`,`soft`,`ghost`,`link`],class:`text-destructive`},{color:`success`,variant:[`outline`,`dashed`,`soft`,`ghost`,`link`],class:`text-success`},{color:`warning`,variant:[`outline`,`dashed`,`soft`,`ghost`,`link`],class:`text-warning`},{color:`info`,variant:[`outline`,`dashed`,`soft`,`ghost`,`link`],class:`text-info`},{color:`carbon`,variant:[`outline`,`dashed`,`soft`,`ghost`,`link`],class:`text-carbon`},{color:`secondary`,variant:[`outline`,`dashed`,`soft`,`ghost`,`link`],class:`text-secondary-foreground`},{color:`accent`,variant:[`outline`,`dashed`,`soft`,`ghost`,`link`],class:`text-accent-foreground`},{color:`primary`,variant:[`outline`,`dashed`,`ghost`],class:`hover:bg-primary/10 active:bg-primary/20`},{color:`destructive`,variant:[`outline`,`dashed`,`ghost`],class:`hover:bg-destructive/10 active:bg-destructive/20`},{color:`success`,variant:[`outline`,`dashed`,`ghost`],class:`hover:bg-success/10 active:bg-success/20`},{color:`warning`,variant:[`outline`,`dashed`,`ghost`],class:`hover:bg-warning/10 active:bg-warning/20`},{color:`info`,variant:[`outline`,`dashed`,`ghost`],class:`hover:bg-info/10 active:bg-info/20`},{color:`carbon`,variant:[`outline`,`dashed`,`ghost`],class:`hover:bg-carbon/10 active:bg-carbon/20`},{color:`secondary`,variant:[`outline`,`dashed`,`ghost`],class:`hover:bg-secondary-foreground/10 active:bg-secondary-foreground/20`},{color:`accent`,variant:[`outline`,`dashed`,`ghost`],class:`hover:bg-accent-foreground/10 active:bg-accent-foreground/20`},{color:`primary`,variant:`plain`,class:`hover:border-primary hover:text-primary`},{color:`destructive`,variant:`plain`,class:`hover:border-destructive hover:text-destructive`},{color:`success`,variant:`plain`,class:`hover:border-success hover:text-success`},{color:`warning`,variant:`plain`,class:`hover:border-warning hover:text-warning`},{color:`info`,variant:`plain`,class:`hover:border-info hover:text-info`},{color:`carbon`,variant:`plain`,class:`hover:border-carbon hover:text-carbon`},{color:`secondary`,variant:`plain`,class:`hover:border-secondary-foreground hover:text-secondary-foreground`},{color:`accent`,variant:`plain`,class:`hover:border-accent-foreground hover:text-accent-foreground`},{color:`primary`,variant:[`outline`,`dashed`],class:`border-primary`},{color:`destructive`,variant:[`outline`,`dashed`],class:`border-destructive`},{color:`success`,variant:[`outline`,`dashed`],class:`border-success`},{color:`warning`,variant:[`outline`,`dashed`],class:`border-warning`},{color:`info`,variant:[`outline`,`dashed`],class:`border-info`},{color:`carbon`,variant:[`outline`,`dashed`],class:`border-carbon`},{color:`secondary`,variant:[`outline`,`dashed`],class:`border-secondary-foreground`},{color:`accent`,variant:[`outline`,`dashed`],class:`border-accent-foreground`},{color:`destructive`,variant:`soft`,class:`bg-destructive/10 hover:bg-destructive/10 active:bg-destructive/20`},{color:`success`,variant:`soft`,class:`bg-success/10 hover:bg-success/10 active:bg-success/20`},{color:`warning`,variant:`soft`,class:`bg-warning/10 hover:bg-warning/10 active:bg-warning/20`},{color:`info`,variant:`soft`,class:`bg-info/10 hover:bg-info/10 active:bg-info/20`},{color:`carbon`,variant:`soft`,class:`bg-carbon/10 hover:bg-carbon/10 active:bg-carbon/20`},{color:`secondary`,variant:`soft`,class:`bg-secondary-foreground/10 hover:bg-secondary-foreground/10 active:bg-secondary-foreground/20`},{color:`accent`,variant:`soft`,class:`bg-accent-foreground/10 hover:bg-accent-foreground/10 active:bg-accent-foreground/20`},{size:`xs`,fitContent:!0,class:`p-0.75`},{size:`sm`,fitContent:!0,class:`p-0.875`},{size:`md`,fitContent:!0,class:`p-1`},{size:`lg`,fitContent:!0,class:`p-1.25`},{size:`xl`,fitContent:!0,class:`p-1.5`},{size:`2xl`,fitContent:!0,class:`p-1.75`},{size:`xs`,fitContent:!1,class:`h-6 px-1.5`},{size:`sm`,fitContent:!1,class:`h-7 px-2`},{size:`md`,fitContent:!1,class:`h-8 px-4`},{size:`lg`,fitContent:!1,class:`h-9 px-6`},{size:`xl`,fitContent:!1,class:`h-10 px-8`},{size:`2xl`,fitContent:!1,class:`h-12 px-10`},{size:`xs`,fitContent:!1,shape:[`square`,`circle`],class:`w-6`},{size:`sm`,fitContent:!1,shape:[`square`,`circle`],class:`w-7`},{size:`lg`,fitContent:!1,shape:[`square`,`circle`],class:`w-9`},{size:`xl`,fitContent:!1,shape:[`square`,`circle`],class:`w-10`},{size:`2xl`,fitContent:!1,shape:[`square`,`circle`],class:`w-12`},{variant:[`ghost`,`link`],shadow:[`sm`,`md`,`lg`],class:`shadow-none`},{variant:`plain`,shadow:`sm`,class:`active:shadow-md`},{variant:`plain`,shadow:`md`,class:`active:shadow-lg`},{variant:`plain`,shadow:`lg`,class:`active:shadow-xl`},{variant:`pure`,shadow:`sm`,class:`active:shadow-sm`},{variant:`pure`,shadow:`md`,class:`active:shadow-md`},{variant:`pure`,shadow:`lg`,class:`active:shadow-lg`}],defaultVariants:{color:`primary`,variant:`solid`,size:`md`,shape:`auto`,shadow:`sm`,fitContent:!1}}),n=e({base:`[&>*]:relative focus-visible:[&>*]:z-2 not-first:not-last:[&>*]:
|
|
1
|
+
import{tv as e}from"tailwind-variants";const t=e({base:[`inline-flex items-center justify-center font-medium transition-all-150`,`outline-none focus-visible:ring-3 focus-visible:ring-offset-background`,`data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50`],variants:{color:{primary:`focus-visible:ring-primary/30`,destructive:`focus-visible:ring-destructive/30`,success:`focus-visible:ring-success/30`,warning:`focus-visible:ring-warning/30`,info:`focus-visible:ring-info/30`,carbon:`focus-visible:ring-carbon/30`,secondary:`focus-visible:ring-secondary-foreground/20`,accent:`focus-visible:ring-accent-foreground/20`},variant:{solid:`bg-primary text-primary-foreground hover:bg-primary/80 active:bg-primary-600`,pure:`border border-border bg-background text-accent-foreground hover:bg-accent/60 active:bg-accent`,plain:`border border-border bg-background text-foreground`,outline:`border bg-background`,dashed:`border border-dashed bg-background`,soft:`bg-primary/10 hover:bg-primary/10 active:bg-primary/20`,ghost:`bg-transparent`,link:`bg-transparent underline-offset-4 hover:underline`},size:{xs:`gap-1 text-2xs`,sm:`gap-2 text-xs`,md:`gap-3 text-sm`,lg:`gap-4 text-base`,xl:`gap-5 text-lg`,"2xl":`gap-6 text-xl`},shape:{auto:`rounded-md`,rounded:`rounded-full`,square:`h-8 w-8 p-0 gap-0 rounded-md`,circle:`h-8 w-8 p-0 gap-0 rounded-full`},shadow:{none:`shadow-none`,sm:`shadow-sm`,md:`shadow-md`,lg:`shadow-lg`},fitContent:{true:`w-fit h-fit`,false:``}},compoundVariants:[{color:`destructive`,variant:`solid`,class:`bg-destructive text-destructive-foreground hover:bg-destructive/80 active:bg-destructive-600`},{color:`success`,variant:`solid`,class:`bg-success text-success-foreground hover:bg-success/80 active:bg-success-600`},{color:`warning`,variant:`solid`,class:`bg-warning text-warning-foreground hover:bg-warning/80 active:bg-warning-600`},{color:`info`,variant:`solid`,class:`bg-info text-info-foreground hover:bg-info/80 active:bg-info-600`},{color:`carbon`,variant:`solid`,class:`bg-carbon text-carbon-foreground hover:bg-carbon/80 active:bg-carbon-600`},{color:`secondary`,variant:`solid`,class:`bg-secondary text-secondary-foreground hover:bg-secondary/80 active:bg-secondary-foreground/20`},{color:`accent`,variant:`solid`,class:`bg-accent text-accent-foreground hover:bg-accent/80 active:bg-accent-foreground/20`},{color:`primary`,variant:[`outline`,`dashed`,`soft`,`ghost`,`link`],class:`text-primary`},{color:`destructive`,variant:[`outline`,`dashed`,`soft`,`ghost`,`link`],class:`text-destructive`},{color:`success`,variant:[`outline`,`dashed`,`soft`,`ghost`,`link`],class:`text-success`},{color:`warning`,variant:[`outline`,`dashed`,`soft`,`ghost`,`link`],class:`text-warning`},{color:`info`,variant:[`outline`,`dashed`,`soft`,`ghost`,`link`],class:`text-info`},{color:`carbon`,variant:[`outline`,`dashed`,`soft`,`ghost`,`link`],class:`text-carbon`},{color:`secondary`,variant:[`outline`,`dashed`,`soft`,`ghost`,`link`],class:`text-secondary-foreground`},{color:`accent`,variant:[`outline`,`dashed`,`soft`,`ghost`,`link`],class:`text-accent-foreground`},{color:`primary`,variant:[`outline`,`dashed`,`ghost`],class:`hover:bg-primary/10 active:bg-primary/20`},{color:`destructive`,variant:[`outline`,`dashed`,`ghost`],class:`hover:bg-destructive/10 active:bg-destructive/20`},{color:`success`,variant:[`outline`,`dashed`,`ghost`],class:`hover:bg-success/10 active:bg-success/20`},{color:`warning`,variant:[`outline`,`dashed`,`ghost`],class:`hover:bg-warning/10 active:bg-warning/20`},{color:`info`,variant:[`outline`,`dashed`,`ghost`],class:`hover:bg-info/10 active:bg-info/20`},{color:`carbon`,variant:[`outline`,`dashed`,`ghost`],class:`hover:bg-carbon/10 active:bg-carbon/20`},{color:`secondary`,variant:[`outline`,`dashed`,`ghost`],class:`hover:bg-secondary-foreground/10 active:bg-secondary-foreground/20`},{color:`accent`,variant:[`outline`,`dashed`,`ghost`],class:`hover:bg-accent-foreground/10 active:bg-accent-foreground/20`},{color:`primary`,variant:`plain`,class:`hover:border-primary hover:text-primary`},{color:`destructive`,variant:`plain`,class:`hover:border-destructive hover:text-destructive`},{color:`success`,variant:`plain`,class:`hover:border-success hover:text-success`},{color:`warning`,variant:`plain`,class:`hover:border-warning hover:text-warning`},{color:`info`,variant:`plain`,class:`hover:border-info hover:text-info`},{color:`carbon`,variant:`plain`,class:`hover:border-carbon hover:text-carbon`},{color:`secondary`,variant:`plain`,class:`hover:border-secondary-foreground hover:text-secondary-foreground`},{color:`accent`,variant:`plain`,class:`hover:border-accent-foreground hover:text-accent-foreground`},{color:`primary`,variant:[`outline`,`dashed`],class:`border-primary`},{color:`destructive`,variant:[`outline`,`dashed`],class:`border-destructive`},{color:`success`,variant:[`outline`,`dashed`],class:`border-success`},{color:`warning`,variant:[`outline`,`dashed`],class:`border-warning`},{color:`info`,variant:[`outline`,`dashed`],class:`border-info`},{color:`carbon`,variant:[`outline`,`dashed`],class:`border-carbon`},{color:`secondary`,variant:[`outline`,`dashed`],class:`border-secondary-foreground`},{color:`accent`,variant:[`outline`,`dashed`],class:`border-accent-foreground`},{color:`destructive`,variant:`soft`,class:`bg-destructive/10 hover:bg-destructive/10 active:bg-destructive/20`},{color:`success`,variant:`soft`,class:`bg-success/10 hover:bg-success/10 active:bg-success/20`},{color:`warning`,variant:`soft`,class:`bg-warning/10 hover:bg-warning/10 active:bg-warning/20`},{color:`info`,variant:`soft`,class:`bg-info/10 hover:bg-info/10 active:bg-info/20`},{color:`carbon`,variant:`soft`,class:`bg-carbon/10 hover:bg-carbon/10 active:bg-carbon/20`},{color:`secondary`,variant:`soft`,class:`bg-secondary-foreground/10 hover:bg-secondary-foreground/10 active:bg-secondary-foreground/20`},{color:`accent`,variant:`soft`,class:`bg-accent-foreground/10 hover:bg-accent-foreground/10 active:bg-accent-foreground/20`},{size:`xs`,fitContent:!0,class:`p-0.75`},{size:`sm`,fitContent:!0,class:`p-0.875`},{size:`md`,fitContent:!0,class:`p-1`},{size:`lg`,fitContent:!0,class:`p-1.25`},{size:`xl`,fitContent:!0,class:`p-1.5`},{size:`2xl`,fitContent:!0,class:`p-1.75`},{size:`xs`,fitContent:!1,class:`h-6 px-1.5`},{size:`sm`,fitContent:!1,class:`h-7 px-2`},{size:`md`,fitContent:!1,class:`h-8 px-4`},{size:`lg`,fitContent:!1,class:`h-9 px-6`},{size:`xl`,fitContent:!1,class:`h-10 px-8`},{size:`2xl`,fitContent:!1,class:`h-12 px-10`},{size:`xs`,fitContent:!1,shape:[`square`,`circle`],class:`w-6`},{size:`sm`,fitContent:!1,shape:[`square`,`circle`],class:`w-7`},{size:`lg`,fitContent:!1,shape:[`square`,`circle`],class:`w-9`},{size:`xl`,fitContent:!1,shape:[`square`,`circle`],class:`w-10`},{size:`2xl`,fitContent:!1,shape:[`square`,`circle`],class:`w-12`},{variant:[`ghost`,`link`],shadow:[`sm`,`md`,`lg`],class:`shadow-none`},{variant:`plain`,shadow:`sm`,class:`active:shadow-md`},{variant:`plain`,shadow:`md`,class:`active:shadow-lg`},{variant:`plain`,shadow:`lg`,class:`active:shadow-xl`},{variant:`pure`,shadow:`sm`,class:`active:shadow-sm`},{variant:`pure`,shadow:`md`,class:`active:shadow-md`},{variant:`pure`,shadow:`lg`,class:`active:shadow-lg`}],defaultVariants:{color:`primary`,variant:`solid`,size:`md`,shape:`auto`,shadow:`sm`,fitContent:!1}}),n=e({base:`[&>*]:relative focus-visible:[&>*]:z-2 not-first:not-last:[&>*]:rounded-0`,variants:{orientation:{horizontal:`inline-flex not-last:[&>*]:border-e-0 focus-visible:[&>*]:border-e first:[&>*]:rounded-e-0 last:[&>*]:rounded-s-0`,vertical:`flex flex-col not-last:[&>*]:border-b-0 focus-visible:[&>*]:border-b first:[&>*]:rounded-b-0 last:[&>*]:rounded-t-0`}},defaultVariants:{orientation:`horizontal`}}),r=e=>t({size:`md`,color:`accent`,variant:`ghost`,shape:`square`,fitContent:!0,...e});export{n as buttonGroupVariants,r as buttonIconVariants,t as buttonVariants};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{mergeVariants as e}from"../../theme/shared.js";import{miniSizeMap as t}from"../../theme/config.js";import"../../theme/index.js";import{buttonIconVariants as n}from"../button/variants.js";import r from"../icon/icon.js";import i from"../select/select.js";import{calendarVariants as a}from"./variants.js";import{computed as o,createBlock as s,createSlots as c,createTextVNode as l,createVNode as u,defineComponent as d,guardReactiveProps as f,mergeProps as p,normalizeProps as m,openBlock as h,renderSlot as g,toDisplayString as _,toHandlers as v,unref as y,withCtx as b}from"vue";import{useForwardListeners as x,useOmitProps as S}from"@soybeanjs/headless/composables";import{useLocaleMessages as C}from"@soybeanjs/headless";import{CalendarCompact as w,provideCalendarUi as T}from"@soybeanjs/headless/calendar";const E=d({name:`SCalendar`,__name:`calendar`,props:{class:{type:[Boolean,null,String,Object,Array]},size:{},ui:{},headerProps:{},headingProps:{},prevProps:{},nextProps:{},gridProps:{},gridHeadProps:{},gridBodyProps:{},gridRowProps:{},headCellProps:{},cellProps:{},cellTriggerProps:{},dir:{},locale:{},modelValue:{},defaultValue:{},multiple:{},placeholder:{},defaultPlaceholder:{},disabled:{type:Boolean},readonly:{type:Boolean},pagedNavigation:{type:Boolean},preventDeselect:{type:Boolean},weekStartsOn:{},weekdayFormat:{},calendarLabel:{},fixedWeeks:{type:Boolean},maxValue:{},minValue:{},numberOfMonths:{},initialFocus:{type:Boolean},isDateDisabled:{type:Function},isDateUnavailable:{type:Function},nextPage:{type:Function},prevPage:{type:Function},disableDaysOutsideCurrentView:{type:Boolean},asChild:{type:Boolean},as:{}},emits:[`update:modelValue`,`update:placeholder`],setup(d,{emit:E}){let D=d,O=E,k=S(D,[`class`,`size`,`ui`]),A=x(O),j=C(),M=o(()=>({"aria-label":j.value.calendar.selectMonth})),N=o(()=>({"aria-label":j.value.calendar.selectYear})),P=o(()=>e(Object.assign(a({size:D.size}),{$base:{prev:n({size:
|
|
1
|
+
import{mergeVariants as e}from"../../theme/shared.js";import{miniSizeMap as t}from"../../theme/config.js";import"../../theme/index.js";import{buttonIconVariants as n}from"../button/variants.js";import r from"../icon/icon.js";import i from"../select/select.js";import{calendarVariants as a}from"./variants.js";import{computed as o,createBlock as s,createSlots as c,createTextVNode as l,createVNode as u,defineComponent as d,guardReactiveProps as f,mergeProps as p,normalizeProps as m,openBlock as h,renderSlot as g,toDisplayString as _,toHandlers as v,unref as y,withCtx as b}from"vue";import{useForwardListeners as x,useOmitProps as S}from"@soybeanjs/headless/composables";import{useLocaleMessages as C}from"@soybeanjs/headless";import{CalendarCompact as w,provideCalendarUi as T}from"@soybeanjs/headless/calendar";const E=d({name:`SCalendar`,__name:`calendar`,props:{class:{type:[Boolean,null,String,Object,Array]},size:{},ui:{},headerProps:{},headingProps:{},prevProps:{},nextProps:{},gridProps:{},gridHeadProps:{},gridBodyProps:{},gridRowProps:{},headCellProps:{},cellProps:{},cellTriggerProps:{},dir:{},locale:{},modelValue:{},defaultValue:{},multiple:{},placeholder:{},defaultPlaceholder:{},disabled:{type:Boolean},readonly:{type:Boolean},pagedNavigation:{type:Boolean},preventDeselect:{type:Boolean},weekStartsOn:{},weekdayFormat:{},calendarLabel:{},fixedWeeks:{type:Boolean},maxValue:{},minValue:{},numberOfMonths:{},initialFocus:{type:Boolean},isDateDisabled:{type:Function},isDateUnavailable:{type:Function},nextPage:{type:Function},prevPage:{type:Function},disableDaysOutsideCurrentView:{type:Boolean},asChild:{type:Boolean},as:{}},emits:[`update:modelValue`,`update:placeholder`],setup(d,{emit:E}){let D=d,O=E,k=S(D,[`class`,`size`,`ui`]),A=x(O),j=C(),M=o(()=>({"aria-label":j.value.calendar.selectMonth})),N=o(()=>({"aria-label":j.value.calendar.selectYear})),P=o(()=>{let r=t[D.size||`md`];return e(Object.assign(a({size:D.size}),{$base:{prev:n({size:r,variant:`pure`}),next:n({size:r,variant:`pure`})}}),D.ui,{root:D.class})}),F=o(()=>t[D.size||`md`]);return T(P),(e,t)=>(h(),s(y(w),p(y(k),v(y(A))),c({prev:b(t=>[g(e.$slots,`prev`,m(f(t)),()=>[u(r,{icon:`lucide:chevron-left`})])]),next:b(t=>[g(e.$slots,`next`,m(f(t)),()=>[u(r,{icon:`lucide:chevron-right`})])]),"head-cell":b(t=>[g(e.$slots,`head-cell`,m(f(t)),()=>[l(_(t.label),1)])]),day:b(t=>[g(e.$slots,`day`,m(f(t)),()=>[l(_(t.dayValue),1)])]),default:b(t=>[g(e.$slots,`default`,m(f(t)))]),_:2},[e.$slots.heading?{name:`heading`,fn:b(t=>[g(e.$slots,`heading`,m(f(t)))]),key:`0`}:{name:`heading`,fn:b(({monthOptions:e,yearOptions:t,selectedMonth:n,selectedYear:r,onMonthChange:a,onYearChange:o})=>[u(i,{size:F.value,disabled:d.disabled,clearable:!1,items:e,"model-value":n,"trigger-props":M.value,ui:{trigger:`w-fit`},"onUpdate:modelValue":a},null,8,[`size`,`disabled`,`items`,`model-value`,`trigger-props`,`onUpdate:modelValue`]),u(i,{size:F.value,disabled:d.disabled,clearable:!1,items:t,"model-value":r,"trigger-props":N.value,ui:{popup:`max-h-72`,trigger:`w-fit`},"onUpdate:modelValue":o},null,8,[`size`,`disabled`,`items`,`model-value`,`trigger-props`,`onUpdate:modelValue`])]),key:`1`}]),1040))}});export{E as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{tv as e}from"tailwind-variants";const t=e({slots:{root:`inline-flex flex-col rounded-md border shadow-sm`,header:`flex items-center justify-between`,heading:`flex items-center justify-center font-medium`,prev
|
|
1
|
+
import{tv as e}from"tailwind-variants";const t=e({slots:{root:`inline-flex flex-col rounded-md border shadow-sm`,header:`flex items-center justify-between`,heading:`flex items-center justify-center font-medium`,prev:`rtl:rotate-180`,next:`rtl:rotate-180`,grid:`inline-table border-collapse`,gridHead:``,gridBody:``,gridRow:``,headCell:`rounded-md text-center font-normal text-muted-foreground`,cell:[`flex-1 text-center align-middle`,`focus-within:relative focus-within:z-20 [&:has([data-selected])]:rounded-md [&:has([data-selected])]:bg-accent`],cellTrigger:[`inline-flex items-center justify-center w-full h-full rounded-md transition-colors cursor-pointer`,`outline-none focus-visible:ring-3 focus-visible:ring-offset-background focus-visible:ring-ring focus-visible:ring-primary/30`,`data-[selected]:bg-primary data-[selected]:text-primary-foreground data-[selected]:font-medium`,`[&:not([data-selected]):hover]:bg-accent [&:not([data-selected]):hover]:text-accent-foreground`,`data-[disabled]:cursor-not-allowed data-[disabled]:text-muted-foreground data-[disabled]:opacity-50`,`[&[data-today]:not([data-selected])]:bg-accent [&[data-today]:not([data-selected])]:text-accent-foreground`,`data-[unavailable]:line-through data-[outside-view]:text-muted-foreground`]},variants:{size:{xs:{root:`gap-3 text-2xs p-2`,header:`gap-1.5`,gridRow:`mt-1.5`,heading:`gap-1.5`,headCell:`h-6 w-6 text-3xs`,cell:`h-6 w-6`},sm:{root:`gap-3.5 text-xs p-2.5`,header:`gap-2`,gridRow:`mt-1.75`,heading:`gap-2`,headCell:`h-7 w-7 text-2xs`,cell:`h-7 w-7`},md:{root:`gap-4 text-sm p-3`,header:`gap-2.5`,gridRow:`mt-2`,heading:`gap-2.5`,headCell:`h-8 w-8 text-xs`,cell:`h-8 w-8`},lg:{root:`gap-4.5 text-base p-3.5`,header:`gap-3`,gridRow:`mt-2.25`,heading:`gap-3`,headCell:`h-9 w-9 text-sm`,cell:`h-9 w-9`},xl:{root:`gap-5 text-lg p-4`,header:`gap-3.5`,gridRow:`mt-2.5`,heading:`gap-3.5`,headCell:`h-10 w-10 text-base`,cell:`h-10 w-10`},"2xl":{root:`gap-6 text-xl p-5`,header:`gap-4`,gridRow:`mt-3`,heading:`gap-4`,headCell:`h-12 w-12 text-lg`,cell:`h-12 w-12`}}},defaultVariants:{size:`md`}});export{t as calendarVariants};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{tv as e}from"tailwind-variants";const t=e({slots:{root:`inline-flex flex-col gap-4 p-3 text-sm`,header:`flex items-center justify-between`,heading:`flex items-center justify-center font-medium`,prev
|
|
1
|
+
import{tv as e}from"tailwind-variants";const t=e({slots:{root:`inline-flex flex-col gap-4 p-3 text-sm`,header:`flex items-center justify-between`,heading:`flex items-center justify-center font-medium`,prev:`rtl:rotate-180`,next:`rtl:rotate-180`,grid:`inline-table border-collapse`,gridHead:``,gridBody:``,gridRow:``,headCell:`rounded-md text-center font-normal text-muted-foreground`,cell:[`flex-1 text-center align-middle focus-within:relative focus-within:z-20`,`[&:has([data-selected])]:bg-accent first:[&:has([data-selected])]:rounded-s-md last:[&:has([data-selected])]:rounded-e-md`,`[&:has([data-selection-end])]:rounded-e-md [&:has([data-selection-start])]:rounded-s-md`],cellTrigger:[`inline-flex cursor-pointer items-center justify-center w-full h-full rounded-md font-normal transition-colors`,`focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-offset-background focus-visible:ring-ring focus-visible:ring-primary/30`,`[&[data-today]:not([data-selected])]:bg-accent [&[data-today]:not([data-selected])]:text-accent-foreground`,`data-[selected]:text-foreground`,`data-[selection-start]:bg-primary data-[selection-start]:text-primary-foreground`,`data-[selection-end]:bg-primary data-[selection-end]:text-primary-foreground`,`[&[data-selection-start]:hover]:bg-primary data-[selection-start]:hover:text-primary-foreground data-[selection-start]:focus-visible:bg-primary data-[selection-start]:focus-visible:text-primary-foreground`,`[&[data-selection-end]:hover]:bg-primary data-[selection-end]:hover:text-primary-foreground data-[selection-end]:focus-visible:bg-primary data-[selection-end]:focus-visible:text-primary-foreground`,`data-[highlighted]:bg-accent/80 data-[highlighted]:text-foreground`,`hover:bg-accent hover:text-accent-foreground data-[outside-view]:text-muted-foreground`,`data-[disabled]:pointer-events-none data-[disabled]:text-muted-foreground data-[disabled]:opacity-50`,`data-[unavailable]:line-through`]},variants:{size:{xs:{root:`gap-3 text-2xs p-2`,header:`gap-1.5`,gridRow:`mt-1.5`,heading:`gap-1.5`,headCell:`h-6 w-6 text-3xs`,cell:`h-6 w-6`},sm:{root:`gap-3.5 text-xs p-2.5`,header:`gap-2`,gridRow:`mt-1.75`,heading:`gap-2`,headCell:`h-7 w-7 text-2xs`,cell:`h-7 w-7`},md:{root:`gap-4 text-sm p-3`,header:`gap-2.5`,gridRow:`mt-2`,heading:`gap-2.5`,headCell:`h-8 w-8 text-xs`,cell:`h-8 w-8`},lg:{root:`gap-4.5 text-base p-3.5`,header:`gap-3`,gridRow:`mt-2.25`,heading:`gap-3`,headCell:`h-9 w-9 text-sm`,cell:`h-9 w-9`},xl:{root:`gap-5 text-lg p-4`,header:`gap-3.5`,gridRow:`mt-2.5`,heading:`gap-3.5`,headCell:`h-10 w-10 text-base`,cell:`h-10 w-10`},"2xl":{root:`gap-6 text-xl p-5`,header:`gap-4`,gridRow:`mt-3`,heading:`gap-4`,headCell:`h-12 w-12 text-lg`,cell:`h-12 w-12`}}},defaultVariants:{size:`md`}});export{t as calendarRangeVariants};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{tv as e}from"tailwind-variants";const t=e({slots:{popup:``,content:`flex flex-col`,trigger:``,triggerSwatch:``,triggerValue:`min-w-0 flex-1 truncate text-
|
|
1
|
+
import{tv as e}from"tailwind-variants";const t=e({slots:{popup:``,content:`flex flex-col`,trigger:``,triggerSwatch:``,triggerValue:`min-w-0 flex-1 truncate text-start font-mono text-xs`,segment:``,area:``,sliderSwatch:`flex items-center`,sliderRoot:`flex-1`,swatch:``,fields:`grid grid-cols-[2fr_1fr]`,field:``,alphaField:``,swatchPicker:``},variants:{size:{xs:{popup:`p-1.5`,content:`w-45 gap-1.5`,area:`h-30`,sliderSwatch:`gap-1.5`,fields:`gap-1.5`,alphaField:`w-12`},sm:{popup:`p-1.75`,content:`w-52.5 gap-1.75`,area:`h-35`,sliderSwatch:`gap-1.75`,fields:`gap-1.75`,alphaField:`w-15`},md:{popup:`p-2`,content:`w-60 gap-2`,area:`h-40`,sliderSwatch:`gap-2`,fields:`gap-2`,alphaField:`w-16`},lg:{popup:`p-2.5`,content:`w-63.75 gap-2.5`,area:`h-42.5`,sliderSwatch:`gap-2.5`,fields:`gap-2.5`,alphaField:`w-18`},xl:{popup:`p-3`,content:`w-67.5 gap-3`,area:`h-45`,sliderSwatch:`gap-3`,fields:`gap-3`,alphaField:`w-20`},"2xl":{popup:`p-4`,content:`w-80 gap-4`,area:`h-50`,sliderSwatch:`gap-4`,fields:`gap-4`,alphaField:`w-25`}}},defaultVariants:{size:`md`}});export{t as colorPickerVariants};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{tv as e}from"tailwind-variants";const t=e({slots:{root:`flex w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground`,inputRoot:`group flex items-center border-b`,inputControl:`flex w-full rounded-md bg-transparent outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50`,inputIcon:`shrink-0 opacity-50`,inputClearable:`hidden group-hover:block size-1em cursor-pointer opacity-50 hover:opacity-100`,empty:`text-center`,list:`overflow-y-auto overflow-x-hidden`,group:`overflow-hidden text-foreground`,groupLabel:`flex items-center font-medium text-muted-foreground`,item:[`relative flex cursor-default select-none items-center rounded-sm outline-none`,`data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50`],itemLabel:``,itemIcon:`shrink-0`,separator:`h-px bg-border`,shortcut:`
|
|
1
|
+
import{tv as e}from"tailwind-variants";const t=e({slots:{root:`flex w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground`,inputRoot:`group flex items-center border-b`,inputControl:`flex w-full rounded-md bg-transparent outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50`,inputIcon:`shrink-0 opacity-50`,inputClearable:`hidden group-hover:block size-1em cursor-pointer opacity-50 hover:opacity-100`,empty:`text-center`,list:`overflow-y-auto overflow-x-hidden`,group:`overflow-hidden text-foreground`,groupLabel:`flex items-center font-medium text-muted-foreground`,item:[`relative flex cursor-default select-none items-center rounded-sm outline-none`,`data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50`],itemLabel:``,itemIcon:`shrink-0`,separator:`h-px bg-border`,shortcut:`ms-auto`},variants:{size:{xs:{root:`text-2xs`,inputRoot:`px-1.5 py-0.5`,inputControl:`h-6`,inputIcon:`me-1.5`,empty:`py-3`,list:`max-h-70 p-0.75`,groupLabel:`gap-1 p-1 text-3xs`,item:`gap-1 px-1 py-1`,separator:`-mx-1 my-0.75`},sm:{root:`text-xs`,inputRoot:`px-2 py-0.625`,inputControl:`h-7`,inputIcon:`me-1.75`,empty:`py-3.5`,list:`max-h-75 p-0.875`,groupLabel:`gap-1.25 p-1.25 text-2xs`,item:`gap-1.5 px-1.5 py-1`,separator:`-mx-1.5 my-1`},md:{root:`text-sm`,inputRoot:`px-2.5 py-0.75`,inputControl:`h-8`,inputIcon:`me-2`,empty:`py-4 text-sm`,list:`max-h-80 p-1`,groupLabel:`gap-1.75 p-1.75 text-xs`,item:`gap-2 px-2 py-1.5`,separator:`-mx-2 my-1`},lg:{root:`text-base`,inputRoot:`px-3.5 py-0.875`,inputControl:`h-9`,inputIcon:`me-2.5`,empty:`py-4.5`,list:`max-h-90 p-1.25`,groupLabel:`gap-2 p-2 text-sm`,item:`gap-2.5 px-2.5 py-1.5`,separator:`-mx-2.5 my-1.25`},xl:{root:`text-lg`,inputRoot:`px-4 py-1`,inputControl:`h-10`,inputIcon:`me-3`,empty:`py-5`,list:`max-h-100 p-1.5`,groupLabel:`gap-2.5 p-2.5 text-base`,item:`gap-3 px-3 py-2`,separator:`-mx-3 my-1.5`},"2xl":{root:`text-xl`,inputRoot:`px-4.5 py-1.25`,inputControl:`h-12`,inputIcon:`me-3.5`,empty:`py-6`,list:`max-h-115 p-1.75`,groupLabel:`gap-3 p-3 text-lg`,item:`gap-3.5 px-3.5 py-2.5`,separator:`-mx-3.5 my-2`}}},defaultVariants:{size:`md`}});export{t as commandVariants};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{themeSizes as e}from"../../constants/common.js";import t from"../dialog/dialog-provider.js";import n from"../progress/progress-provider.js";import r from"../toast/toast-provider.js";import{provideConfigProviderContext as i}from"./context.js";import a from"../icon/icon.js";import{createBlock as o,createCommentVNode as s,createTextVNode as c,createVNode as l,defineComponent as u,guardReactiveProps as d,h as f,mergeProps as p,normalizeProps as m,openBlock as h,renderSlot as g,toDisplayString as _,unref as v,watch as y,watchEffect as b,withCtx as x}from"vue";import{useOmitProps as S}from"@soybeanjs/headless/composables";import{useStorage as C}from"@vueuse/core";import{ConfigProvider as w}from"@soybeanjs/headless/config-provider";import{Primitive as T}from"@soybeanjs/headless/primitive";import{isClient as E,transformPropsToContext as D}from"@soybeanjs/headless/shared";import{createShadcnTheme as O}from"@soybeanjs/shadcn-theme";const k=u({name:`SConfigProvider`,__name:`config-provider`,props:{theme:{default:()=>({})},size:{default:`md`},iconify:{default:()=>({width:`1.25em`,height:`1.25em`})},progress:{},toast:{},customToast:{type:Boolean},dir:{
|
|
1
|
+
import{themeSizes as e}from"../../constants/common.js";import t from"../dialog/dialog-provider.js";import n from"../progress/progress-provider.js";import r from"../toast/toast-provider.js";import{provideConfigProviderContext as i}from"./context.js";import a from"../icon/icon.js";import{createBlock as o,createCommentVNode as s,createTextVNode as c,createVNode as l,defineComponent as u,guardReactiveProps as d,h as f,mergeProps as p,normalizeProps as m,openBlock as h,renderSlot as g,toDisplayString as _,unref as v,watch as y,watchEffect as b,withCtx as x}from"vue";import{useOmitProps as S}from"@soybeanjs/headless/composables";import{useStorage as C}from"@vueuse/core";import{ConfigProvider as w}from"@soybeanjs/headless/config-provider";import{Primitive as T}from"@soybeanjs/headless/primitive";import{isClient as E,transformPropsToContext as D}from"@soybeanjs/headless/shared";import{createShadcnTheme as O}from"@soybeanjs/shadcn-theme";const k=u({name:`SConfigProvider`,__name:`config-provider`,props:{theme:{default:()=>({})},size:{default:`md`},iconify:{default:()=>({width:`1.25em`,height:`1.25em`})},progress:{},toast:{},customToast:{type:Boolean},dir:{},locale:{},nonce:{},tooltip:{},nuxt:{type:Boolean},iconRender:{},messages:{}},setup(u){let k=u,A=S(k,[`iconRender`,`theme`,`size`,`iconify`,`progress`,`toast`,`customToast`]),j=k.iconRender??(e=>f(a,{icon:e}));i({...D(k),iconRender:j});let{getCss:M}=O(k.theme),N=()=>M(k.theme,k.theme.radius),P=C(`__SoybeanUI_themeVars`,N());function F(t){if(!E)return;document.documentElement.classList.add(`size-${t}`);let n=e.filter(e=>e!==t).map(e=>`size-${e}`);document.documentElement.classList.remove(...n)}return y(()=>k.size,e=>{F(e)},{immediate:!0,flush:`sync`}),b(()=>{P.value=N()}),(e,i)=>(h(),o(v(w),p(v(A),{"icon-render":v(j)}),{default:x(()=>[l(v(T),{id:`__SoybeanUI_themeVars`,as:`style`},{default:x(()=>[c(_(v(P)),1)]),_:1}),g(e.$slots,`default`),k.customToast?s(`v-if`,!0):(h(),o(r,m(p({key:0},k.toast)),null,16)),l(t),l(n,m(d(k.progress)),null,16)]),_:3},16,[`icon-render`]))}});export{k as default};
|
|
@@ -2,7 +2,6 @@ import { ThemeSize } from "../../theme/types.js";
|
|
|
2
2
|
import { ConfigProviderProps } from "./types.js";
|
|
3
3
|
import * as _$vue from "vue";
|
|
4
4
|
import * as _$_soybeanjs_shadcn_theme0 from "@soybeanjs/shadcn-theme";
|
|
5
|
-
import * as _$_soybeanjs_headless0 from "@soybeanjs/headless";
|
|
6
5
|
|
|
7
6
|
//#region src/components/config-provider/config-provider.vue.d.ts
|
|
8
7
|
declare var __VLS_14: {};
|
|
@@ -11,7 +10,6 @@ type __VLS_Slots = {} & {
|
|
|
11
10
|
};
|
|
12
11
|
declare const __VLS_base: _$vue.DefineComponent<ConfigProviderProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<ConfigProviderProps> & Readonly<{}>, {
|
|
13
12
|
size: ThemeSize;
|
|
14
|
-
dir: _$_soybeanjs_headless0.Direction;
|
|
15
13
|
theme: _$_soybeanjs_shadcn_theme0.ThemeOptions;
|
|
16
14
|
iconify: IconifyOptions;
|
|
17
15
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{mergeVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import t from"../calendar/calendar.js";import{dateFieldVariants as n}from"../date-field/variants.js";import{datePickerVariants as r}from"./variants.js";import{computed as i,createBlock as a,createVNode as o,defineComponent as s,mergeProps as c,openBlock as l,toHandlers as u,unref as d,withCtx as f}from"vue";import{useForwardListeners as p,useOmitProps as m}from"@soybeanjs/headless/composables";import{DatePickerCompact as h,provideDatePickerUi as g}from"@soybeanjs/headless/date-picker";const _=s({name:`SDatePicker`,__name:`date-picker`,props:{class:{type:[Boolean,null,String,Object,Array]},size:{},ui:{},calendarUi:{},dateFieldProps:{},placement:{},showArrow:{type:Boolean},triggerProps:{},portalProps:{},positionerProps:{},popupProps:{},arrowProps:{},closeProps:{},disabled:{type:Boolean},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean},modal:{type:Boolean},headerProps:{},headingProps:{},prevProps:{},nextProps:{},gridProps:{},gridHeadProps:{},gridBodyProps:{},gridRowProps:{},headCellProps:{},cellProps:{},cellTriggerProps:{},dir:{},locale:{},modelValue:{},defaultValue:{},multiple:{},placeholder:{},defaultPlaceholder:{},readonly:{type:Boolean},pagedNavigation:{type:Boolean},preventDeselect:{type:Boolean},weekStartsOn:{},weekdayFormat:{},calendarLabel:{},fixedWeeks:{type:Boolean},maxValue:{},minValue:{},numberOfMonths:{},initialFocus:{type:Boolean},isDateDisabled:{},isDateUnavailable:{},nextPage:{},prevPage:{},disableDaysOutsideCurrentView:{type:Boolean},asChild:{type:Boolean},as:{}},emits:[`update:open`,`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`,`update:modelValue`,`update:placeholder`],setup(s,{emit:_}){let v=s,y=_,b=m(v,[`class`,`size`,`ui`]),x=p(y);return g(i(()=>{let t=r({size:v.size}),i=n({size:v.size});return e(Object.assign(t,i),v.ui,{root:v.class})})),(e,n)=>(l(),a(d(h),c(d(b),u(d(x))),{default:f(({calendarProps:e,close:n,onUpdateModelValue:r,onUpdatePlaceholder:i})=>[o(t,c(e,{size:s.size,ui:s.calendarUi,"onUpdate:modelValue":e=>{r(e),n()},"onUpdate:placeholder":i}),null,16,[`size`,`ui`,`onUpdate:modelValue`,`onUpdate:placeholder`])]),_:1},16))}});export{_ as default};
|
|
1
|
+
import{mergeVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import t from"../calendar/calendar.js";import{dateFieldVariants as n}from"../date-field/variants.js";import{datePickerVariants as r}from"./variants.js";import{computed as i,createBlock as a,createVNode as o,defineComponent as s,mergeProps as c,openBlock as l,toHandlers as u,unref as d,withCtx as f}from"vue";import{useForwardListeners as p,useOmitProps as m}from"@soybeanjs/headless/composables";import{DatePickerCompact as h,provideDatePickerUi as g}from"@soybeanjs/headless/date-picker";const _=s({name:`SDatePicker`,__name:`date-picker`,props:{class:{type:[Boolean,null,String,Object,Array]},size:{},ui:{},calendarUi:{},dateFieldProps:{},placement:{},showArrow:{type:Boolean},triggerProps:{},portalProps:{},positionerProps:{},popupProps:{},arrowProps:{},closeProps:{},disabled:{type:Boolean},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean},modal:{type:Boolean},headerProps:{},headingProps:{},prevProps:{},nextProps:{},gridProps:{},gridHeadProps:{},gridBodyProps:{},gridRowProps:{},headCellProps:{},cellProps:{},cellTriggerProps:{},dir:{},locale:{},modelValue:{},defaultValue:{},multiple:{type:Boolean},placeholder:{},defaultPlaceholder:{},readonly:{type:Boolean},pagedNavigation:{type:Boolean},preventDeselect:{type:Boolean},weekStartsOn:{},weekdayFormat:{},calendarLabel:{},fixedWeeks:{type:Boolean},maxValue:{},minValue:{},numberOfMonths:{},initialFocus:{type:Boolean},isDateDisabled:{},isDateUnavailable:{},nextPage:{},prevPage:{},disableDaysOutsideCurrentView:{type:Boolean},asChild:{type:Boolean},as:{}},emits:[`update:open`,`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`,`update:modelValue`,`update:placeholder`],setup(s,{emit:_}){let v=s,y=_,b=m(v,[`class`,`size`,`ui`]),x=p(y);return g(i(()=>{let t=r({size:v.size}),i=n({size:v.size});return e(Object.assign(t,i),v.ui,{root:v.class})})),(e,n)=>(l(),a(d(h),c(d(b),u(d(x))),{default:f(({calendarProps:e,close:n,onUpdateModelValue:r,onUpdatePlaceholder:i})=>[o(t,c(e,{size:s.size,ui:s.calendarUi,"onUpdate:modelValue":e=>{r(e),n()},"onUpdate:placeholder":i}),null,16,[`size`,`ui`,`onUpdate:modelValue`,`onUpdate:placeholder`])]),_:1},16))}});export{_ as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{tv as e}from"tailwind-variants";const t=e({slots:{trigger:`
|
|
1
|
+
import{tv as e}from"tailwind-variants";const t=e({slots:{trigger:`ms-auto data-[state=open]:bg-accent/50 data-[state=open]:text-accent-foreground`,positioner:`w-max`,popup:[`w-auto rounded-md border bg-popover text-popover-foreground outline-none z-50 will-change-transform`,`data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,`data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95`,`data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`]},variants:{size:{xs:{popup:`text-2xs`},sm:{popup:`text-xs`},md:{popup:`text-sm`},lg:{popup:`text-base`},xl:{popup:`text-lg`},"2xl":{popup:`text-xl`}}},defaultVariants:{size:`md`}});export{t as datePickerVariants};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{mergeVariants as e}from"../../theme/shared.js";import{miniSizeMap as t}from"../../theme/config.js";import"../../theme/index.js";import{buttonIconVariants as n,buttonVariants as r}from"../button/variants.js";import{dialogVariants as i}from"./variants.js";import{computed as a,createBlock as o,createSlots as s,defineComponent as c,guardReactiveProps as l,mergeProps as u,normalizeProps as d,openBlock as f,renderList as p,renderSlot as m,toHandlers as h,unref as g,useSlots as _,withCtx as v}from"vue";import{useForwardListeners as y,useOmitProps as b}from"@soybeanjs/headless/composables";import{keysOf as x}from"@soybeanjs/utils";import{DialogCompact as S,provideDialogUi as C}from"@soybeanjs/headless/dialog";const w=c({name:`SDialog`,__name:`dialog`,props:{class:{type:[Boolean,null,String,Object,Array]},size:{},ui:{},title:{},description:{},icon:{},showClose:{type:Boolean,default:!0},pure:{type:Boolean},showCancel:{type:[String,Boolean]},cancelText:{},showConfirm:{type:Boolean},confirmText:{},triggerProps:{},overlayProps:{},portalProps:{},popupProps:{},headerProps:{},contentProps:{},footerProps:{},titleProps:{},descriptionProps:{},closeProps:{},cancelProps:{},confirmProps:{},isAlert:{type:Boolean},alertType:{},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean},modal:{type:Boolean,default:!0}},emits:[`update:open`,`click`,`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`,`close`,`confirm`,`cancel`],setup(c,{emit:w}){let T=c,E=w,D=_(),O=b(T,[`class`,`size`,`ui`]),k=y(E),A=a(()=>x(D));return C(a(()=>{let a=t[T.size??`md`];return e(Object.assign(i({size:T.size,pure:T.pure}),{$base:{cancel:r({variant:`pure`,size:a}),confirm:r({variant:`solid`,size:a}),close:n({size:a})}}),T.ui,{popup:T.class})})),(e,t)=>(f(),o(g(S),u(g(O),h(g(k))),s({_:2},[p(A.value,t=>({name:t,fn:v(n=>[m(e.$slots,t,d(l(n)))])}))]),1040))}});export{w as default};
|
|
1
|
+
import{mergeVariants as e}from"../../theme/shared.js";import{miniSizeMap as t}from"../../theme/config.js";import"../../theme/index.js";import{buttonIconVariants as n,buttonVariants as r}from"../button/variants.js";import{dialogVariants as i}from"./variants.js";import{computed as a,createBlock as o,createSlots as s,defineComponent as c,guardReactiveProps as l,mergeProps as u,normalizeProps as d,openBlock as f,renderList as p,renderSlot as m,toHandlers as h,unref as g,useSlots as _,withCtx as v}from"vue";import{useForwardListeners as y,useOmitProps as b}from"@soybeanjs/headless/composables";import{keysOf as x}from"@soybeanjs/utils";import{DialogCompact as S,provideDialogUi as C}from"@soybeanjs/headless/dialog";const w=c({name:`SDialog`,__name:`dialog`,props:{class:{type:[Boolean,null,String,Object,Array]},size:{},ui:{},title:{},description:{},icon:{},showClose:{type:Boolean,default:!0},pure:{type:Boolean},showCancel:{type:[String,Boolean]},cancelText:{},showConfirm:{type:Boolean},confirmText:{},triggerProps:{},overlayProps:{},portalProps:{},popupProps:{},headerProps:{},contentProps:{},footerProps:{},titleProps:{},descriptionProps:{},closeProps:{},cancelProps:{},confirmProps:{},dir:{},isAlert:{type:Boolean},alertType:{},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean},modal:{type:Boolean,default:!0}},emits:[`update:open`,`click`,`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`,`close`,`confirm`,`cancel`],setup(c,{emit:w}){let T=c,E=w,D=_(),O=b(T,[`class`,`size`,`ui`]),k=y(E),A=a(()=>x(D));return C(a(()=>{let a=t[T.size??`md`];return e(Object.assign(i({size:T.size,pure:T.pure}),{$base:{cancel:r({variant:`pure`,size:a}),confirm:r({variant:`solid`,size:a}),close:n({size:a})}}),T.ui,{popup:T.class})})),(e,t)=>(f(),o(g(S),u(g(O),h(g(k))),s({_:2},[p(A.value,t=>({name:t,fn:v(n=>[m(e.$slots,t,d(l(n)))])}))]),1040))}});export{w as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{tv as e}from"tailwind-variants";const t=e({slots:{overlay:[`fixed inset-0 z-50 bg-black/80`,`data-[state=open]:animate-in data-[state=open]:fade-in-0`,`data-[state=closed]:animate-out data-[state=closed]:fade-out-0`],popup:[`group fixed start-1/2 top-1/2 z-50 flex flex-col w-max lt-sm:min-w-full lt-sm:max-w-full border bg-background shadow-lg outline-none translate-x-
|
|
1
|
+
import{tv as e}from"tailwind-variants";const t=e({slots:{overlay:[`fixed inset-0 z-50 bg-black/80`,`data-[state=open]:animate-in data-[state=open]:fade-in-0`,`data-[state=closed]:animate-out data-[state=closed]:fade-out-0`],popup:[`group fixed start-1/2 top-1/2 z-50 flex flex-col w-max lt-sm:min-w-full lt-sm:max-w-full border bg-background shadow-lg outline-none duration-200 rounded-lg`,`-translate-x-1/2 -translate-y-1/2 [&[dir=rtl]]:translate-x-1/2`,`data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:slide-in-from-left-1/2`,`data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:slide-out-to-left-1/2`],header:`flex flex-col text-center sm:text-start`,title:`flex items-center font-semibold leading-none tracking-tight m-0`,icon:`group-data-[type=info]:text-info group-data-[type=success]:text-success group-data-[type=warning]:text-warning group-data-[type=error]:text-destructive`,description:`text-muted-foreground m-0`,close:`absolute`,content:`grow overflow-auto`,footer:`flex flex-col-reverse sm:flex-row sm:justify-end`,cancel:``,confirm:``},variants:{size:{xs:{popup:`gap-y-1.5 min-w-xs max-w-3xl px-2 py-1.5 text-2xs`,header:`gap-y-1.5`,title:`gap-x-1.5 text-xs`,description:`text-2xs`,close:`end-1.5 top-1.5`,footer:`gap-1.5`},sm:{popup:`gap-y-2 min-w-sm max-w-4xl px-3 py-2 text-xs`,header:`gap-y-2`,title:`gap-x-1.75 text-sm`,description:`text-xs`,close:`end-1.75 top-1.75`,footer:`gap-2`},md:{popup:`gap-y-3 min-w-md max-w-5xl px-4 py-3 text-sm`,header:`gap-y-3`,title:`gap-x-2 text-base`,description:`text-sm`,close:`end-2 top-2`,footer:`gap-3`},lg:{popup:`gap-y-4 min-w-lg max-w-6xl px-5 py-4 text-base`,header:`gap-y-4`,title:`gap-x-2.5 text-lg`,description:`text-base`,close:`end-2.5 top-2.5`,footer:`gap-4`},xl:{popup:`gap-y-5 min-w-xl max-w-7xl px-6 py-5 text-lg`,header:`gap-y-5`,title:`gap-x-3 text-xl`,description:`text-lg`,close:`end-3 top-3`,footer:`gap-5`},"2xl":{popup:`gap-y-6 min-w-2xl max-w-7xl px-7 py-6 text-xl`,header:`gap-y-6`,title:`gap-x-3.5 text-2xl`,description:`text-xl`,close:`end-4 top-4`,footer:`gap-6`}},pure:{true:{popup:`p-0 gap-0 border-none`}}},defaultVariants:{size:`md`}});export{t as dialogVariants};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{mergeVariants as e}from"../../theme/shared.js";import{miniSizeMap as t}from"../../theme/config.js";import"../../theme/index.js";import{buttonIconVariants as n,buttonVariants as r}from"../button/variants.js";import{dialogVariants as i}from"../dialog/variants.js";import{drawerVariants as a}from"./variants.js";import{computed as o,createBlock as s,createSlots as c,defineComponent as l,guardReactiveProps as u,mergeProps as d,normalizeProps as f,openBlock as p,renderList as m,renderSlot as h,toHandlers as g,unref as _,useSlots as v,withCtx as y}from"vue";import{useForwardListeners as b,useOmitProps as x}from"@soybeanjs/headless/composables";import{keysOf as S}from"@soybeanjs/utils";import{DialogCompact as C,provideDialogUi as w}from"@soybeanjs/headless/dialog";const T=l({name:`SDrawer`,__name:`drawer`,props:{side:{},class:{type:[Boolean,null,String,Object,Array]},size:{},ui:{},title:{},description:{},icon:{},showClose:{type:Boolean,default:!0},pure:{type:Boolean},showCancel:{type:[String,Boolean]},cancelText:{},showConfirm:{type:Boolean},confirmText:{},triggerProps:{},overlayProps:{},portalProps:{},popupProps:{},headerProps:{},contentProps:{},footerProps:{},titleProps:{},descriptionProps:{},closeProps:{},cancelProps:{},confirmProps:{},isAlert:{type:Boolean},alertType:{},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean},modal:{type:Boolean,default:!0}},emits:[`update:open`,`click`,`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`,`close`,`confirm`,`cancel`],setup(l,{emit:T}){let E=l,D=T,O=v(),k=x(E,[`class`,`size`,`ui`]),A=b(D),j=o(()=>S(O));return w(o(()=>{let o=t[E.size??`md`];return e(Object.assign(
|
|
1
|
+
import{mergeVariants as e}from"../../theme/shared.js";import{miniSizeMap as t}from"../../theme/config.js";import"../../theme/index.js";import{buttonIconVariants as n,buttonVariants as r}from"../button/variants.js";import{dialogVariants as i}from"../dialog/variants.js";import{drawerVariants as a}from"./variants.js";import{computed as o,createBlock as s,createSlots as c,defineComponent as l,guardReactiveProps as u,mergeProps as d,normalizeProps as f,openBlock as p,renderList as m,renderSlot as h,toHandlers as g,unref as _,useSlots as v,withCtx as y}from"vue";import{useForwardListeners as b,useOmitProps as x}from"@soybeanjs/headless/composables";import{keysOf as S}from"@soybeanjs/utils";import{DialogCompact as C,provideDialogUi as w}from"@soybeanjs/headless/dialog";const T=l({name:`SDrawer`,__name:`drawer`,props:{side:{},class:{type:[Boolean,null,String,Object,Array]},size:{},ui:{},title:{},description:{},icon:{},showClose:{type:Boolean,default:!0},pure:{type:Boolean},showCancel:{type:[String,Boolean]},cancelText:{},showConfirm:{type:Boolean},confirmText:{},triggerProps:{},overlayProps:{},portalProps:{},popupProps:{},headerProps:{},contentProps:{},footerProps:{},titleProps:{},descriptionProps:{},closeProps:{},cancelProps:{},confirmProps:{},dir:{},isAlert:{type:Boolean},alertType:{},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean},modal:{type:Boolean,default:!0}},emits:[`update:open`,`click`,`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`,`close`,`confirm`,`cancel`],setup(l,{emit:T}){let E=l,D=T,O=v(),k=x(E,[`class`,`size`,`ui`]),A=b(D),j=o(()=>S(O));return w(o(()=>{let o=t[E.size??`md`];return e(Object.assign(i({size:E.size,pure:E.pure}),a({size:E.size,side:E.side}),{$base:{cancel:r({variant:`pure`,size:o}),confirm:r({variant:`solid`,size:o}),close:n({size:o})}}),E.ui,{popup:E.class})})),(e,t)=>(p(),s(_(C),d(_(k),g(_(A))),c({_:2},[m(j.value,t=>({name:t,fn:y(n=>[h(e.$slots,t,f(u(n)))])}))]),1040))}});export{T as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{tv as e}from"tailwind-variants";const t=e({slots:{popup:[`fixed z-50 flex flex-col justify-between items-stretch border bg-background
|
|
1
|
+
import{tv as e}from"tailwind-variants";const t=e({slots:{popup:[`fixed z-50 flex flex-col justify-between items-stretch border bg-background outline-none transition ease-in-out`,`data-[state=open]:animate-in data-[state=open]:duration-500`,`data-[state=closed]:animate-out data-[state=closed]:duration-300`]},variants:{size:{xs:{popup:`gap-y-1.5 px-2 py-1.5 text-2xs`},sm:{popup:`gap-y-2 px-3 py-2 text-xs`},md:{popup:`gap-y-3 px-4 py-3 text-sm`},lg:{popup:`gap-y-4 px-5 py-4 text-base`},xl:{popup:`gap-y-5 px-6 py-5 text-lg`},"2xl":{popup:`gap-y-6 px-7 py-6 text-xl`}},side:{top:{popup:`inset-x-0 top-0 border-b rounded-b-md data-[state=open]:slide-in-from-top data-[state=closed]:slide-out-to-top`},bottom:{popup:`inset-x-0 bottom-0 border-t rounded-t-md data-[state=open]:slide-in-from-bottom data-[state=closed]:slide-out-to-bottom`},left:{popup:[`inset-y-0 start-0 h-full w-3/4 border-e rounded-e-md sm:max-w-sm`,`data-[state=open]:slide-in-from-left data-[state=closed]:slide-out-to-left`,`[&[dir=rtl]]:data-[state=open]:slide-in-from-right [&[dir=rtl]]:data-[state=closed]:slide-out-to-right`]},right:{popup:[`inset-y-0 end-0 h-full w-3/4 border-s rounded-s-md sm:max-w-sm`,`data-[state=open]:slide-in-from-right data-[state=closed]:slide-out-to-right`,`[&[dir=rtl]]:data-[state=open]:slide-in-from-left [&[dir=rtl]]:data-[state=closed]:slide-out-to-left`]}}},defaultVariants:{size:`md`,side:`right`}});export{t as drawerVariants};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{mergeVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import
|
|
1
|
+
import{mergeVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import{editableVariants as t}from"./variants.js";import{computed as n,createBlock as r,createSlots as i,defineComponent as a,guardReactiveProps as o,mergeProps as s,normalizeProps as c,openBlock as l,renderList as u,renderSlot as d,toHandlers as f,unref as p,useSlots as m,withCtx as h}from"vue";import{useForwardListeners as g,useOmitProps as _}from"@soybeanjs/headless/composables";import{keysOf as v}from"@soybeanjs/utils";import{EditableCompact as y,provideEditableUi as b}from"@soybeanjs/headless/editable";const x=a({name:`SEditable`,__name:`editable`,props:{class:{type:[Boolean,null,String,Object,Array]},size:{},ui:{},areaProps:{},previewProps:{},inputProps:{},editTriggerProps:{},submitTriggerProps:{},cancelTriggerProps:{},defaultValue:{},modelValue:{},placeholder:{},dir:{},disabled:{type:Boolean},readonly:{type:Boolean},activationMode:{},selectOnFocus:{type:Boolean},submitMode:{},startWithEditMode:{type:Boolean},maxLength:{},autoResize:{type:Boolean},id:{},name:{},required:{type:Boolean},asChild:{type:Boolean},as:{}},emits:[`update:modelValue`,`submit`,`update:state`],setup(a,{emit:x}){let S=a,C=x,w=m(),T=_(S,[`class`,`size`,`ui`]),E=g(C),D=n(()=>v(w));return b(n(()=>e(t({size:S.size}),S.ui,{root:S.class}))),(e,t)=>(l(),r(p(y),s(p(T),f(p(E))),i({_:2},[u(D.value,t=>({name:t,fn:h(n=>[d(e.$slots,t,c(o(n)))])}))]),1040))}});export{x as default};
|
|
@@ -1,70 +1,9 @@
|
|
|
1
|
-
import { EditableProps } from "./types.js";
|
|
1
|
+
import { EditableProps, EditableSlots } from "./types.js";
|
|
2
2
|
import * as _$vue from "vue";
|
|
3
3
|
import * as _$_soybeanjs_headless0 from "@soybeanjs/headless";
|
|
4
4
|
|
|
5
5
|
//#region src/components/editable/editable.vue.d.ts
|
|
6
|
-
|
|
7
|
-
modelValue: string;
|
|
8
|
-
inputValue: string;
|
|
9
|
-
isEditing: boolean;
|
|
10
|
-
isEmpty: boolean;
|
|
11
|
-
edit: () => void;
|
|
12
|
-
cancel: () => void;
|
|
13
|
-
submit: () => void;
|
|
14
|
-
}, __VLS_16: {
|
|
15
|
-
modelValue: string;
|
|
16
|
-
inputValue: string;
|
|
17
|
-
isEditing: boolean;
|
|
18
|
-
isEmpty: boolean;
|
|
19
|
-
edit: () => void;
|
|
20
|
-
cancel: () => void;
|
|
21
|
-
submit: () => void;
|
|
22
|
-
}, __VLS_23: {
|
|
23
|
-
modelValue: string;
|
|
24
|
-
inputValue: string;
|
|
25
|
-
isEditing: boolean;
|
|
26
|
-
isEmpty: boolean;
|
|
27
|
-
edit: () => void;
|
|
28
|
-
cancel: () => void;
|
|
29
|
-
submit: () => void;
|
|
30
|
-
}, __VLS_30: {
|
|
31
|
-
modelValue: string;
|
|
32
|
-
inputValue: string;
|
|
33
|
-
isEditing: boolean;
|
|
34
|
-
isEmpty: boolean;
|
|
35
|
-
edit: () => void;
|
|
36
|
-
cancel: () => void;
|
|
37
|
-
submit: () => void;
|
|
38
|
-
}, __VLS_43: {
|
|
39
|
-
modelValue: string;
|
|
40
|
-
inputValue: string;
|
|
41
|
-
isEditing: boolean;
|
|
42
|
-
isEmpty: boolean;
|
|
43
|
-
edit: () => void;
|
|
44
|
-
cancel: () => void;
|
|
45
|
-
submit: () => void;
|
|
46
|
-
}, __VLS_56: {
|
|
47
|
-
modelValue: string;
|
|
48
|
-
inputValue: string;
|
|
49
|
-
isEditing: boolean;
|
|
50
|
-
isEmpty: boolean;
|
|
51
|
-
edit: () => void;
|
|
52
|
-
cancel: () => void;
|
|
53
|
-
submit: () => void;
|
|
54
|
-
};
|
|
55
|
-
type __VLS_Slots = {} & {
|
|
56
|
-
default?: (props: typeof __VLS_8) => any;
|
|
57
|
-
} & {
|
|
58
|
-
preview?: (props: typeof __VLS_16) => any;
|
|
59
|
-
} & {
|
|
60
|
-
input?: (props: typeof __VLS_23) => any;
|
|
61
|
-
} & {
|
|
62
|
-
'edit-trigger'?: (props: typeof __VLS_30) => any;
|
|
63
|
-
} & {
|
|
64
|
-
'submit-trigger'?: (props: typeof __VLS_43) => any;
|
|
65
|
-
} & {
|
|
66
|
-
'cancel-trigger'?: (props: typeof __VLS_56) => any;
|
|
67
|
-
};
|
|
6
|
+
type __VLS_Slots = EditableSlots;
|
|
68
7
|
declare const __VLS_base: _$vue.DefineComponent<EditableProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
69
8
|
submit: (value: string) => any;
|
|
70
9
|
"update:modelValue": (value: string) => any;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { EditableEmits,
|
|
1
|
+
import { EditableEmits, EditableProps, EditableSlots } from "./types.js";
|
|
2
2
|
import { _default } from "./editable.vue.js";
|
|
3
3
|
export * from "@soybeanjs/headless/editable";
|
|
@@ -1,20 +1,12 @@
|
|
|
1
1
|
import { ThemeSize } from "../../theme/types.js";
|
|
2
|
-
import {
|
|
3
|
-
import { ClassValue
|
|
2
|
+
import { EditableCompactEmits, EditableCompactProps, EditableCompactSlots, EditableUi } from "@soybeanjs/headless/editable";
|
|
3
|
+
import { ClassValue } from "@soybeanjs/headless/types";
|
|
4
4
|
|
|
5
5
|
//#region src/components/editable/types.d.ts
|
|
6
|
-
/**
|
|
7
|
-
* Additional UI slots for the editable component.
|
|
8
|
-
*/
|
|
9
|
-
type EditableExtraUiSlot = 'controls';
|
|
10
|
-
/**
|
|
11
|
-
* Extended UI class overrides for the Editable component.
|
|
12
|
-
*/
|
|
13
|
-
type EditableExtendedUi = UiClass<EditableUiSlot | EditableExtraUiSlot>;
|
|
14
6
|
/**
|
|
15
7
|
* Properties for the Editable component.
|
|
16
8
|
*/
|
|
17
|
-
interface EditableProps extends
|
|
9
|
+
interface EditableProps extends EditableCompactProps {
|
|
18
10
|
/**
|
|
19
11
|
* Additional class names applied to the root element.
|
|
20
12
|
*/
|
|
@@ -26,35 +18,15 @@ interface EditableProps extends EditableRootProps {
|
|
|
26
18
|
/**
|
|
27
19
|
* Per-slot class overrides for the component.
|
|
28
20
|
*/
|
|
29
|
-
ui?: Partial<
|
|
30
|
-
/**
|
|
31
|
-
* Properties forwarded to the area element.
|
|
32
|
-
*/
|
|
33
|
-
areaProps?: EditableAreaProps;
|
|
34
|
-
/**
|
|
35
|
-
* Properties forwarded to the preview element.
|
|
36
|
-
*/
|
|
37
|
-
previewProps?: EditablePreviewProps;
|
|
38
|
-
/**
|
|
39
|
-
* Properties forwarded to the input element.
|
|
40
|
-
*/
|
|
41
|
-
inputProps?: EditableInputProps;
|
|
42
|
-
/**
|
|
43
|
-
* Properties forwarded to the edit trigger element.
|
|
44
|
-
*/
|
|
45
|
-
editTriggerProps?: EditableEditTriggerProps;
|
|
46
|
-
/**
|
|
47
|
-
* Properties forwarded to the submit trigger element.
|
|
48
|
-
*/
|
|
49
|
-
submitTriggerProps?: EditableSubmitTriggerProps;
|
|
50
|
-
/**
|
|
51
|
-
* Properties forwarded to the cancel trigger element.
|
|
52
|
-
*/
|
|
53
|
-
cancelTriggerProps?: EditableCancelTriggerProps;
|
|
21
|
+
ui?: Partial<EditableUi>;
|
|
54
22
|
}
|
|
55
23
|
/**
|
|
56
24
|
* Events for the Editable component.
|
|
57
25
|
*/
|
|
58
|
-
type EditableEmits =
|
|
26
|
+
type EditableEmits = EditableCompactEmits;
|
|
27
|
+
/**
|
|
28
|
+
* Slot properties for the Editable component.
|
|
29
|
+
*/
|
|
30
|
+
type EditableSlots = EditableCompactSlots;
|
|
59
31
|
//#endregion
|
|
60
|
-
export { EditableEmits,
|
|
32
|
+
export { EditableEmits, EditableProps, EditableSlots };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{tv as e}from"tailwind-variants";const t=e({slots:{root:`flex flex-col items-center justify-center min-w-0 grow rounded-md border border-dashed text-center`,header:`flex flex-col items-center max-w-sm text-center`,media:`flex shrink-0 items-center justify-center rounded-md bg-muted text-foreground`,title:`font-medium tracking-tight`,description:`leading-relaxed text-muted-foreground`,content:`flex w-full min-w-0 max-w-sm flex-col items-center`},variants:{size:{xs:{root:`text-2xs gap-3`,title:`text-xs`,header:`gap-1.5`,media:`
|
|
1
|
+
import{tv as e}from"tailwind-variants";const t=e({slots:{root:`flex flex-col items-center justify-center min-w-0 grow rounded-md border border-dashed text-center`,header:`flex flex-col items-center max-w-sm text-center`,media:`flex shrink-0 items-center justify-center rounded-md bg-muted text-foreground`,title:`font-medium tracking-tight`,description:`leading-relaxed text-muted-foreground`,content:`flex w-full min-w-0 max-w-sm flex-col items-center`},variants:{size:{xs:{root:`text-2xs gap-3`,title:`text-xs`,header:`gap-1.5`,media:`my-1.5`},sm:{root:`text-xs gap-3.5`,title:`text-sm`,header:`gap-1.75`,media:`my-1.75`},md:{root:`text-sm gap-4`,title:`text-base`,header:`gap-2`,media:`my-2 size-10`},lg:{root:`text-base gap-4.5`,title:`text-lg`,header:`gap-2.5`,media:`my-2.5`},xl:{root:`text-lg gap-5`,title:`text-xl`,header:`gap-3`,media:`my-3`},"2xl":{root:`text-xl gap-6`,title:`text-2xl`,header:`gap-3.5`,media:`my-3.5`}}},defaultVariants:{size:`md`}});export{t as emptyVariants};
|