@synopackageland/ui 0.9.12 → 0.10.1
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/CHANGELOG.md +14 -0
- package/README.md +12 -1
- package/dist/components/composite/wizard/Wizard.vue.d.ts +2 -2
- package/dist/components/containers/card/Card.vue.d.ts +1 -1
- package/dist/components/primitives/button/Button.vue.d.ts +7 -0
- package/dist/components/primitives/button/ButtonKindScope.vue.d.ts +17 -0
- package/dist/components/primitives/dialog/Dialog.vue.d.ts +5 -3
- package/dist/components/primitives/icon/FileTypeIcon.vue.d.ts +1 -1
- package/dist/components/primitives/surface/Surface.vue.d.ts +4 -0
- package/dist/composables/buttonKind.d.ts +9 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3929 -3887
- package/dist/json-preview/preview.js +3427 -3394
- package/dist/reka-runtime.json +1 -1
- package/dist/theme.css +1 -1
- package/dist/themes/dsm7-embedded-theme.css +1 -1
- package/dist/themes/dsm7-embedded.css +1 -1
- package/dist/themes/dsm7.css +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.10.1 (2026-10-16)
|
|
4
|
+
|
|
5
|
+
- Components follow measured DSM 7 metrics (see `docs/dsm-native-metrics.md`).
|
|
6
|
+
- `Button` takes `kind="tool" | "action"` (default `tool`): tool buttons are 28 px, 3 px radius, borderless grey; action buttons are pills with an 80 px minimum width (120 px for primary). Buttons inside `Dialog` and `Wizard` footers, `FormActions` and `Footbar` become `action` automatically.
|
|
7
|
+
- `Dialog` without `width` sizes to its content between 420 px and 760 px; `maxWidth` raises the cap. Header, body and footer use DSM sizes. A dialog with no title and no close button uses the message-box layout. `MessageBox` also sizes to content.
|
|
8
|
+
- Native scrollbars inside the UI root use the DSM style: thin, rounded, faint until hovered.
|
|
9
|
+
- `Surface` takes `variant="inset"` for a borderless grey block inside a card; the default border is subtler. `Card` titles are bold.
|
|
10
|
+
- `PageContent` spaces its direct children with `--ui-section-gap`, so pages need no hand-written margins.
|
|
11
|
+
- Radius tokens (`sm` 3, `md` 4, `lg` 5, `dialog` 8, `pill`) replace hard-coded values; menus and popovers use `md`, menu rows `sm`.
|
|
12
|
+
- On a phone-width DSM window a dialog is a bottom sheet as wide as the window, also when it sizes to its content.
|
|
13
|
+
- Visible changes for apps: footer buttons get wider, dialogs without `width` resize to content, and hand-written margins under `PageContent` add to the new gap.
|
|
14
|
+
|
|
15
|
+
繁中摘要:元件依實測 DSM 7 數值對齊。Button 分 tool(小圓角灰底)與 action(膠囊、最小寬 80/120px),Dialog/Wizard 頁尾等自動用 action;Dialog 未指定寬度時依內容在 420–760px 之間,`maxWidth` 可放寬;捲軸改 DSM 樣式;Surface 新增 inset 灰底區塊;Card 標題粗體;PageContent 自動段落間距;圓角統一為 token。手機寬度的 DSM 視窗中,Dialog(含依內容決定寬度者)以與視窗同寬的底部面板呈現。App 升級後頁尾按鈕變寬、Dialog 寬度隨內容、PageContent 下手寫 margin 會與新間距疊加。
|
|
16
|
+
|
|
3
17
|
## 0.9.12 (2026-10-16)
|
|
4
18
|
|
|
5
19
|
- Fix InfoTip first-click toggling inside AppRoot app modal scope when an ancestor focuses the trigger during pointerdown capture. Keyboard focus still opens the bubble; pointer clicks and adaptive touch toggle it once. AppRoot focus ownership and modal isolation remain intact.
|
package/README.md
CHANGED
|
@@ -257,7 +257,12 @@ const open = ref(false)
|
|
|
257
257
|
</template>
|
|
258
258
|
```
|
|
259
259
|
|
|
260
|
-
`width`
|
|
260
|
+
Without `width` the dialog sizes to its content between
|
|
261
|
+
`--ui-dialog-min-width` (420px) and `--ui-dialog-max-width` (760px, or the
|
|
262
|
+
`max-width` prop); a long paragraph wraps at the maximum. `width` sets a fixed
|
|
263
|
+
width, capped to the viewport. A dialog with no title and no close button is a
|
|
264
|
+
question and takes DSM's message-box layout. Buttons in the `footer` slot are
|
|
265
|
+
capsule `action` buttons (`kind="tool"` opts one out). `height` or
|
|
261
266
|
`min-height` (for example `min-height="420px"`) keeps a panel with little
|
|
262
267
|
content from collapsing. In a DSM window, `<AppRoot dialog-bounds="viewport">`
|
|
263
268
|
lets dialogs be dragged out of the window, within the browser viewport. See
|
|
@@ -318,6 +323,12 @@ import { AppLayout, Button, PageHeader } from '@synopackageland/ui'
|
|
|
318
323
|
|
|
319
324
|
`AppLayout` also accepts `sidebar`, `toolbar`, and `footer` slots.
|
|
320
325
|
|
|
326
|
+
`PageContent` stacks its direct children (a search row, a toolbar, cards) at
|
|
327
|
+
`--ui-section-gap`, so a page needs no margins between them.
|
|
328
|
+
|
|
329
|
+
To set a block apart inside a card, use `<Surface variant="inset">`. DSM draws it as a
|
|
330
|
+
faint grey block with no border of its own, at 12px × 16px padding.
|
|
331
|
+
|
|
321
332
|
## Theme override
|
|
322
333
|
|
|
323
334
|
Components use semantic CSS tokens. Import your override stylesheet after the library stylesheet to customize branding:
|
|
@@ -13,7 +13,7 @@ declare function toNextStep(): Promise<void>;
|
|
|
13
13
|
declare function toPreviousStep(): Promise<void>;
|
|
14
14
|
declare function finish(): Promise<void>;
|
|
15
15
|
declare function cancel(): void;
|
|
16
|
-
declare var __VLS_1: {},
|
|
16
|
+
declare var __VLS_1: {}, __VLS_9: {
|
|
17
17
|
nextStep: typeof toNextStep;
|
|
18
18
|
previousStep: typeof toPreviousStep;
|
|
19
19
|
finish: typeof finish;
|
|
@@ -25,7 +25,7 @@ declare var __VLS_1: {}, __VLS_3: {
|
|
|
25
25
|
type __VLS_Slots = {} & {
|
|
26
26
|
default?: (props: typeof __VLS_1) => any;
|
|
27
27
|
} & {
|
|
28
|
-
footer?: (props: typeof
|
|
28
|
+
footer?: (props: typeof __VLS_9) => any;
|
|
29
29
|
};
|
|
30
30
|
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {
|
|
31
31
|
activeStepKey: import('vue').ComputedRef<string>;
|
|
@@ -31,10 +31,10 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
31
31
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
32
32
|
"onUpdate:expanded"?: ((value: boolean) => any) | undefined;
|
|
33
33
|
}>, {
|
|
34
|
+
hasHeader: boolean;
|
|
34
35
|
expandable: boolean;
|
|
35
36
|
expanded: boolean;
|
|
36
37
|
layoutType: "regular" | "compact";
|
|
37
|
-
hasHeader: boolean;
|
|
38
38
|
footerAlign: "start" | "end" | "between";
|
|
39
39
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
40
40
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { ClickHandlers } from '../../../composables/pendingClick';
|
|
2
|
+
import { ButtonKind } from '../../../composables/buttonKind';
|
|
2
3
|
type ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'danger';
|
|
3
4
|
type ButtonSize = 'sm' | 'md' | 'lg';
|
|
4
5
|
type __VLS_Props = {
|
|
5
6
|
variant?: ButtonVariant;
|
|
6
7
|
size?: ButtonSize;
|
|
8
|
+
/**
|
|
9
|
+
* `tool` (toolbar and in-form commands) or `action` (a footer's capsule
|
|
10
|
+
* with a minimum width). Defaults to what the surrounding footer provides,
|
|
11
|
+
* else `tool`.
|
|
12
|
+
*/
|
|
13
|
+
kind?: ButtonKind;
|
|
7
14
|
loading?: boolean;
|
|
8
15
|
disabled?: boolean;
|
|
9
16
|
type?: 'button' | 'submit' | 'reset';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ButtonKind } from '../../../composables/buttonKind';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
kind: ButtonKind;
|
|
4
|
+
};
|
|
5
|
+
declare var __VLS_1: {};
|
|
6
|
+
type __VLS_Slots = {} & {
|
|
7
|
+
default?: (props: typeof __VLS_1) => any;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
11
|
+
declare const _default: typeof __VLS_export;
|
|
12
|
+
export default _default;
|
|
13
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
14
|
+
new (): {
|
|
15
|
+
$slots: S;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -3,7 +3,10 @@ type __VLS_Props = {
|
|
|
3
3
|
defaultOpen?: boolean;
|
|
4
4
|
title?: string;
|
|
5
5
|
description?: string;
|
|
6
|
+
/** A fixed width, capped to the viewport. Without it the dialog sizes to its content. */
|
|
6
7
|
width?: string;
|
|
8
|
+
/** The widest a content-sized dialog grows (default `--ui-dialog-max-width`). */
|
|
9
|
+
maxWidth?: string;
|
|
7
10
|
/** A fixed panel height, capped to the available height. */
|
|
8
11
|
height?: string;
|
|
9
12
|
/** Keeps the panel from shrinking with short content, capped to the available height. */
|
|
@@ -12,13 +15,13 @@ type __VLS_Props = {
|
|
|
12
15
|
/** Hides the header close affordance for fixed-flow dialogs that own their dismiss path. */
|
|
13
16
|
showClose?: boolean;
|
|
14
17
|
};
|
|
15
|
-
declare var __VLS_14: {}, __VLS_71: {},
|
|
18
|
+
declare var __VLS_14: {}, __VLS_71: {}, __VLS_79: {};
|
|
16
19
|
type __VLS_Slots = {} & {
|
|
17
20
|
trigger?: (props: typeof __VLS_14) => any;
|
|
18
21
|
} & {
|
|
19
22
|
default?: (props: typeof __VLS_71) => any;
|
|
20
23
|
} & {
|
|
21
|
-
footer?: (props: typeof
|
|
24
|
+
footer?: (props: typeof __VLS_79) => any;
|
|
22
25
|
};
|
|
23
26
|
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
24
27
|
escapeKeyDown: (event: KeyboardEvent) => any;
|
|
@@ -35,7 +38,6 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
35
38
|
onCloseAutoFocus?: ((event: Event) => any) | undefined;
|
|
36
39
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
37
40
|
}>, {
|
|
38
|
-
width: string;
|
|
39
41
|
defaultOpen: boolean;
|
|
40
42
|
open: boolean;
|
|
41
43
|
showClose: boolean;
|
|
@@ -9,9 +9,9 @@ type __VLS_Props = {
|
|
|
9
9
|
};
|
|
10
10
|
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
11
11
|
size: IconSize;
|
|
12
|
+
kind: "folder" | "file";
|
|
12
13
|
name: string;
|
|
13
14
|
open: boolean;
|
|
14
|
-
kind: "folder" | "file";
|
|
15
15
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
16
16
|
declare const _default: typeof __VLS_export;
|
|
17
17
|
export default _default;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
|
+
/** `'inset'` is a grey block inside a card, with no border of its own. */
|
|
3
|
+
variant?: 'default' | 'inset';
|
|
4
|
+
/** Defaults to `'md'`; an inset area defaults to DSM's 12px by 16px. */
|
|
2
5
|
padding?: 'none' | 'sm' | 'md' | 'lg';
|
|
3
6
|
border?: boolean;
|
|
4
7
|
raised?: boolean;
|
|
@@ -8,6 +11,7 @@ type __VLS_Slots = {} & {
|
|
|
8
11
|
default?: (props: typeof __VLS_1) => any;
|
|
9
12
|
};
|
|
10
13
|
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
14
|
+
variant: "default" | "inset";
|
|
11
15
|
padding: "none" | "sm" | "md" | "lg";
|
|
12
16
|
border: boolean;
|
|
13
17
|
raised: boolean;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DSM draws two button shapes: a `tool` button (toolbar, in-form commands) with
|
|
3
|
+
* the small control radius, and an `action` button (dialog, wizard and page
|
|
4
|
+
* footers) as a capsule with a minimum width.
|
|
5
|
+
*/
|
|
6
|
+
export type ButtonKind = 'tool' | 'action';
|
|
7
|
+
/** Makes `kind` the default for every Button rendered below the caller. */
|
|
8
|
+
export declare function provideButtonKind(kind: ButtonKind): void;
|
|
9
|
+
export declare function injectButtonKind(): ButtonKind;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { default as Button } from './components/primitives/button/Button.vue';
|
|
2
2
|
export { default as IconButton } from './components/primitives/button/IconButton.vue';
|
|
3
|
+
export type { ButtonKind } from './composables/buttonKind';
|
|
3
4
|
export { default as Input } from './components/primitives/input/Input.vue';
|
|
4
5
|
export { default as Textarea } from './components/primitives/input/Textarea.vue';
|
|
5
6
|
export { default as InputGroup } from './components/primitives/input-group/InputGroup.vue';
|