@wizleap-inc/wiz-ui-next 1.14.2 → 1.16.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/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/use-breakpoint.d.ts +51 -0
- package/dist/wiz-ui.es.js +1966 -1929
- package/dist/wiz-ui.umd.js +13 -13
- package/package.json +1 -1
package/dist/hooks/index.d.ts
CHANGED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { PropType } from "vue";
|
|
2
|
+
declare const BREAKPOINTS: readonly ["sm", "md", "lg"];
|
|
3
|
+
/**
|
|
4
|
+
* @see {@link useBreakpoint}
|
|
5
|
+
* @example
|
|
6
|
+
* BreakpointVariantは、次の値のいずれかを取ります。
|
|
7
|
+
* - sm: max-width: 480px(30rem)
|
|
8
|
+
* - md: max-width: 768px(48rem)
|
|
9
|
+
* - lg: max-width: 1024px(64rem)
|
|
10
|
+
*
|
|
11
|
+
* この閾値は、BreakpointProviderを使用して、カスタマイズすることができます。
|
|
12
|
+
*/
|
|
13
|
+
export type BreakpointVariant = (typeof BREAKPOINTS)[number];
|
|
14
|
+
export type Breakpoint = Record<BreakpointVariant, number>;
|
|
15
|
+
/**
|
|
16
|
+
* @see {@link BreakpointVariant}
|
|
17
|
+
* @example
|
|
18
|
+
* # カスタマイズ
|
|
19
|
+
* `useBreakpoint`フックを使用して、一番近い親のprovideBreakpointの閾値を取得することができます。
|
|
20
|
+
* このフックは、`BreakpointVariant`のいずれかの値を返します。
|
|
21
|
+
* この戻り値は、`bp`という名前のPropsにそのまま渡すことができます。
|
|
22
|
+
*
|
|
23
|
+
* ```vue
|
|
24
|
+
* <template>
|
|
25
|
+
* <Timeline :bp="bp">
|
|
26
|
+
* </template>
|
|
27
|
+
*
|
|
28
|
+
* <script setup lang="ts">
|
|
29
|
+
* import { Timeline } from "wiz-ui";
|
|
30
|
+
* import { useBreakpoint } from '../hooks/use-breakpoint';
|
|
31
|
+
*
|
|
32
|
+
* // 一番近い親のprovideBreakpointの閾値を取得する(同じキーのprovideネストは子優先挙動をするため)
|
|
33
|
+
* const bp = useBreakpoint();
|
|
34
|
+
* </script>
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export declare const useBreakpoint: () => import("vue").Ref<"sm" | "md" | "lg">;
|
|
38
|
+
export declare const BreakpointProvider: import("vue").DefineComponent<{
|
|
39
|
+
bp: {
|
|
40
|
+
type: PropType<Breakpoint>;
|
|
41
|
+
required: true;
|
|
42
|
+
};
|
|
43
|
+
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
44
|
+
[key: string]: any;
|
|
45
|
+
}>[] | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
46
|
+
bp: {
|
|
47
|
+
type: PropType<Breakpoint>;
|
|
48
|
+
required: true;
|
|
49
|
+
};
|
|
50
|
+
}>>, {}>;
|
|
51
|
+
export {};
|