@clderystd/m3-ui 0.0.0-stage → 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/README.md CHANGED
@@ -1,3 +1,93 @@
1
- # Temporary Holding Version
1
+ # @clderystd/m3-ui
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ 云术工作室的 Material Design 3 组件库。18 个 M3 组件 + 结构令牌 + useModal / v-ripple / v-reveal,
4
+ 不依赖任何第三方 UI 组件库。
5
+
6
+ ## 关键约定
7
+
8
+ **配色由使用方注入。** 本包只带结构令牌(形状 / 字阶 / 海拔 / 动效 / 状态层),
9
+ 全部颜色走 `--md-sys-color-*` 这类语义变量。每个站点用自己的种子色生成配色表:
10
+
11
+ ```css
12
+ /* 使用方自己的 m3-color-tokens.css */
13
+ :root { --md-sys-color-primary: #0061a4; /* ... */ }
14
+ .dark { --md-sys-color-primary: #9ecaff; /* ... */ }
15
+ ```
16
+
17
+ 这样官方站的蓝色、scforge 的橙色可以共存,而组件代码只有一份。
18
+
19
+ **图标不绑定图标库。** `IconComponent` 就是 Vue 的 `Component`,
20
+ unplugin-icons 生成的、手写 SFC、其他图标库的都能传。包里只内联了三个自己要用的小图标
21
+ (check / close / expand-more)。
22
+
23
+ ## 使用
24
+
25
+ ```bash
26
+ pnpm add @clderystd/m3-ui --registry=https://npm.pkg.github.com
27
+ ```
28
+
29
+ ```ts
30
+ import { M3Button, M3Card, M3Dialog } from '@clderystd/m3-ui'
31
+ import '@clderystd/m3-ui/style.css' // 结构令牌 + 组件样式(不含配色)
32
+ ```
33
+
34
+ `style.css` 要在**站点自己的配色之前**引入,方便站点覆盖。
35
+
36
+ ## 组件
37
+
38
+ M3Avatar、M3Button、M3Card、M3Chip、M3Dialog、M3Divider、M3Fab、M3Icon、M3IconButton、
39
+ M3List、M3ListItem、M3Menu、M3MenuItem、M3SegmentedButton、M3Sheet、M3Switch、M3Tooltip、M3TopAppBar。
40
+
41
+ 另导出 `vRipple`、`vReveal`、`useModal`、`IconCheck`、`IconClose`、`IconExpandMore`。
42
+
43
+ ## 本地联调
44
+
45
+ 站点用 `file:../m3-ui` 引用本包。**注意 pnpm 的 `file:` 是复制语义,不是软链**:
46
+ 改了组件源码后必须
47
+
48
+ ```bash
49
+ pnpm build # 在 m3-ui 里重新构建
50
+ cd ../identity-ui && pnpm install # 让站点拿到新副本
51
+ ```
52
+
53
+ 只跑 `pnpm build` 而不 `pnpm install`,站点侧仍指向旧的 `dist` 副本
54
+ (实测两份 `m3-ui.css` 时间戳会差几分钟,改了也不生效)。
55
+
56
+ 正式接入时应改用发布后的版本号(`@clderystd/m3-ui@^0.1.0`),
57
+ 那时升级用 `pnpm update`,行为符合预期。
58
+
59
+ ## 开发
60
+
61
+ ```bash
62
+ pnpm build # 产出 dist/index.js + dist/m3-ui.css + dist/*.d.ts
63
+ pnpm typecheck
64
+ ```
65
+
66
+ 构建细节:
67
+
68
+ - `vue` 是 peerDependency,不打进产物;
69
+ - 类型由 `vite-plugin-dts` 生成后用 `scripts/flatten-dts.mjs` 摊平到 `dist/` 根
70
+ (**不要**开 `rollupTypes`,它会把 `.vue` 的类型全丢掉,产出空的 `index.d.ts`);
71
+ - CSS 独立成 `dist/m3-ui.css`,不在 JS 里自动注入。
72
+
73
+ ## 发布
74
+
75
+ 发布到 npm 公共 registry(registry.npmjs.org),包作用域是 `@cloudery`。
76
+
77
+ 1. 准备一个带 `read:packages` + `write:packages` 权限的 GitHub token(classic PAT 即可);
78
+ 2. 写进 `~/.npmrc`(**不要**提交到仓库):
79
+
80
+ ```
81
+ @cloudery:registry=https://npm.pkg.github.com
82
+ //npm.pkg.github.com/:_authToken=${NPM_TOKEN}
83
+ ```
84
+
85
+ 3. 设置环境变量后发布:
86
+
87
+ ```bash
88
+ $env:NPM_TOKEN = 'npm_xxx' # PowerShell
89
+ pnpm publish # 会先跑 prepublishOnly -> build
90
+ ```
91
+
92
+ `publishConfig.registry` 已固定到 GitHub Packages,`access: restricted`。
93
+ 改版本号用 `pnpm version patch|minor|major`(会自动打 tag)。
@@ -0,0 +1,20 @@
1
+ type __VLS_Props = {
2
+ src?: string;
3
+ /** Accessible name; also used to derive fallback initials. */
4
+ name?: string;
5
+ alt?: string;
6
+ /** Diameter in px or any CSS length. */
7
+ size?: number | string;
8
+ /** Adds an outline ring, used for emphasis in member grids. */
9
+ ring?: boolean;
10
+ };
11
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
12
+ src: string;
13
+ name: string;
14
+ alt: string;
15
+ size: number | string;
16
+ ring: boolean;
17
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
18
+ imageEl: HTMLImageElement;
19
+ }, HTMLSpanElement>;
20
+ export default _default;
@@ -0,0 +1,57 @@
1
+ import { IconComponent } from '../icons';
2
+ type ButtonVariant = 'filled' | 'tonal' | 'elevated' | 'outlined' | 'text';
3
+ type ButtonSize = 'sm' | 'md' | 'lg';
4
+ type __VLS_Props = {
5
+ /** MD3 button emphasis level. */
6
+ variant?: ButtonVariant;
7
+ /** MD3 button height: 32dp / 40dp / 56dp (extra large). */
8
+ size?: ButtonSize;
9
+ /** Optional leading icon. */
10
+ icon?: IconComponent | null;
11
+ /** Optional trailing icon. */
12
+ trailingIcon?: IconComponent | null;
13
+ disabled?: boolean;
14
+ /**
15
+ * Busy state: disables interaction and swaps the leading slot for a spinner while the
16
+ * label keeps its width, so the button never resizes mid-request.
17
+ * (Extension over the upstream copy — the identity flows submit over the network.)
18
+ */
19
+ loading?: boolean;
20
+ /** Renders an anchor instead of a button. */
21
+ href?: string;
22
+ target?: string;
23
+ rel?: string;
24
+ /** Native button type; ignored when href is set. */
25
+ type?: 'button' | 'submit' | 'reset';
26
+ /** Stretch to the container width. */
27
+ block?: boolean;
28
+ };
29
+ declare function __VLS_template(): {
30
+ attrs: Partial<{}>;
31
+ slots: {
32
+ default?(_: {}): any;
33
+ };
34
+ refs: {};
35
+ rootEl: any;
36
+ };
37
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
38
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
39
+ size: ButtonSize;
40
+ type: "button" | "submit" | "reset";
41
+ loading: boolean;
42
+ icon: IconComponent | null;
43
+ variant: ButtonVariant;
44
+ trailingIcon: IconComponent | null;
45
+ disabled: boolean;
46
+ href: string;
47
+ target: string;
48
+ rel: string;
49
+ block: boolean;
50
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
51
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
52
+ export default _default;
53
+ type __VLS_WithTemplateSlots<T, S> = T & {
54
+ new (): {
55
+ $slots: S;
56
+ };
57
+ };
@@ -0,0 +1,37 @@
1
+ type __VLS_Props = {
2
+ /** MD3 card emphasis: elevated, filled or outlined. */
3
+ variant?: 'elevated' | 'filled' | 'outlined';
4
+ /** Adds hover/press elevation and pointer affordance. */
5
+ interactive?: boolean;
6
+ /** Corner radius override; 'large' matches the M3 card default of 12dp. */
7
+ shape?: 'medium' | 'large' | 'extra-large';
8
+ href?: string;
9
+ target?: string;
10
+ rel?: string;
11
+ };
12
+ declare function __VLS_template(): {
13
+ attrs: Partial<{}>;
14
+ slots: {
15
+ media?(_: {}): any;
16
+ default?(_: {}): any;
17
+ actions?(_: {}): any;
18
+ };
19
+ refs: {};
20
+ rootEl: any;
21
+ };
22
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
23
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
24
+ variant: "elevated" | "filled" | "outlined";
25
+ href: string;
26
+ target: string;
27
+ rel: string;
28
+ interactive: boolean;
29
+ shape: "medium" | "large" | "extra-large";
30
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
31
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
32
+ export default _default;
33
+ type __VLS_WithTemplateSlots<T, S> = T & {
34
+ new (): {
35
+ $slots: S;
36
+ };
37
+ };
@@ -0,0 +1,25 @@
1
+ import { IconComponent } from '../icons';
2
+ type __VLS_Props = {
3
+ /** Chip text. */
4
+ label: string;
5
+ /** MD3 chip type. */
6
+ variant?: 'assist' | 'filter' | 'input';
7
+ /** Filter chips toggle; selected chips get the checkmark and a tonal container. */
8
+ selected?: boolean;
9
+ icon?: IconComponent | null;
10
+ disabled?: boolean;
11
+ /** Render as a pressed toggle button (filter/input chips). */
12
+ toggle?: boolean;
13
+ };
14
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
15
+ remove: () => any;
16
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
17
+ onRemove?: (() => any) | undefined;
18
+ }>, {
19
+ toggle: boolean;
20
+ icon: IconComponent | null;
21
+ variant: "assist" | "filter" | "input";
22
+ disabled: boolean;
23
+ selected: boolean;
24
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLButtonElement>;
25
+ export default _default;
@@ -0,0 +1,41 @@
1
+ import { IconComponent } from '../icons';
2
+ type __VLS_Props = {
3
+ modelValue: boolean;
4
+ title?: string;
5
+ /** Optional hero icon above the headline (MD3 "icon" dialog). */
6
+ icon?: IconComponent | null;
7
+ /** Allow dismissal by scrim click or Escape. */
8
+ dismissible?: boolean;
9
+ ariaLabel?: string;
10
+ };
11
+ declare function __VLS_template(): {
12
+ attrs: Partial<{}>;
13
+ slots: {
14
+ default?(_: {}): any;
15
+ actions?(_: {}): any;
16
+ };
17
+ refs: {
18
+ panelRef: HTMLDivElement;
19
+ };
20
+ rootEl: any;
21
+ };
22
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
23
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
24
+ "update:modelValue": (value: boolean) => any;
25
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
26
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
27
+ }>, {
28
+ title: string;
29
+ icon: IconComponent | null;
30
+ dismissible: boolean;
31
+ ariaLabel: string;
32
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
33
+ panelRef: HTMLDivElement;
34
+ }, any>;
35
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
36
+ export default _default;
37
+ type __VLS_WithTemplateSlots<T, S> = T & {
38
+ new (): {
39
+ $slots: S;
40
+ };
41
+ };
@@ -0,0 +1,10 @@
1
+ type __VLS_Props = {
2
+ /** MD3 divider inset: full-bleed, 16dp start inset, or 16dp both sides. */
3
+ inset?: 'none' | 'inset' | 'middle';
4
+ vertical?: boolean;
5
+ };
6
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
7
+ inset: "none" | "inset" | "middle";
8
+ vertical: boolean;
9
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLHRElement>;
10
+ export default _default;
@@ -0,0 +1,31 @@
1
+ import { IconComponent } from '../icons';
2
+ type FabVariant = 'surface' | 'primary' | 'secondary' | 'tertiary' | 'primary-container' | 'secondary-container' | 'tertiary-container';
3
+ type __VLS_Props = {
4
+ icon: IconComponent;
5
+ /** MD3 FAB size: 40dp small / 56dp regular / 96dp large. */
6
+ size?: 'sm' | 'md' | 'lg';
7
+ variant?: FabVariant;
8
+ /** Extended FAB: icon plus a text label. */
9
+ label?: string;
10
+ /** Pin to the bottom-end corner of the viewport. */
11
+ fixed?: boolean;
12
+ colored?: boolean;
13
+ href?: string;
14
+ target?: string;
15
+ rel?: string;
16
+ type?: 'button' | 'submit' | 'reset';
17
+ ariaLabel?: string;
18
+ };
19
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
20
+ size: "sm" | "md" | "lg";
21
+ fixed: boolean;
22
+ type: "button" | "submit" | "reset";
23
+ label: string;
24
+ variant: FabVariant;
25
+ href: string;
26
+ target: string;
27
+ rel: string;
28
+ ariaLabel: string;
29
+ colored: boolean;
30
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
31
+ export default _default;
@@ -0,0 +1,30 @@
1
+ import { IconComponent } from '../icons';
2
+ type __VLS_Props = {
3
+ /** 任何渲染成 <svg> 的 Vue 组件;不限定图标库。 */
4
+ icon?: IconComponent | null;
5
+ /** Rendered size in px (or any CSS length). MD3 default glyph size is 24dp. */
6
+ size?: number | string;
7
+ /** Accessible name. When omitted the icon is decorative and hidden from AT. */
8
+ label?: string;
9
+ };
10
+ declare function __VLS_template(): {
11
+ attrs: Partial<{}>;
12
+ slots: {
13
+ default?(_: {}): any;
14
+ };
15
+ refs: {};
16
+ rootEl: HTMLSpanElement;
17
+ };
18
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
19
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
20
+ size: number | string;
21
+ label: string;
22
+ icon: IconComponent | null;
23
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLSpanElement>;
24
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
25
+ export default _default;
26
+ type __VLS_WithTemplateSlots<T, S> = T & {
27
+ new (): {
28
+ $slots: S;
29
+ };
30
+ };
@@ -0,0 +1,33 @@
1
+ import { IconComponent } from '../icons';
2
+ type IconButtonVariant = 'standard' | 'filled' | 'tonal' | 'outlined';
3
+ type IconButtonSize = 'sm' | 'md' | 'lg';
4
+ type __VLS_Props = {
5
+ icon: IconComponent;
6
+ /** Variant to use when the button is toggled on. Defaults to a filled emphasis. */
7
+ selectedIcon?: IconComponent | null;
8
+ variant?: IconButtonVariant;
9
+ size?: IconButtonSize;
10
+ /** Accessible name — required, since the button has no visible label. */
11
+ label: string;
12
+ selected?: boolean;
13
+ disabled?: boolean;
14
+ href?: string;
15
+ target?: string;
16
+ rel?: string;
17
+ type?: 'button' | 'submit' | 'reset';
18
+ /** Circular hit area is the default; 'square' is used for dense app bars. */
19
+ shape?: 'full' | 'small' | 'medium';
20
+ };
21
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
22
+ size: IconButtonSize;
23
+ type: "button" | "submit" | "reset";
24
+ variant: IconButtonVariant;
25
+ disabled: boolean;
26
+ href: string;
27
+ target: string;
28
+ rel: string;
29
+ shape: "full" | "small" | "medium";
30
+ selected: boolean;
31
+ selectedIcon: IconComponent | null;
32
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
33
+ export default _default;
@@ -0,0 +1,22 @@
1
+ type __VLS_Props = {
2
+ dense?: boolean;
3
+ };
4
+ declare function __VLS_template(): {
5
+ attrs: Partial<{}>;
6
+ slots: {
7
+ default?(_: {}): any;
8
+ };
9
+ refs: {};
10
+ rootEl: HTMLUListElement;
11
+ };
12
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
13
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
14
+ dense: boolean;
15
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLUListElement>;
16
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
17
+ export default _default;
18
+ type __VLS_WithTemplateSlots<T, S> = T & {
19
+ new (): {
20
+ $slots: S;
21
+ };
22
+ };
@@ -0,0 +1,52 @@
1
+ import { IconComponent } from '../icons';
2
+ type __VLS_Props = {
3
+ /** Primary text. Can also come from the default slot. */
4
+ headline?: string;
5
+ /** Secondary text under the headline. */
6
+ supporting?: string;
7
+ leadingIcon?: IconComponent | null;
8
+ /** Renders an anchor; the item becomes navigable. */
9
+ href?: string;
10
+ target?: string;
11
+ rel?: string;
12
+ /** Renders a button; the item becomes actionable. */
13
+ clickable?: boolean;
14
+ selected?: boolean;
15
+ disabled?: boolean;
16
+ /** MD3 list item height: one-line 56dp, two-line 72dp, three-line 88dp. */
17
+ lines?: 1 | 2 | 3;
18
+ /** Extra leading/trailing padding, used inside sheets. */
19
+ padded?: boolean;
20
+ };
21
+ declare function __VLS_template(): {
22
+ attrs: Partial<{}>;
23
+ slots: {
24
+ leading?(_: {}): any;
25
+ default?(_: {}): any;
26
+ supporting?(_: {}): any;
27
+ trailing?(_: {}): any;
28
+ };
29
+ refs: {};
30
+ rootEl: any;
31
+ };
32
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
33
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
34
+ disabled: boolean;
35
+ href: string;
36
+ target: string;
37
+ rel: string;
38
+ selected: boolean;
39
+ headline: string;
40
+ supporting: string;
41
+ leadingIcon: IconComponent | null;
42
+ clickable: boolean;
43
+ lines: 1 | 2 | 3;
44
+ padded: boolean;
45
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
46
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
47
+ export default _default;
48
+ type __VLS_WithTemplateSlots<T, S> = T & {
49
+ new (): {
50
+ $slots: S;
51
+ };
52
+ };
@@ -0,0 +1,61 @@
1
+ type __VLS_Props = {
2
+ /** Which edge of the trigger the panel aligns to. */
3
+ placement?: 'bottom-start' | 'bottom-end' | 'bottom';
4
+ /** Distance between trigger and panel. */
5
+ gap?: number;
6
+ minWidth?: number;
7
+ maxWidth?: number;
8
+ /** Stretch the panel to the trigger width (used by navigation panels). */
9
+ matchTriggerWidth?: boolean;
10
+ /** MD3 menus carry 8dp vertical padding; large navigation panels turn it off. */
11
+ padded?: boolean;
12
+ /** Close after activating an item inside the panel. */
13
+ closeOnSelect?: boolean;
14
+ /** Close on page scroll instead of tracking the trigger. */
15
+ closeOnScroll?: boolean;
16
+ };
17
+ declare function close(): void;
18
+ declare function toggle(): void;
19
+ declare function __VLS_template(): {
20
+ attrs: Partial<{}>;
21
+ slots: {
22
+ trigger?(_: {
23
+ open: boolean;
24
+ toggle: typeof toggle;
25
+ close: typeof close;
26
+ }): any;
27
+ default?(_: {
28
+ close: typeof close;
29
+ }): any;
30
+ };
31
+ refs: {
32
+ anchorRef: HTMLSpanElement;
33
+ panelRef: HTMLDivElement;
34
+ };
35
+ rootEl: any;
36
+ };
37
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
38
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
39
+ open: import('vue').Ref<boolean, boolean>;
40
+ close: typeof close;
41
+ toggle: typeof toggle;
42
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
43
+ padded: boolean;
44
+ placement: "bottom-start" | "bottom-end" | "bottom";
45
+ gap: number;
46
+ minWidth: number;
47
+ maxWidth: number;
48
+ matchTriggerWidth: boolean;
49
+ closeOnSelect: boolean;
50
+ closeOnScroll: boolean;
51
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
52
+ anchorRef: HTMLSpanElement;
53
+ panelRef: HTMLDivElement;
54
+ }, any>;
55
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
56
+ export default _default;
57
+ type __VLS_WithTemplateSlots<T, S> = T & {
58
+ new (): {
59
+ $slots: S;
60
+ };
61
+ };
@@ -0,0 +1,39 @@
1
+ import { IconComponent } from '../icons';
2
+ type __VLS_Props = {
3
+ label?: string;
4
+ supporting?: string;
5
+ icon?: IconComponent | null;
6
+ trailingText?: string;
7
+ href?: string;
8
+ target?: string;
9
+ rel?: string;
10
+ disabled?: boolean;
11
+ selected?: boolean;
12
+ };
13
+ declare function __VLS_template(): {
14
+ attrs: Partial<{}>;
15
+ slots: {
16
+ default?(_: {}): any;
17
+ };
18
+ refs: {};
19
+ rootEl: any;
20
+ };
21
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
22
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
23
+ label: string;
24
+ icon: IconComponent | null;
25
+ disabled: boolean;
26
+ href: string;
27
+ target: string;
28
+ rel: string;
29
+ selected: boolean;
30
+ supporting: string;
31
+ trailingText: string;
32
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
33
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
34
+ export default _default;
35
+ type __VLS_WithTemplateSlots<T, S> = T & {
36
+ new (): {
37
+ $slots: S;
38
+ };
39
+ };
@@ -0,0 +1,23 @@
1
+ import { IconComponent } from '../icons';
2
+ export interface SegmentedOption {
3
+ value: string;
4
+ label: string;
5
+ icon?: IconComponent;
6
+ }
7
+ type __VLS_Props = {
8
+ options: SegmentedOption[];
9
+ /** Selected value (single-select). */
10
+ modelValue: string;
11
+ /** Full-width segments instead of content-width. */
12
+ block?: boolean;
13
+ ariaLabel?: string;
14
+ };
15
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
16
+ "update:modelValue": (value: string) => any;
17
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
18
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
19
+ }>, {
20
+ block: boolean;
21
+ ariaLabel: string;
22
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
23
+ export default _default;
@@ -0,0 +1,44 @@
1
+ type __VLS_Props = {
2
+ modelValue: boolean;
3
+ /** Edge the sheet is anchored to. */
4
+ side?: 'start' | 'end' | 'bottom';
5
+ /** Width (side sheets) or height (bottom sheet) as a CSS length. */
6
+ size?: string;
7
+ title?: string;
8
+ /** Skip the built-in header and render the whole panel through the default slot. */
9
+ bare?: boolean;
10
+ /** Hide the close button in the header. */
11
+ hideClose?: boolean;
12
+ };
13
+ declare function __VLS_template(): {
14
+ attrs: Partial<{}>;
15
+ slots: {
16
+ default?(_: {}): any;
17
+ footer?(_: {}): any;
18
+ };
19
+ refs: {
20
+ panelRef: HTMLDivElement;
21
+ };
22
+ rootEl: any;
23
+ };
24
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
25
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
26
+ "update:modelValue": (value: boolean) => any;
27
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
28
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
29
+ }>, {
30
+ size: string;
31
+ title: string;
32
+ side: "start" | "end" | "bottom";
33
+ bare: boolean;
34
+ hideClose: boolean;
35
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
36
+ panelRef: HTMLDivElement;
37
+ }, any>;
38
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
39
+ export default _default;
40
+ type __VLS_WithTemplateSlots<T, S> = T & {
41
+ new (): {
42
+ $slots: S;
43
+ };
44
+ };
@@ -0,0 +1,30 @@
1
+ type __VLS_Props = {
2
+ modelValue: boolean;
3
+ /** Accessible name — the visible label usually lives next to the switch. */
4
+ label?: string;
5
+ disabled?: boolean;
6
+ };
7
+ declare function __VLS_template(): {
8
+ attrs: Partial<{}>;
9
+ slots: {
10
+ 'on-icon'?(_: {}): any;
11
+ };
12
+ refs: {};
13
+ rootEl: HTMLButtonElement;
14
+ };
15
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
16
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
17
+ "update:modelValue": (value: boolean) => any;
18
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
19
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
20
+ }>, {
21
+ label: string;
22
+ disabled: boolean;
23
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLButtonElement>;
24
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
25
+ export default _default;
26
+ type __VLS_WithTemplateSlots<T, S> = T & {
27
+ new (): {
28
+ $slots: S;
29
+ };
30
+ };