@neovici/cosmoz-queue 3.8.0 → 3.9.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.
@@ -1,3 +1,4 @@
1
+ import '@neovici/cosmoz-button';
1
2
  import type { Dialogable, Resolvable } from '@neovici/cosmoz-form';
2
3
  import { nothing } from 'lit-html';
3
4
  export declare const actionCount: <T>(items: T[], applicableItems?: T[]) => import("lit-html").TemplateResult<1> | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/actions/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAQ,OAAO,EAAE,MAAM,UAAU,CAAC;AAIzC,eAAO,MAAM,WAAW,GAAI,CAAC,EAAE,OAAO,CAAC,EAAE,EAAE,kBAAiB,CAAC,EAAU,qDASrE,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,SAAS,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;AAC3E,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,SAAS,MAAM,EAC1C,MAAM,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,KAC7B,IAAI,CAAC;AAEV,MAAM,WAAW,UAAU,CAC1B,KAAK,SAAS,MAAM,EACpB,KAAK,SAAS,UAAU,GAAG,WAAW,GAAG,WAAW;IAEpD,KAAK,EAAE,KAAK,EAAE,CAAC;IACf,IAAI,EAAE,KAAK,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,UAAU,CAAC,KAAK,SAAS,MAAM;IAC/C,KAAK,EAAE,KAAK,EAAE,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,MAAM,CAAC,KAAK,SAAS,MAAM,EAAE,OAAO,SA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AAC,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,KAC3D,UAAU,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;CACxD;AAED,eAAO,MAAM,aAAa,GACzB,KAAK,SAAS,MAAM,EACpB,OAAO,SAAS,MAAM,GAAG,MAAM,EAC/B,KAAK,SAAS,UAAU,GAAG,WAAW,GAAG,WAAW,EAEpD,MAAM,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,GAAG,UAAU,CAAC,KAAK,EAAE,KAAK,CAAC,0DAevD,CAAC;AAEF,eAAO,MAAM,MAAM,GAAI,KAAK,SAAS,MAAM,EAAE,OAAO,SAAS,MAAM,EAClE,QAAQ,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,2BACpB,CAAC;AAEZ,eAAO,MAAM,aAAa,GAExB,KAAK,SAAS,MAAM,EACpB,OAAO,SAAS,MAAM,GAAG,MAAM,EAC/B,KAAK,SAAS,UAAU,GAAG,WAAW,GAAG,WAAW,EAEpD,MAAM,UAAU,CAAC,KAAK,EAAE,KAAK,CAAC,MAE9B,SAAS,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,EAAE,cAK/B,CAAC"}
@@ -1,3 +1,4 @@
1
+ import '@neovici/cosmoz-button';
1
2
  import { html, nothing } from 'lit-html';
2
3
  import { ifDefined } from 'lit-html/directives/if-defined.js';
3
4
  import { when } from 'lit-html/directives/when.js';
@@ -8,15 +9,14 @@ export const defaultButton = (opts) => {
8
9
  const applicableItems = applicable ? items.filter(applicable) : items;
9
10
  if (!applicableItems.length)
10
11
  return nothing;
11
- return html `<button
12
- class="button"
12
+ return html `<cosmoz-button
13
13
  slot="${ifDefined(slot)}"
14
14
  title="${title}"
15
15
  data-priority="${ifDefined(opts.priority)}"
16
16
  @click=${() => open(dialog({ ...opts, items: applicableItems, title }))}
17
17
  >
18
18
  ${title} ${actionCount(items, applicableItems)}
19
- </button>`;
19
+ </cosmoz-button>`;
20
20
  };
21
21
  export const action = (action) => action;
