@operato/popup 8.0.0-beta.0 → 8.0.0-beta.2

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 CHANGED
@@ -3,6 +3,24 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [8.0.0-beta.2](https://github.com/hatiolab/operato/compare/v8.0.0-beta.1...v8.0.0-beta.2) (2025-01-08)
7
+
8
+
9
+ ### :bug: Bug Fix
10
+
11
+ * typo .npmignore ([d9c0c8c](https://github.com/hatiolab/operato/commit/d9c0c8c79abc688c3c2cfb6c37fcb689483a5977))
12
+
13
+
14
+
15
+ ## [8.0.0-beta.1](https://github.com/hatiolab/operato/compare/v8.0.0-beta.0...v8.0.0-beta.1) (2025-01-08)
16
+
17
+
18
+ ### :bug: Bug Fix
19
+
20
+ * missing .npmignore ([be05985](https://github.com/hatiolab/operato/commit/be05985abfae4af53501f718dd52932099f7fbcb))
21
+
22
+
23
+
6
24
  ## [8.0.0-beta.0](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.56...v8.0.0-beta.0) (2025-01-07)
7
25
 
8
26
  **Note:** Version bump only for package @operato/popup
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@operato/popup",
3
3
  "description": "Webcomponent popup following open-wc recommendations",
4
4
  "author": "heartyoh",
5
- "version": "8.0.0-beta.0",
5
+ "version": "8.0.0-beta.2",
6
6
  "main": "dist/src/index.js",
7
7
  "module": "dist/src/index.js",
8
8
  "exports": {
@@ -62,8 +62,8 @@
62
62
  },
63
63
  "dependencies": {
64
64
  "@material/web": "^2.0.0",
65
- "@operato/styles": "^8.0.0-beta.0",
66
- "@operato/utils": "^8.0.0-beta.0",
65
+ "@operato/styles": "^8.0.0-beta.2",
66
+ "@operato/utils": "^8.0.0-beta.2",
67
67
  "lit": "^3.1.2"
68
68
  },
69
69
  "devDependencies": {
@@ -100,5 +100,5 @@
100
100
  "prettier --write"
101
101
  ]
102
102
  },
103
- "gitHead": "c4e9cc245659d050a9ffd66542083a6daad4bcb9"
103
+ "gitHead": "ee1b5124995accb99272d3b5854f3df1d8746dda"
104
104
  }
package/.editorconfig DELETED
@@ -1,29 +0,0 @@
1
- # EditorConfig helps developers define and maintain consistent
2
- # coding styles between different editors and IDEs
3
- # editorconfig.org
4
-
5
- root = true
6
-
7
-
8
- [*]
9
-
10
- # Change these settings to your own preference
11
- indent_style = space
12
- indent_size = 2
13
-
14
- # We recommend you to keep these unchanged
15
- end_of_line = lf
16
- charset = utf-8
17
- trim_trailing_whitespace = true
18
- insert_final_newline = true
19
-
20
- [*.md]
21
- trim_trailing_whitespace = false
22
-
23
- [*.json]
24
- indent_size = 2
25
-
26
- [*.{html,js,md}]
27
- block_comment_start = /**
28
- block_comment = *
29
- block_comment_end = */
@@ -1,3 +0,0 @@
1
- module.exports = {
2
- stories: ['../dist/stories/**/*.stories.{js,md,mdx}'],
3
- };
@@ -1,52 +0,0 @@
1
- import { i18next } from '@operato/i18n'
2
-
3
- export const globalTypes = {
4
- locale: {
5
- name: 'Locale',
6
- description: 'Internationalization locale',
7
- toolbar: {
8
- icon: 'globe',
9
- items: [
10
- { value: 'en', right: '🇺🇸', title: 'English' },
11
- { value: 'ko', right: '🇰🇷', title: '한국어' },
12
- { value: 'zh', right: '🇨🇳', title: '中文' },
13
- { value: 'ja', right: '🇯🇵', title: '日本語' },
14
- { value: 'ms', right: '🇲🇾', title: 'Bahasa Melayu' }
15
- ],
16
- showName: true
17
- }
18
- },
19
- theme: {
20
- name: 'Theme',
21
- description: 'Global theme for components',
22
- toolbar: {
23
- icon: 'paintbrush',
24
- items: [
25
- { value: 'light', title: 'Light' },
26
- { value: 'dark', title: 'Dark' }
27
- ],
28
- showName: true
29
- }
30
- }
31
- }
32
-
33
- export const decorators = [
34
- (Story, context) => {
35
- const { locale, theme } = context.globals
36
-
37
- if (locale) {
38
- i18next.changeLanguage(locale)
39
- }
40
-
41
- // Set the theme class for the document
42
- if (theme === 'dark') {
43
- document.documentElement.classList.add('dark')
44
- document.documentElement.classList.remove('light')
45
- } else {
46
- document.documentElement.classList.add('light')
47
- document.documentElement.classList.remove('dark')
48
- }
49
-
50
- return Story()
51
- }
52
- ]
@@ -1,8 +0,0 @@
1
- import { storybookPlugin } from '@web/dev-server-storybook';
2
- import baseConfig from '../web-dev-server.config.mjs';
3
-
4
- export default /** @type {import('@web/dev-server').DevServerConfig} */ ({
5
- ...baseConfig,
6
- open: '/',
7
- plugins: [storybookPlugin({ type: 'web-components' }), ...baseConfig.plugins],
8
- });
package/demo/index.html DELETED
@@ -1,153 +0,0 @@
1
- <!doctype html>
2
- <html lang="en-GB">
3
- <head>
4
- <meta charset="utf-8" />
5
- <style>
6
- body {
7
- background: #fafafa;
8
- --ox-checkbox-size: 12px;
9
- }
10
-
11
- #demo {
12
- position: relative;
13
- height: 300px;
14
- background-color: lightgray;
15
- vertical-align: middle;
16
- }
17
- </style>
18
- <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" rel="stylesheet" />
19
- <link
20
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
21
- rel="stylesheet"
22
- />
23
- <link
24
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
25
- rel="stylesheet"
26
- />
27
- <link
28
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
29
- rel="stylesheet"
30
- />
31
- </head>
32
- <body>
33
- <div id="demo"></div>
34
-
35
- <script type="module">
36
- import { html, render } from 'lit'
37
- import '../dist/src/ox-popup-menu.js'
38
- import '../dist/src/ox-popup-menuitem.js'
39
- import '@material/web/icon/icon.js'
40
- import '@operato/input/ox-checkbox.js'
41
-
42
- import { OxPopupMenu } from '../dist/src/ox-popup-menu.js'
43
-
44
- const parent = document.querySelector('#demo')
45
-
46
- parent.addEventListener('click', function (e) {
47
- OxPopupMenu.open({
48
- template: html`
49
- <ox-popup-menuitem
50
- label="article - click me"
51
- @selected=${function (e) {
52
- console.log('first level article selected')
53
- }}
54
- >
55
- <md-icon slot="icon">article</md-icon>
56
- </ox-popup-menuitem>
57
-
58
- <ox-popup-menuitem label="home">
59
- <md-icon slot="icon">home</md-icon>
60
- </ox-popup-menuitem>
61
-
62
- <ox-popup-menuitem label="empty"> </ox-popup-menuitem>
63
-
64
- <ox-popup-menuitem
65
- label="click me to toggle"
66
- @selected=${function (e) {
67
- const icon = this.querySelector('md-icon')
68
- icon.innerHTML = icon.innerHTML == 'check' ? '' : 'check'
69
- }}
70
- alive-on-select
71
- >
72
- <md-icon slot="icon" style="width: 20px;height: 20px;"></md-icon>
73
- </ox-popup-menuitem>
74
-
75
- <ox-popup-menuitem label="verified" @selected=${e => console.log('selected verified')}>
76
- <md-icon slot="icon">verified</md-icon>
77
- <ox-popup-menu>
78
- <ox-popup-menuitem
79
- label="article"
80
- @selected=${function (e) {
81
- console.log('article selected')
82
- }}
83
- alive-on-select
84
- >
85
- <md-icon slot="icon">article</md-icon>
86
- </ox-popup-menuitem>
87
-
88
- <ox-popup-menuitem label="home">
89
- <md-icon slot="icon">home</md-icon>
90
- </ox-popup-menuitem>
91
-
92
- <ox-popup-menuitem label="verified">
93
- <md-icon slot="icon">verified</md-icon>
94
- <ox-popup-menu>
95
- <ox-popup-menuitem label="article">
96
- <md-icon slot="icon">article</md-icon>
97
- </ox-popup-menuitem>
98
-
99
- <ox-popup-menuitem label="home">
100
- <md-icon slot="icon">home</md-icon>
101
- </ox-popup-menuitem>
102
-
103
- <ox-popup-menuitem label="verified">
104
- <md-icon slot="icon">verified</md-icon>
105
- </ox-popup-menuitem>
106
-
107
- <ox-popup-menuitem label="checkbox">
108
- <input type="checkbox" slot="icon" />
109
- </ox-popup-menuitem>
110
-
111
- <div separator></div>
112
- </ox-popup-menu>
113
- </ox-popup-menuitem>
114
-
115
- <div separator></div>
116
-
117
- <ox-popup-menuitem label="checkbox">
118
- <input type="checkbox" slot="icon" />
119
- </ox-popup-menuitem>
120
- </ox-popup-menu>
121
- </ox-popup-menuitem>
122
-
123
- <ox-popup-menuitem label="checkbox in icon area" alive-on-select>
124
- <input type="checkbox" slot="icon" />
125
- </ox-popup-menuitem>
126
-
127
- <div separator></div>
128
-
129
- <div menu>Plain Text</div>
130
-
131
- <div menu alive-on-select>
132
- <ox-checkbox label="checkbox" slot="icon" checked />checkbox</ox-checkbox>
133
- </div>
134
-
135
- <div menu alive-on-select>
136
- <input id="checkbox-01" type="checkbox" />
137
- <label for="checkbox-01">custom menu</label>
138
- </div>
139
- <div menu alive-on-select>
140
- <label for="text-01">value</label>
141
- <input id="text-01" type="text" value="Plain text input" />
142
- </div>
143
- `,
144
- top: e.offsetY,
145
- left: e.offsetX,
146
- parent
147
- })
148
- })
149
-
150
- render(html`clike anywhere in this box to popup mini.`, parent)
151
- </script>
152
- </body>
153
- </html>
@@ -1,93 +0,0 @@
1
- <!doctype html>
2
- <html lang="en-GB">
3
- <head>
4
- <meta charset="utf-8" />
5
- <style>
6
- body {
7
- background: #fafafa;
8
- --ox-checkbox-size: 12px;
9
- }
10
-
11
- #demo {
12
- position: relative;
13
- height: 1000px;
14
- background-color: lightgray;
15
- vertical-align: middle;
16
- }
17
-
18
- #demo-container {
19
- display: block;
20
- }
21
-
22
- #after-demo {
23
- height: 1px;
24
- background-color: darkgray;
25
- vertical-align: middle;
26
- }
27
- </style>
28
- <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" rel="stylesheet" />
29
- <link
30
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
31
- rel="stylesheet"
32
- />
33
- <link
34
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
35
- rel="stylesheet"
36
- />
37
- <link
38
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
39
- rel="stylesheet"
40
- />
41
- </head>
42
- <body>
43
- <div id="demo-container">
44
- <div id="demo"></div>
45
- </div>
46
- <div id="after-demo"></div>
47
-
48
- <script type="module">
49
- import { html, render } from 'lit'
50
- import '../dist/src/ox-popup-list.js'
51
- import '@material/web/icon/icon.js'
52
- import '@operato/input/ox-checkbox.js'
53
-
54
- import { OxPopupList } from '../dist/src/ox-popup-list.js'
55
-
56
- const parent = document.querySelector('#demo')
57
-
58
- parent.addEventListener('click', function (e) {
59
- const popupList = document.querySelector('#popup-list')
60
- popupList?.open({
61
- top: e.offsetY,
62
- left: e.offsetX,
63
- height: '200px'
64
- })
65
- })
66
-
67
- render(
68
- html`
69
- <span>clike anywhere in this box to ox-select.</span>
70
-
71
- <ox-popup-list id="popup-list" @select=${e => console.log('select', e.target)} multiple>
72
- <div option>Plain Text</div>
73
-
74
- <div option>
75
- <ox-checkbox label="checkbox" slot="icon" checked />checkbox</ox-checkbox>
76
- </div>
77
-
78
- <div option>
79
- <input id="checkbox-01" type="checkbox" />
80
- <label for="checkbox-01">custom option</label>
81
- </div>
82
-
83
- <div option>
84
- <label for="text-01">value</label>
85
- <input id="text-01" type="text" value="Plain text input" />
86
- </div>
87
- </ox-popup-list>
88
- `,
89
- parent
90
- )
91
- </script>
92
- </body>
93
- </html>
@@ -1,153 +0,0 @@
1
- <!doctype html>
2
- <html lang="en-GB">
3
- <head>
4
- <meta charset="utf-8" />
5
- <style>
6
- body {
7
- background: #fafafa;
8
- --ox-checkbox-size: 12px;
9
- }
10
-
11
- #demo {
12
- position: relative;
13
- height: 300px;
14
- background-color: lightgray;
15
- vertical-align: middle;
16
- }
17
- </style>
18
- <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" rel="stylesheet" />
19
- <link
20
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
21
- rel="stylesheet"
22
- />
23
- <link
24
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
25
- rel="stylesheet"
26
- />
27
- <link
28
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
29
- rel="stylesheet"
30
- />
31
- </head>
32
- <body>
33
- <div id="demo"></div>
34
-
35
- <script type="module">
36
- import { html, render } from 'lit'
37
- import '../dist/src/ox-popup-menu.js'
38
- import '../dist/src/ox-popup-menuitem.js'
39
- import '@material/web/icon/icon.js'
40
- import '@operato/input/ox-checkbox.js'
41
-
42
- import { OxPopupMenu } from '../dist/src/ox-popup-menu.js'
43
-
44
- const parent = document.querySelector('#demo')
45
-
46
- parent.addEventListener('click', function (e) {
47
- OxPopupMenu.open({
48
- template: html`
49
- <ox-popup-menuitem
50
- label="article - click me"
51
- @selected=${function (e) {
52
- console.log('first level article selected')
53
- }}
54
- >
55
- <md-icon slot="icon">article</md-icon>
56
- </ox-popup-menuitem>
57
-
58
- <ox-popup-menuitem label="home">
59
- <md-icon slot="icon">home</md-icon>
60
- </ox-popup-menuitem>
61
-
62
- <ox-popup-menuitem label="empty"> </ox-popup-menuitem>
63
-
64
- <ox-popup-menuitem
65
- label="click me to toggle"
66
- @selected=${function (e) {
67
- const icon = this.querySelector('md-icon')
68
- icon.innerHTML = icon.innerHTML == 'check' ? '' : 'check'
69
- }}
70
- alive-on-select
71
- >
72
- <md-icon slot="icon" style="width: 20px;height: 20px;"></md-icon>
73
- </ox-popup-menuitem>
74
-
75
- <ox-popup-menuitem label="verified" @selected=${e => console.log('selected verified')}>
76
- <md-icon slot="icon">verified</md-icon>
77
- <ox-popup-menu>
78
- <ox-popup-menuitem
79
- label="article"
80
- @selected=${function (e) {
81
- console.log('article selected')
82
- }}
83
- alive-on-select
84
- >
85
- <md-icon slot="icon">article</md-icon>
86
- </ox-popup-menuitem>
87
-
88
- <ox-popup-menuitem label="home">
89
- <md-icon slot="icon">home</md-icon>
90
- </ox-popup-menuitem>
91
-
92
- <ox-popup-menuitem label="verified">
93
- <md-icon slot="icon">verified</md-icon>
94
- <ox-popup-menu>
95
- <ox-popup-menuitem label="article">
96
- <md-icon slot="icon">article</md-icon>
97
- </ox-popup-menuitem>
98
-
99
- <ox-popup-menuitem label="home">
100
- <md-icon slot="icon">home</md-icon>
101
- </ox-popup-menuitem>
102
-
103
- <ox-popup-menuitem label="verified">
104
- <md-icon slot="icon">verified</md-icon>
105
- </ox-popup-menuitem>
106
-
107
- <ox-popup-menuitem label="checkbox">
108
- <input type="checkbox" slot="icon" />
109
- </ox-popup-menuitem>
110
-
111
- <div separator></div>
112
- </ox-popup-menu>
113
- </ox-popup-menuitem>
114
-
115
- <div separator></div>
116
-
117
- <ox-popup-menuitem label="checkbox">
118
- <input type="checkbox" slot="icon" />
119
- </ox-popup-menuitem>
120
- </ox-popup-menu>
121
- </ox-popup-menuitem>
122
-
123
- <ox-popup-menuitem label="checkbox in icon area" alive-on-select>
124
- <input type="checkbox" slot="icon" />
125
- </ox-popup-menuitem>
126
-
127
- <div separator></div>
128
-
129
- <div menu>Plain Text</div>
130
-
131
- <div menu alive-on-select>
132
- <ox-checkbox label="checkbox" slot="icon" checked />checkbox</ox-checkbox>
133
- </div>
134
-
135
- <div menu alive-on-select>
136
- <input id="checkbox-01" type="checkbox" />
137
- <label for="checkbox-01">custom menu</label>
138
- </div>
139
- <div menu alive-on-select>
140
- <label for="text-01">value</label>
141
- <input id="text-01" type="text" value="Plain text input" />
142
- </div>
143
- `,
144
- top: e.pageY,
145
- left: e.pageX,
146
- parent
147
- })
148
- })
149
-
150
- render(html`clike anywhere in this box to popup mini.`, parent)
151
- </script>
152
- </body>
153
- </html>