@poppy-ui/vue 0.5.7-beta.0 → 0.5.7-beta.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/dist/public.d.ts +1 -0
- package/dist/public.d.ts.map +1 -1
- package/dist/public.es.js.map +1 -1
- package/dist/public.umd.js.map +1 -1
- package/package.json +6 -1
- package/src/components/actions/dropdown/Dropdown.story.vue +95 -84
- package/src/public.ts +1 -0
- package/src/style.css +0 -6
- /package/dist/{vue.css → style.css} +0 -0
package/dist/public.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { PoppyUi } from './plugin-vue';
|
|
2
2
|
export default PoppyUi;
|
|
3
3
|
export * from './components/actions/public.types';
|
|
4
|
+
export * from './components/data/public.types';
|
|
4
5
|
export * from './components/display/public.types';
|
|
5
6
|
export * from './components/feedback/public.types';
|
|
6
7
|
export * from './components/layout/public.types';
|
package/dist/public.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../src/public.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,eAAe,OAAO,CAAA;AACtB,cAAc,mCAAmC,CAAA;AACjD,cAAc,mCAAmC,CAAA;AACjD,cAAc,oCAAoC,CAAA;AAClD,cAAc,kCAAkC,CAAA;AAChD,cAAc,sCAAsC,CAAA;AACpD,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA"}
|
|
1
|
+
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../src/public.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,eAAe,OAAO,CAAA;AACtB,cAAc,mCAAmC,CAAA;AACjD,cAAc,gCAAgC,CAAA;AAC9C,cAAc,mCAAmC,CAAA;AACjD,cAAc,oCAAoC,CAAA;AAClD,cAAc,kCAAkC,CAAA;AAChD,cAAc,sCAAsC,CAAA;AACpD,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA"}
|
package/dist/public.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public.es.js","names":[],"sources":["../src/plugin-vue.ts","../src/public.ts"],"sourcesContent":["import type { App } from 'vue'\nimport { COMPONENT_SIZE, createComponentConfigKey } from './symbol'\nimport type { PoppyComponentConfig } from './types/config.type'\nimport type { ComponentSize } from './types/size.type'\n\ntype Plugin<T> = import('vue').Plugin<T>\n\ndeclare global {\n export interface Window {\n /**\n * Poppy UI plugin options for debugging purposes. This is only set if the `debug` option is enabled when installing the plugin.\n *\n * @since 0.0.0\n */\n __POPPY_UI_PLUGIN_OPTIONS__?: PluginOptions\n }\n}\n\nexport interface PluginOptions {\n /**\n * Default size for all components. This will be used as the default size for any component that doesn't have a specific size prop set. You can override this default size on a per-component basis by providing specific configurations in the `components` option or by passing the `size` prop directly to individual components.\n * @since 0.0.0\n */\n size?: ComponentSize\n\n /**\n * Component-specific default configurations. You can specify default props for each component here, which will be merged with the props passed directly to the component. This allows you to set global defaults for your components while still allowing individual instances to override them as needed.\n * @since 0.0.0\n */\n components?: Partial<PoppyComponentConfig>\n\n /**\n * Allows you to enable debug mode, which will log the plugin options to the console and expose them on the `window` object for easier debugging.\n * @since 0.0.0\n */\n debug?: true\n}\n\nexport const PoppyUi = {\n install(app: App, options: PluginOptions = {}) {\n app.provide(COMPONENT_SIZE, options?.size || 'md')\n\n for (const [componentName, componentConfig] of Object.entries(options?.components || {})) {\n const key = createComponentConfigKey(componentName as keyof PoppyComponentConfig)\n app.provide(key, componentConfig as never)\n }\n\n if (options?.debug) {\n window.__POPPY_UI_PLUGIN_OPTIONS__ = options\n console.log('Poppy UI Plugin Options:', options)\n }\n },\n} as Plugin<[PluginOptions?]>\n","import { PoppyUi } from './plugin-vue'\n\nexport default PoppyUi\nexport * from './components/actions/public.types'\nexport * from './components/display/public.types'\nexport * from './components/feedback/public.types'\nexport * from './components/layout/public.types'\nexport * from './components/navigation/public.types'\nexport type { PluginOptions } from './plugin-vue'\n"],"mappings":";;;ACEA,IAAA,IAAe,EDqCb,QAAQ,GAAU,IAAyB,CAAC,GAAG;CAC7C,EAAI,QAAQ,GAAgB,GAAS,QAAQ,IAAI;CAEjD,KAAK,IAAM,CAAC,GAAe,MAAoB,OAAO,QAAQ,GAAS,cAAc,CAAC,CAAC,GAAG;EACxF,IAAM,IAAM,EAAyB,CAA2C;EAChF,EAAI,QAAQ,GAAK,CAAwB;CAC3C;CAEA,AAAI,GAAS,UACX,OAAO,8BAA8B,GACrC,QAAQ,IAAI,4BAA4B,CAAO;AAEnD,ECjDa"}
|
|
1
|
+
{"version":3,"file":"public.es.js","names":[],"sources":["../src/plugin-vue.ts","../src/public.ts"],"sourcesContent":["import type { App } from 'vue'\nimport { COMPONENT_SIZE, createComponentConfigKey } from './symbol'\nimport type { PoppyComponentConfig } from './types/config.type'\nimport type { ComponentSize } from './types/size.type'\n\ntype Plugin<T> = import('vue').Plugin<T>\n\ndeclare global {\n export interface Window {\n /**\n * Poppy UI plugin options for debugging purposes. This is only set if the `debug` option is enabled when installing the plugin.\n *\n * @since 0.0.0\n */\n __POPPY_UI_PLUGIN_OPTIONS__?: PluginOptions\n }\n}\n\nexport interface PluginOptions {\n /**\n * Default size for all components. This will be used as the default size for any component that doesn't have a specific size prop set. You can override this default size on a per-component basis by providing specific configurations in the `components` option or by passing the `size` prop directly to individual components.\n * @since 0.0.0\n */\n size?: ComponentSize\n\n /**\n * Component-specific default configurations. You can specify default props for each component here, which will be merged with the props passed directly to the component. This allows you to set global defaults for your components while still allowing individual instances to override them as needed.\n * @since 0.0.0\n */\n components?: Partial<PoppyComponentConfig>\n\n /**\n * Allows you to enable debug mode, which will log the plugin options to the console and expose them on the `window` object for easier debugging.\n * @since 0.0.0\n */\n debug?: true\n}\n\nexport const PoppyUi = {\n install(app: App, options: PluginOptions = {}) {\n app.provide(COMPONENT_SIZE, options?.size || 'md')\n\n for (const [componentName, componentConfig] of Object.entries(options?.components || {})) {\n const key = createComponentConfigKey(componentName as keyof PoppyComponentConfig)\n app.provide(key, componentConfig as never)\n }\n\n if (options?.debug) {\n window.__POPPY_UI_PLUGIN_OPTIONS__ = options\n console.log('Poppy UI Plugin Options:', options)\n }\n },\n} as Plugin<[PluginOptions?]>\n","import { PoppyUi } from './plugin-vue'\n\nexport default PoppyUi\nexport * from './components/actions/public.types'\nexport * from './components/data/public.types'\nexport * from './components/display/public.types'\nexport * from './components/feedback/public.types'\nexport * from './components/layout/public.types'\nexport * from './components/navigation/public.types'\nexport type { PluginOptions } from './plugin-vue'\n"],"mappings":";;;ACEA,IAAA,IAAe,EDqCb,QAAQ,GAAU,IAAyB,CAAC,GAAG;CAC7C,EAAI,QAAQ,GAAgB,GAAS,QAAQ,IAAI;CAEjD,KAAK,IAAM,CAAC,GAAe,MAAoB,OAAO,QAAQ,GAAS,cAAc,CAAC,CAAC,GAAG;EACxF,IAAM,IAAM,EAAyB,CAA2C;EAChF,EAAI,QAAQ,GAAK,CAAwB;CAC3C;CAEA,AAAI,GAAS,UACX,OAAO,8BAA8B,GACrC,QAAQ,IAAI,4BAA4B,CAAO;AAEnD,ECjDa"}
|
package/dist/public.umd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public.umd.js","names":[],"sources":["../src/plugin-vue.ts","../src/public.ts"],"sourcesContent":["import type { App } from 'vue'\nimport { COMPONENT_SIZE, createComponentConfigKey } from './symbol'\nimport type { PoppyComponentConfig } from './types/config.type'\nimport type { ComponentSize } from './types/size.type'\n\ntype Plugin<T> = import('vue').Plugin<T>\n\ndeclare global {\n export interface Window {\n /**\n * Poppy UI plugin options for debugging purposes. This is only set if the `debug` option is enabled when installing the plugin.\n *\n * @since 0.0.0\n */\n __POPPY_UI_PLUGIN_OPTIONS__?: PluginOptions\n }\n}\n\nexport interface PluginOptions {\n /**\n * Default size for all components. This will be used as the default size for any component that doesn't have a specific size prop set. You can override this default size on a per-component basis by providing specific configurations in the `components` option or by passing the `size` prop directly to individual components.\n * @since 0.0.0\n */\n size?: ComponentSize\n\n /**\n * Component-specific default configurations. You can specify default props for each component here, which will be merged with the props passed directly to the component. This allows you to set global defaults for your components while still allowing individual instances to override them as needed.\n * @since 0.0.0\n */\n components?: Partial<PoppyComponentConfig>\n\n /**\n * Allows you to enable debug mode, which will log the plugin options to the console and expose them on the `window` object for easier debugging.\n * @since 0.0.0\n */\n debug?: true\n}\n\nexport const PoppyUi = {\n install(app: App, options: PluginOptions = {}) {\n app.provide(COMPONENT_SIZE, options?.size || 'md')\n\n for (const [componentName, componentConfig] of Object.entries(options?.components || {})) {\n const key = createComponentConfigKey(componentName as keyof PoppyComponentConfig)\n app.provide(key, componentConfig as never)\n }\n\n if (options?.debug) {\n window.__POPPY_UI_PLUGIN_OPTIONS__ = options\n console.log('Poppy UI Plugin Options:', options)\n }\n },\n} as Plugin<[PluginOptions?]>\n","import { PoppyUi } from './plugin-vue'\n\nexport default PoppyUi\nexport * from './components/actions/public.types'\nexport * from './components/display/public.types'\nexport * from './components/feedback/public.types'\nexport * from './components/layout/public.types'\nexport * from './components/navigation/public.types'\nexport type { PluginOptions } from './plugin-vue'\n"],"mappings":"wICEA,IAAA,EAAe,CDqCb,QAAQ,EAAU,EAAyB,CAAC,EAAG,CAC7C,EAAI,QAAQ,EAAA,EAAgB,GAAS,MAAQ,IAAI,EAEjD,IAAK,GAAM,CAAC,EAAe,KAAoB,OAAO,QAAQ,GAAS,YAAc,CAAC,CAAC,EAAG,CACxF,IAAM,EAAM,EAAA,EAAyB,CAA2C,EAChF,EAAI,QAAQ,EAAK,CAAwB,CAC3C,CAEI,GAAS,QACX,OAAO,4BAA8B,EACrC,QAAQ,IAAI,2BAA4B,CAAO,EAEnD,CCjDa"}
|
|
1
|
+
{"version":3,"file":"public.umd.js","names":[],"sources":["../src/plugin-vue.ts","../src/public.ts"],"sourcesContent":["import type { App } from 'vue'\nimport { COMPONENT_SIZE, createComponentConfigKey } from './symbol'\nimport type { PoppyComponentConfig } from './types/config.type'\nimport type { ComponentSize } from './types/size.type'\n\ntype Plugin<T> = import('vue').Plugin<T>\n\ndeclare global {\n export interface Window {\n /**\n * Poppy UI plugin options for debugging purposes. This is only set if the `debug` option is enabled when installing the plugin.\n *\n * @since 0.0.0\n */\n __POPPY_UI_PLUGIN_OPTIONS__?: PluginOptions\n }\n}\n\nexport interface PluginOptions {\n /**\n * Default size for all components. This will be used as the default size for any component that doesn't have a specific size prop set. You can override this default size on a per-component basis by providing specific configurations in the `components` option or by passing the `size` prop directly to individual components.\n * @since 0.0.0\n */\n size?: ComponentSize\n\n /**\n * Component-specific default configurations. You can specify default props for each component here, which will be merged with the props passed directly to the component. This allows you to set global defaults for your components while still allowing individual instances to override them as needed.\n * @since 0.0.0\n */\n components?: Partial<PoppyComponentConfig>\n\n /**\n * Allows you to enable debug mode, which will log the plugin options to the console and expose them on the `window` object for easier debugging.\n * @since 0.0.0\n */\n debug?: true\n}\n\nexport const PoppyUi = {\n install(app: App, options: PluginOptions = {}) {\n app.provide(COMPONENT_SIZE, options?.size || 'md')\n\n for (const [componentName, componentConfig] of Object.entries(options?.components || {})) {\n const key = createComponentConfigKey(componentName as keyof PoppyComponentConfig)\n app.provide(key, componentConfig as never)\n }\n\n if (options?.debug) {\n window.__POPPY_UI_PLUGIN_OPTIONS__ = options\n console.log('Poppy UI Plugin Options:', options)\n }\n },\n} as Plugin<[PluginOptions?]>\n","import { PoppyUi } from './plugin-vue'\n\nexport default PoppyUi\nexport * from './components/actions/public.types'\nexport * from './components/data/public.types'\nexport * from './components/display/public.types'\nexport * from './components/feedback/public.types'\nexport * from './components/layout/public.types'\nexport * from './components/navigation/public.types'\nexport type { PluginOptions } from './plugin-vue'\n"],"mappings":"wICEA,IAAA,EAAe,CDqCb,QAAQ,EAAU,EAAyB,CAAC,EAAG,CAC7C,EAAI,QAAQ,EAAA,EAAgB,GAAS,MAAQ,IAAI,EAEjD,IAAK,GAAM,CAAC,EAAe,KAAoB,OAAO,QAAQ,GAAS,YAAc,CAAC,CAAC,EAAG,CACxF,IAAM,EAAM,EAAA,EAAyB,CAA2C,EAChF,EAAI,QAAQ,EAAK,CAAwB,CAC3C,CAEI,GAAS,QACX,OAAO,4BAA8B,EACrC,QAAQ,IAAI,2BAA4B,CAAO,EAEnD,CCjDa"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@poppy-ui/vue",
|
|
3
|
-
"version": "0.5.7-beta.
|
|
3
|
+
"version": "0.5.7-beta.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"url": "git+https://github.com/CheeseGrinder/poppy-ui.git"
|
|
@@ -9,6 +9,10 @@
|
|
|
9
9
|
"dist",
|
|
10
10
|
"src"
|
|
11
11
|
],
|
|
12
|
+
"sideEffects": [
|
|
13
|
+
"*.css",
|
|
14
|
+
"dist/style.css"
|
|
15
|
+
],
|
|
12
16
|
"main": "./dist/public.umd.js",
|
|
13
17
|
"module": "./dist/public.es.js",
|
|
14
18
|
"types": "./dist/public.d.ts",
|
|
@@ -19,6 +23,7 @@
|
|
|
19
23
|
"import": "./dist/public.es.js",
|
|
20
24
|
"require": "./dist/public.umd.js"
|
|
21
25
|
},
|
|
26
|
+
"./style.css": "./dist/app.css",
|
|
22
27
|
"./components/actions": {
|
|
23
28
|
"source": "./src/components/actions/public.ts",
|
|
24
29
|
"types": "./dist/components/actions/public.d.ts",
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import Button from '@/components/actions/button/Button.vue'
|
|
3
|
+
import MenuItem from '@/components/navigation/menu/MenuItem.vue'
|
|
4
|
+
import { Menu } from '@/components/navigation/public.ts'
|
|
3
5
|
import { logEvent } from 'histoire/client'
|
|
4
6
|
import { reactive, useTemplateRef } from 'vue'
|
|
5
7
|
import Dropdown from './Dropdown.vue'
|
|
@@ -39,95 +41,99 @@ const dropdownExposeRef = useTemplateRef('dropdown-expose')
|
|
|
39
41
|
:trigger-action="state.triggerAction"
|
|
40
42
|
:debounce="state.debounce"
|
|
41
43
|
:open="state.open"
|
|
44
|
+
trigger-class="btn btn-primary"
|
|
42
45
|
@show="logEvent('show', $event)"
|
|
43
46
|
@hide="logEvent('hide', $event)"
|
|
44
47
|
>
|
|
45
48
|
<template #trigger>
|
|
46
49
|
Open menu
|
|
47
50
|
</template>
|
|
48
|
-
<
|
|
49
|
-
<
|
|
50
|
-
<
|
|
51
|
-
<
|
|
52
|
-
</
|
|
51
|
+
<Menu class="bg-base-100">
|
|
52
|
+
<MenuItem>Profil</MenuItem>
|
|
53
|
+
<MenuItem>Settings</MenuItem>
|
|
54
|
+
<MenuItem>Logout</MenuItem>
|
|
55
|
+
</Menu>
|
|
53
56
|
</Dropdown>
|
|
54
57
|
</textarea>
|
|
55
58
|
</template>
|
|
56
59
|
|
|
57
60
|
<Dropdown
|
|
58
61
|
v-bind="state"
|
|
62
|
+
trigger-class="btn btn-primary"
|
|
59
63
|
@show="logEvent('show', $event)"
|
|
60
64
|
@hide="logEvent('hide', $event)"
|
|
61
65
|
>
|
|
62
|
-
<template #trigger>
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
<
|
|
67
|
-
|
|
68
|
-
<li><a>Logout</a></li>
|
|
69
|
-
</ul>
|
|
66
|
+
<template #trigger>Open menu</template>
|
|
67
|
+
<Menu class="bg-base-100">
|
|
68
|
+
<MenuItem>Profil</MenuItem>
|
|
69
|
+
<MenuItem>Settings</MenuItem>
|
|
70
|
+
<MenuItem>Logout</MenuItem>
|
|
71
|
+
</Menu>
|
|
70
72
|
</Dropdown>
|
|
71
73
|
</Variant>
|
|
72
74
|
|
|
73
75
|
<Variant title="Sides">
|
|
74
|
-
<div class="dropdown-story dropdown-story--sides">
|
|
75
|
-
<Dropdown side="bottom">
|
|
76
|
-
<template #trigger
|
|
77
|
-
<
|
|
78
|
-
<
|
|
79
|
-
<
|
|
80
|
-
|
|
76
|
+
<div class="dropdown-story dropdown-story--sides pt-36 justify-center">
|
|
77
|
+
<Dropdown side="bottom" trigger-class="btn btn-primary">
|
|
78
|
+
<template #trigger>bottom</template>
|
|
79
|
+
<Menu class="bg-base-100">
|
|
80
|
+
<MenuItem>Item A</MenuItem>
|
|
81
|
+
<MenuItem>Item B</MenuItem>
|
|
82
|
+
<MenuItem>Item C</MenuItem>
|
|
83
|
+
</Menu>
|
|
81
84
|
</Dropdown>
|
|
82
|
-
<Dropdown side="top">
|
|
83
|
-
<template #trigger
|
|
84
|
-
<
|
|
85
|
-
<
|
|
86
|
-
<
|
|
87
|
-
|
|
85
|
+
<Dropdown side="top" trigger-class="btn btn-primary">
|
|
86
|
+
<template #trigger>top</template>
|
|
87
|
+
<Menu class="bg-base-100">
|
|
88
|
+
<MenuItem>Item A</MenuItem>
|
|
89
|
+
<MenuItem>Item B</MenuItem>
|
|
90
|
+
<MenuItem>Item C</MenuItem>
|
|
91
|
+
</Menu>
|
|
88
92
|
</Dropdown>
|
|
89
|
-
<Dropdown side="left">
|
|
90
|
-
<template #trigger
|
|
91
|
-
<
|
|
92
|
-
<
|
|
93
|
-
<
|
|
94
|
-
|
|
93
|
+
<Dropdown side="left" trigger-class="btn btn-primary">
|
|
94
|
+
<template #trigger>left</template>
|
|
95
|
+
<Menu class="bg-base-100">
|
|
96
|
+
<MenuItem>Item A</MenuItem>
|
|
97
|
+
<MenuItem>Item B</MenuItem>
|
|
98
|
+
<MenuItem>Item C</MenuItem>
|
|
99
|
+
</Menu>
|
|
95
100
|
</Dropdown>
|
|
96
|
-
<Dropdown side="right">
|
|
97
|
-
<template #trigger
|
|
98
|
-
<
|
|
99
|
-
<
|
|
100
|
-
<
|
|
101
|
-
|
|
101
|
+
<Dropdown side="right" trigger-class="btn btn-primary">
|
|
102
|
+
<template #trigger>right</template>
|
|
103
|
+
<Menu class="bg-base-100">
|
|
104
|
+
<MenuItem>Item A</MenuItem>
|
|
105
|
+
<MenuItem>Item B</MenuItem>
|
|
106
|
+
<MenuItem>Item C</MenuItem>
|
|
107
|
+
</Menu>
|
|
102
108
|
</Dropdown>
|
|
103
109
|
</div>
|
|
104
110
|
</Variant>
|
|
105
111
|
|
|
106
112
|
<Variant title="Align">
|
|
107
113
|
<div class="dropdown-story dropdown-story--align">
|
|
108
|
-
<Dropdown align="start">
|
|
109
|
-
<template #trigger
|
|
110
|
-
<
|
|
111
|
-
<
|
|
112
|
-
<
|
|
113
|
-
<
|
|
114
|
-
</
|
|
114
|
+
<Dropdown align="start" trigger-class="btn btn-primary">
|
|
115
|
+
<template #trigger>start</template>
|
|
116
|
+
<Menu class="bg-base-100">
|
|
117
|
+
<MenuItem>Item A</MenuItem>
|
|
118
|
+
<MenuItem>Item B</MenuItem>
|
|
119
|
+
<MenuItem>Item C</MenuItem>
|
|
120
|
+
</Menu>
|
|
115
121
|
</Dropdown>
|
|
116
|
-
<Dropdown align="center">
|
|
117
|
-
<template #trigger
|
|
118
|
-
<
|
|
119
|
-
<
|
|
120
|
-
<
|
|
121
|
-
<
|
|
122
|
-
</
|
|
122
|
+
<Dropdown align="center" trigger-class="btn btn-primary">
|
|
123
|
+
<template #trigger>center</template>
|
|
124
|
+
<Menu class="bg-base-100">
|
|
125
|
+
<MenuItem>Item A</MenuItem>
|
|
126
|
+
<MenuItem>Item B</MenuItem>
|
|
127
|
+
<MenuItem>Item C</MenuItem>
|
|
128
|
+
</Menu>
|
|
123
129
|
</Dropdown>
|
|
124
|
-
<Dropdown align="end">
|
|
125
|
-
<template #trigger
|
|
126
|
-
<
|
|
127
|
-
<
|
|
128
|
-
<
|
|
129
|
-
<
|
|
130
|
-
</
|
|
130
|
+
<Dropdown align="end" trigger-class="btn btn-primary">
|
|
131
|
+
<template #trigger>end</template>
|
|
132
|
+
<Menu class="bg-base-100">
|
|
133
|
+
<MenuItem>Item A</MenuItem>
|
|
134
|
+
<MenuItem>Item B</MenuItem>
|
|
135
|
+
<MenuItem>Item C</MenuItem>
|
|
136
|
+
</Menu>
|
|
131
137
|
</Dropdown>
|
|
132
138
|
</div>
|
|
133
139
|
</Variant>
|
|
@@ -136,32 +142,35 @@ const dropdownExposeRef = useTemplateRef('dropdown-expose')
|
|
|
136
142
|
<div class="dropdown-story dropdown-story--triggers">
|
|
137
143
|
<div class="dropdown-story--trigger-item">
|
|
138
144
|
<span class="dropdown-story--label">click (default)</span>
|
|
139
|
-
<Dropdown trigger-action="click">
|
|
145
|
+
<Dropdown trigger-action="click" trigger-class="btn btn-primary">
|
|
140
146
|
<template #trigger>Click me</template>
|
|
141
|
-
<
|
|
142
|
-
<
|
|
143
|
-
<
|
|
144
|
-
|
|
147
|
+
<Menu class="bg-base-100">
|
|
148
|
+
<MenuItem>Item A</MenuItem>
|
|
149
|
+
<MenuItem>Item B</MenuItem>
|
|
150
|
+
<MenuItem>Item C</MenuItem>
|
|
151
|
+
</Menu>
|
|
145
152
|
</Dropdown>
|
|
146
153
|
</div>
|
|
147
154
|
<div class="dropdown-story--trigger-item">
|
|
148
155
|
<span class="dropdown-story--label">hover</span>
|
|
149
|
-
<Dropdown trigger-action="hover">
|
|
156
|
+
<Dropdown trigger-action="hover" trigger-class="btn btn-primary">
|
|
150
157
|
<template #trigger>Hover me</template>
|
|
151
|
-
<
|
|
152
|
-
<
|
|
153
|
-
<
|
|
154
|
-
|
|
158
|
+
<Menu class="bg-base-100">
|
|
159
|
+
<MenuItem>Item A</MenuItem>
|
|
160
|
+
<MenuItem>Item B</MenuItem>
|
|
161
|
+
<MenuItem>Item C</MenuItem>
|
|
162
|
+
</Menu>
|
|
155
163
|
</Dropdown>
|
|
156
164
|
</div>
|
|
157
165
|
<div class="dropdown-story--trigger-item">
|
|
158
166
|
<span class="dropdown-story--label">context-menu</span>
|
|
159
|
-
<Dropdown trigger-action="context-menu">
|
|
167
|
+
<Dropdown trigger-action="context-menu" trigger-class="btn btn-primary">
|
|
160
168
|
<template #trigger>Right-click me</template>
|
|
161
|
-
<
|
|
162
|
-
<
|
|
163
|
-
<
|
|
164
|
-
|
|
169
|
+
<Menu class="bg-base-100">
|
|
170
|
+
<MenuItem>Item A</MenuItem>
|
|
171
|
+
<MenuItem>Item B</MenuItem>
|
|
172
|
+
<MenuItem>Item C</MenuItem>
|
|
173
|
+
</Menu>
|
|
165
174
|
</Dropdown>
|
|
166
175
|
</div>
|
|
167
176
|
</div>
|
|
@@ -169,29 +178,32 @@ const dropdownExposeRef = useTemplateRef('dropdown-expose')
|
|
|
169
178
|
|
|
170
179
|
<Variant title="Events">
|
|
171
180
|
<Dropdown
|
|
181
|
+
trigger-class="btn btn-primary"
|
|
172
182
|
@show="logEvent('show', $event)"
|
|
173
183
|
@hide="logEvent('hide', $event)"
|
|
174
184
|
>
|
|
175
185
|
<template #trigger>
|
|
176
186
|
Open — watch the event log
|
|
177
187
|
</template>
|
|
178
|
-
<
|
|
179
|
-
<
|
|
180
|
-
<
|
|
181
|
-
|
|
188
|
+
<Menu class="bg-base-100">
|
|
189
|
+
<MenuItem>Item A</MenuItem>
|
|
190
|
+
<MenuItem>Item B</MenuItem>
|
|
191
|
+
<MenuItem>Item C</MenuItem>
|
|
192
|
+
</Menu>
|
|
182
193
|
</Dropdown>
|
|
183
194
|
</Variant>
|
|
184
195
|
|
|
185
196
|
<Variant title="Expose — show / hide / toggle">
|
|
186
197
|
<div class="dropdown-story dropdown-story--expose">
|
|
187
|
-
<Dropdown ref="dropdown-expose">
|
|
198
|
+
<Dropdown ref="dropdown-expose" trigger-class="btn btn-primary">
|
|
188
199
|
<template #trigger>
|
|
189
200
|
Trigger (click)
|
|
190
201
|
</template>
|
|
191
|
-
<
|
|
192
|
-
<
|
|
193
|
-
<
|
|
194
|
-
|
|
202
|
+
<Menu class="bg-base-100">
|
|
203
|
+
<MenuItem>Item A</MenuItem>
|
|
204
|
+
<MenuItem>Item B</MenuItem>
|
|
205
|
+
<MenuItem>Item C</MenuItem>
|
|
206
|
+
</Menu>
|
|
195
207
|
</Dropdown>
|
|
196
208
|
<div class="dropdown-story--expose-actions">
|
|
197
209
|
<Button variant="outline" size="sm" @click="dropdownExposeRef?.show()">show()</Button>
|
|
@@ -200,7 +212,6 @@ const dropdownExposeRef = useTemplateRef('dropdown-expose')
|
|
|
200
212
|
</div>
|
|
201
213
|
</div>
|
|
202
214
|
</Variant>
|
|
203
|
-
|
|
204
215
|
</template>
|
|
205
216
|
</Story>
|
|
206
217
|
</template>
|
package/src/public.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { PoppyUi } from './plugin-vue'
|
|
|
2
2
|
|
|
3
3
|
export default PoppyUi
|
|
4
4
|
export * from './components/actions/public.types'
|
|
5
|
+
export * from './components/data/public.types'
|
|
5
6
|
export * from './components/display/public.types'
|
|
6
7
|
export * from './components/feedback/public.types'
|
|
7
8
|
export * from './components/layout/public.types'
|
package/src/style.css
DELETED
|
File without changes
|