22
22
  export const renderActions = (opts) => (actions) => actions.map((action) => {
@@ -1,9 +1,11 @@
1
+ import '@neovici/cosmoz-button';
1
2
  import '@neovici/cosmoz-spinner';
2
- export declare const style: string;
3
3
  export declare const renderLoadMore: ({ loading, data$, hasItems, onMore, }: {
4
4
  loading?: boolean;
5
5
  data$?: PromiseLike<unknown>;
6
6
  hasItems?: boolean;
7
7
  onMore?: () => void;
8
8
  }) => import("lit-html").TemplateResult<1>;
9
+ /** @deprecated Button presentation is provided by cosmoz-button. */
10
+ export declare const style = "";
9
11
  //# sourceMappingURL=render-more.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"render-more.d.ts","sourceRoot":"","sources":["../../../src/list/more/render-more.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAC;AAOjC,eAAO,MAAM,KAAK,QAcjB,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,uCAK5B;IACF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACpB,yCAkBU,CAAC"}
1
+ {"version":3,"file":"render-more.d.ts","sourceRoot":"","sources":["../../../src/list/more/render-more.ts"],"names":[],"mappings":"AAAA,OAAO,wBAAwB,CAAC;AAChC,OAAO,yBAAyB,CAAC;AAMjC,eAAO,MAAM,cAAc,GAAI,uCAK5B;IACF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACpB,yCAoBiB,CAAC;AAEnB,oEAAoE;AACpE,eAAO,MAAM,KAAK,KAAK,CAAC"}
@@ -1,25 +1,12 @@
1
+ import '@neovici/cosmoz-button';
1
2
  import '@neovici/cosmoz-spinner';
2
- import { css } from '@pionjs/pion';
3
3
  import { t } from 'i18next';
4
4
  import { html, nothing } from 'lit-html';
5
5
  import { until } from 'lit-html/directives/until.js';
6
6
  import { when } from 'lit-html/directives/when.js';
7
- export const style = css `
8
- .more {
9
- font-family: inherit;
10
- font-size: 14px;
11
- font-weight: 500;
12
- line-height: 40px;
13
- background: inherit;
14
- color: var(--cz-text-color);
15
- border: none;
16
- cursor: pointer;
17
- }
18
- .more:hover {
19
- color: var(--secondary-text-color);
20
- }
21
- `;
22
- export const renderLoadMore = ({ loading, data$, hasItems, onMore, }) => html `<button
7
+ export const renderLoadMore = ({ loading, data$, hasItems, onMore, }) => html `<cosmoz-button
8
+ variant="primary"
9
+ size="lg"
23
10
  class="more"
24
11
  slot="extraContent"
25
12
  ?hidden="${!onMore}"
@@ -28,4 +15,6 @@ export const renderLoadMore = ({ loading, data$, hasItems, onMore, }) => html `<
28
15
  ${when(loading, () => html `<cosmoz-spinner></cosmoz-spinner>`)}
29
16
  ${when(hasItems && data$, (data$) => until(data$.then(() => nothing, () => nothing), html `<cosmoz-spinner></cosmoz-spinner>`))}
30
17
  <span>${t('Load more')}</span>
31
- </button>`;
18
+ </cosmoz-button>`;
19
+ /** @deprecated Button presentation is provided by cosmoz-button. */
20
+ export const style = '';
@@ -1 +1 @@
1
- {"version":3,"file":"style.css.d.ts","sourceRoot":"","sources":["../../src/list/style.css.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,KAAK,QAejB,CAAC"}
1
+ {"version":3,"file":"style.css.d.ts","sourceRoot":"","sources":["../../src/list/style.css.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK,QAajB,CAAC"}
@@ -1,6 +1,5 @@
1
1
  import { css } from '@pionjs/pion';
2
- import { bottomBarInfoStyles, buttonStyles, statusStyle, } from '../styles/shared-styles';
3
- import { style as loadMoreStyle } from './more/render-more';
2
+ import { bottomBarInfoStyles, statusStyle } from '../styles/shared-styles';
4
3
  export const style = css `
5
4
  :host {
6
5
  display: flex;
@@ -13,7 +12,5 @@ export const style = css `
13
12
  min-height: 200px;
14
13
  }
15
14
  ${bottomBarInfoStyles}
16
- ${buttonStyles}
17
15
  ${statusStyle}
18
- ${loadMoreStyle}
19
16
  `;
@@ -2,8 +2,8 @@ import { html } from 'lit-html';
2
2
  export const arrow = html `
3
3
  <svg
4
4
  xmlns="http://www.w3.org/2000/svg"
5
- width="6"
6
- height="10"
5
+ width="16"
6
+ height="16"
7
7
  fill="none"
8
8
  viewBox="0 0 6 10"
9
9
  >
@@ -17,7 +17,7 @@ const _emptySlide = {
17
17
  };
18
18
  const emptySlide = () => _emptySlide;
19
19
  export const renderNav = ({ next, prev, }) => html ` <cosmoz-button
20
- variant="secondary"
20
+ variant="tertiary"
21
21
  icon-only
22
22
  class="button-nav prev"
23
23
  title="${t('Previous item')}"
@@ -28,7 +28,7 @@ export const renderNav = ({ next, prev, }) => html ` <cosmoz-button
28
28
  ${arrow}
29
29
  </cosmoz-button>
30
30
  <cosmoz-button
31
- variant="secondary"
31
+ variant="tertiary"
32
32
  icon-only
33
33
  title="${t('Next item')}"
34
34
  class="button-nav next"
@@ -49,7 +49,7 @@ export const renderPagination = (pagination) => {
49
49
  title="${t('Previous page')}"
50
50
  class="button-page page-prev"
51
51
  size="sm"
52
- variant="secondary"
52
+ variant="tertiary"
53
53
  icon-only
54
54
  ?disabled=${!(pageNumber > 1)}
55
55
  @click=${(e) => onPage(e.ctrlKey ? 1 : pageNumber - 1)}
@@ -58,7 +58,7 @@ export const renderPagination = (pagination) => {
58
58
  </cosmoz-button>
59
59
  <cosmoz-button
60
60
  title="${t('Next page')}"
61
- variant="secondary"
61
+ variant="tertiary"
62
62
  icon-only
63
63
  class="button-page page-next"
64
64
  size="sm"
@@ -1,4 +1,3 @@
1
1
  export declare const statusStyle: string;
2
2
  export declare const bottomBarInfoStyles: string;
3
- export declare const buttonStyles: string;
4
3
  //# sourceMappingURL=shared-styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"shared-styles.d.ts","sourceRoot":"","sources":["../../src/styles/shared-styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,QAiHvB,CAAC;AAEF,eAAO,MAAM,mBAAmB,QAa/B,CAAC;AAEF,eAAO,MAAM,YAAY,QAqGxB,CAAC"}
1
+ {"version":3,"file":"shared-styles.d.ts","sourceRoot":"","sources":["../../src/styles/shared-styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,QAiHvB,CAAC;AAEF,eAAO,MAAM,mBAAmB,QAa/B,CAAC"}
@@ -127,105 +127,3 @@ export const bottomBarInfoStyles = css `
127
127
  margin: 0;
128
128
  }
129
129
  `;
130
- export const buttonStyles = css `
131
- .button {
132
- font-family: inherit;
133
- }
134
- .button:not([slot='bottom-bar-menu']),
135
- .file::-webkit-file-upload-button,
136
- .file::file-selector-button {
137
- background-color: var(--cz-color-bg-action-solid);
138
- color: var(--cz-color-text-on-action);
139
- background-image: var(--cz-action-sheen, none);
140
- box-shadow: var(--cz-shadow-action);
141
- box-sizing: border-box;
142
- cursor: pointer;
143
- outline: none;
144
- flex: none;
145
- border: none;
146
- padding: calc(var(--cz-spacing) * 2.5) calc(var(--cz-spacing) * 4);
147
- border-radius: var(--cz-radius-md);
148
- height: 40px;
149
- min-width: 78px;
150
- font-family: inherit;
151
- font-size: var(--cz-text-sm);
152
- font-weight: var(--cz-font-weight-semibold);
153
- line-height: var(--cz-text-sm-line-height);
154
- text-overflow: ellipsis;
155
- white-space: nowrap;
156
- }
157
- .button:not([slot='bottom-bar-menu']):hover,
158
- .button:not([slot='bottom-bar-menu']):active,
159
- .file::-webkit-file-upload-button:hover,
160
- .file::file-selector-button:hover {
161
- background-color: var(--cz-color-bg-action-solid-hover);
162
- }
163
- .button[disabled],
164
- .button:disabled {
165
- opacity: var(--cosmoz-button-disabled-opacity, 0.15);
166
- pointer-events: none;
167
- }
168
- a.button {
169
- text-decoration: none;
170
- }
171
- .buttons {
172
- display: flex;
173
- justify-content: flex-end;
174
- padding: 8px 8px 8px 24px;
175
- }
176
- .buttons .button {
177
- margin: 0 4px;
178
- }
179
- .button-ricon {
180
- border: none;
181
- border-radius: 50%;
182
- fill: var(--primary-button-icon-fill);
183
- padding: 8px;
184
- display: inline-flex;
185
- background: transparent;
186
- cursor: pointer;
187
- transition: background 0.15s ease;
188
- }
189
- .button-ricon:active {
190
- background: rgb(56, 62, 74, 0.15);
191
- }
192
- .actionButton {
193
- border: transparent;
194
- background: var(--cz-action-button-bg, #fff);
195
- border-radius: 500px;
196
- font-size: 1.08em;
197
- letter-spacing: -0.01em;
198
- padding: 0.5em 0.9em;
199
- cursor: pointer;
200
- display: flex;
201
- align-items: center;
202
- overflow: hidden;
203
- justify-content: center;
204
- white-space: nowrap;
205
- transition: background 0.25s;
206
- }
207
- .actionButton:hover {
208
- background: var(--cz-action-button-hover-bg, #f0f0f0);
209
- }
210
- .actionButton span {
211
- overflow: hidden;
212
- text-overflow: ellipsis;
213
- min-width: 10px;
214
- }
215
-
216
- .actionButton iron-icon {
217
- margin-left: 4px;
218
- flex: none;
219
- --iron-icon-width: 18px;
220
- --iron-icon-height: 18px;
221
- }
222
- .actionButton iron-icon:hover {
223
- color: var(--cz-accent-color);
224
- }
225
- .expand-more-icon {
226
- fill: var(--cz-expand-more-icon-color, inherit);
227
- }
228
- cosmoz-tab-card::part(collapse-icon) svg {
229
- fill: var(--cz-expand-more-icon-color, inherit);
230
- }
231
- `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neovici/cosmoz-queue",
3
- "version": "3.8.0",
3
+ "version": "3.9.0",
4
4
  "description": "A reusable queue component for master-detail views with list, split, and queue modes",
5
5
  "keywords": [
6
6
  "web-components",
@@ -63,7 +63,7 @@
63
63
  "./list/more/render": "./dist/list/more/render-more.js"
64
64
  },
65
65
  "dependencies": {
66
- "@neovici/cosmoz-button": "^1.1.0",
66
+ "@neovici/cosmoz-button": "^2.3.0",
67
67
  "@neovici/cosmoz-form": "^4.0.0",
68
68
  "@neovici/cosmoz-icons": "^1.6.0",
69
69
  "@neovici/cosmoz-omnitable": "^19.0.0",
@@ -100,5 +100,9 @@
100
100
  "storybook": "^10.0.0",
101
101
  "typescript": "^5.4.3",
102
102
  "vitest": "^4.0.0"
103
+ },
104
+ "overrides": {
105
+ "@neovici/cosmoz-button": "$@neovici/cosmoz-button",
106
+ "@neovici/cosmoz-tokens": "$@neovici/cosmoz-tokens"
103
107
  }
104
108
  }