@haiilo/catalyst 3.0.0 → 3.0.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.
Files changed (77) hide show
  1. package/dist/catalyst/catalyst.css +22 -22
  2. package/dist/catalyst/catalyst.esm.js +1 -1
  3. package/dist/catalyst/catalyst.esm.js.map +1 -1
  4. package/dist/catalyst/p-1c6eace6.js +3 -0
  5. package/dist/catalyst/p-1c6eace6.js.map +1 -0
  6. package/dist/catalyst/p-d5ac868d.entry.js +10 -0
  7. package/dist/catalyst/p-d5ac868d.entry.js.map +1 -0
  8. package/dist/catalyst/scss/core/_dialog.scss +1 -1
  9. package/dist/catalyst/scss/core/_notification.scss +10 -10
  10. package/dist/catalyst/scss/core/_typography.scss +1 -1
  11. package/dist/cjs/cat-alert_24.cjs.entry.js +1354 -32
  12. package/dist/cjs/cat-alert_24.cjs.entry.js.map +1 -1
  13. package/dist/cjs/catalyst.cjs.js +2 -2
  14. package/dist/cjs/{index-e540e911.js → index-22e41d18.js} +1 -4
  15. package/dist/cjs/index-22e41d18.js.map +1 -0
  16. package/dist/cjs/loader.cjs.js +2 -2
  17. package/dist/collection/collection-manifest.json +0 -1
  18. package/dist/collection/components/cat-input/cat-input.css +10 -0
  19. package/dist/collection/components/cat-scrollable/cat-scrollable.js +18 -14
  20. package/dist/collection/components/cat-scrollable/cat-scrollable.js.map +1 -1
  21. package/dist/collection/components/cat-textarea/cat-textarea.css +5 -0
  22. package/dist/collection/scss/core/_dialog.scss +1 -1
  23. package/dist/collection/scss/core/_notification.scss +10 -10
  24. package/dist/collection/scss/core/_typography.scss +1 -1
  25. package/dist/components/cat-badge.js.map +1 -1
  26. package/dist/components/cat-button2.js.map +1 -1
  27. package/dist/components/cat-card.js.map +1 -1
  28. package/dist/components/cat-dropdown2.js +759 -2
  29. package/dist/components/cat-dropdown2.js.map +1 -1
  30. package/dist/components/cat-input.js +1 -1
  31. package/dist/components/cat-input.js.map +1 -1
  32. package/dist/components/cat-scrollable2.js +241 -14
  33. package/dist/components/cat-scrollable2.js.map +1 -1
  34. package/dist/components/cat-select-demo.js +2 -2
  35. package/dist/components/cat-select2.js +2 -187
  36. package/dist/components/cat-select2.js.map +1 -1
  37. package/dist/components/cat-textarea.js +1 -1
  38. package/dist/components/cat-textarea.js.map +1 -1
  39. package/dist/components/index.d.ts +0 -1
  40. package/dist/components/index.js +0 -1
  41. package/dist/components/index.js.map +1 -1
  42. package/dist/esm/cat-alert_24.entry.js +1348 -26
  43. package/dist/esm/cat-alert_24.entry.js.map +1 -1
  44. package/dist/esm/catalyst.js +2 -2
  45. package/dist/esm/{index-c2a28ebb.js → index-7b85fb91.js} +1 -4
  46. package/dist/esm/index-7b85fb91.js.map +1 -0
  47. package/dist/esm/loader.js +2 -2
  48. package/dist/types/components/cat-scrollable/cat-scrollable.d.ts +3 -0
  49. package/dist/types/components.d.ts +0 -25
  50. package/package.json +2 -2
  51. package/dist/catalyst/p-52f9fea7.entry.js +0 -2
  52. package/dist/catalyst/p-52f9fea7.entry.js.map +0 -1
  53. package/dist/catalyst/p-53a1db22.js +0 -3
  54. package/dist/catalyst/p-53a1db22.js.map +0 -1
  55. package/dist/catalyst/p-557c8009.entry.js +0 -2
  56. package/dist/catalyst/p-557c8009.entry.js.map +0 -1
  57. package/dist/catalyst/p-60a20ebe.js +0 -10
  58. package/dist/catalyst/p-60a20ebe.js.map +0 -1
  59. package/dist/cjs/cat-modal.cjs.entry.js +0 -74
  60. package/dist/cjs/cat-modal.cjs.entry.js.map +0 -1
  61. package/dist/cjs/first-tabbable-7966cf1c.js +0 -1288
  62. package/dist/cjs/first-tabbable-7966cf1c.js.map +0 -1
  63. package/dist/cjs/index-e540e911.js.map +0 -1
  64. package/dist/collection/components/cat-modal/cat-modal.css +0 -65
  65. package/dist/collection/components/cat-modal/cat-modal.js +0 -117
  66. package/dist/collection/components/cat-modal/cat-modal.js.map +0 -1
  67. package/dist/components/cat-modal.d.ts +0 -11
  68. package/dist/components/cat-modal.js +0 -111
  69. package/dist/components/cat-modal.js.map +0 -1
  70. package/dist/components/focus-trap.esm.js +0 -763
  71. package/dist/components/focus-trap.esm.js.map +0 -1
  72. package/dist/esm/cat-modal.entry.js +0 -70
  73. package/dist/esm/cat-modal.entry.js.map +0 -1
  74. package/dist/esm/first-tabbable-4a00de61.js +0 -1284
  75. package/dist/esm/first-tabbable-4a00de61.js.map +0 -1
  76. package/dist/esm/index-c2a28ebb.js.map +0 -1
  77. package/dist/types/components/cat-modal/cat-modal.d.ts +0 -20
@@ -4,8 +4,8 @@ import { d as defineCustomElement$9 } from './cat-button2.js';
4
4
  import { d as defineCustomElement$8 } from './cat-checkbox2.js';
5
5
  import { d as defineCustomElement$7 } from './cat-dropdown2.js';
6
6
  import { d as defineCustomElement$6 } from './cat-icon2.js';
7
- import { o as operate, c as createOperatorSubscriber, n as noop, m as map, a as mergeMap, d as defineCustomElement$5 } from './cat-scrollable2.js';
8
- import { c as concat, t as take, a as asyncScheduler, b as timer, o as of, d as defineCustomElement$4 } from './cat-select2.js';
7
+ import { o as operate, c as createOperatorSubscriber, n as noop, m as map, a as mergeMap, b as asyncScheduler, t as timer, d as defineCustomElement$5 } from './cat-scrollable2.js';
8
+ import { c as concat, t as take, o as of, d as defineCustomElement$4 } from './cat-select2.js';
9
9
  import { d as defineCustomElement$3 } from './cat-skeleton2.js';
10
10
  import { d as defineCustomElement$2 } from './cat-spinner2.js';
11
11
 
@@ -7,161 +7,10 @@ import { d as defineCustomElement$7 } from './cat-avatar2.js';
7
7
  import { d as defineCustomElement$6 } from './cat-button2.js';
8
8
  import { d as defineCustomElement$5 } from './cat-checkbox2.js';
9
9
  import { d as defineCustomElement$4 } from './cat-icon2.js';
10
- import { S as Subscription, b as arrRemove, f as from, p as popScheduler, e as createErrorClass, g as mergeAll, O as Observable, i as isScheduler, o as operate, c as createOperatorSubscriber, h as innerFrom, n as noop, E as EMPTY, j as filter, k as identity, l as isFunction, q as Subject, r as distinctUntilChanged, d as defineCustomElement$3 } from './cat-scrollable2.js';
10
+ import { f as from, p as popScheduler, e as createErrorClass, g as mergeAll, o as operate, c as createOperatorSubscriber, i as innerFrom, n as noop, E as EMPTY, h as filter, j as identity, k as isFunction, S as Subject, l as distinctUntilChanged, d as defineCustomElement$3, t as timer } from './cat-scrollable2.js';
11
11
  import { d as defineCustomElement$2 } from './cat-skeleton2.js';
12
12
  import { d as defineCustomElement$1 } from './cat-spinner2.js';
13
13
 
14
- const dateTimestampProvider = {
15
- now() {
16
- return (dateTimestampProvider.delegate || Date).now();
17
- },
18
- delegate: undefined,
19
- };
20
-
21
- class Action extends Subscription {
22
- constructor(scheduler, work) {
23
- super();
24
- }
25
- schedule(state, delay = 0) {
26
- return this;
27
- }
28
- }
29
-
30
- const intervalProvider = {
31
- setInterval(handler, timeout, ...args) {
32
- const { delegate } = intervalProvider;
33
- if (delegate === null || delegate === void 0 ? void 0 : delegate.setInterval) {
34
- return delegate.setInterval(handler, timeout, ...args);
35
- }
36
- return setInterval(handler, timeout, ...args);
37
- },
38
- clearInterval(handle) {
39
- const { delegate } = intervalProvider;
40
- return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearInterval) || clearInterval)(handle);
41
- },
42
- delegate: undefined,
43
- };
44
-
45
- class AsyncAction extends Action {
46
- constructor(scheduler, work) {
47
- super(scheduler, work);
48
- this.scheduler = scheduler;
49
- this.work = work;
50
- this.pending = false;
51
- }
52
- schedule(state, delay = 0) {
53
- if (this.closed) {
54
- return this;
55
- }
56
- this.state = state;
57
- const id = this.id;
58
- const scheduler = this.scheduler;
59
- if (id != null) {
60
- this.id = this.recycleAsyncId(scheduler, id, delay);
61
- }
62
- this.pending = true;
63
- this.delay = delay;
64
- this.id = this.id || this.requestAsyncId(scheduler, this.id, delay);
65
- return this;
66
- }
67
- requestAsyncId(scheduler, _id, delay = 0) {
68
- return intervalProvider.setInterval(scheduler.flush.bind(scheduler, this), delay);
69
- }
70
- recycleAsyncId(_scheduler, id, delay = 0) {
71
- if (delay != null && this.delay === delay && this.pending === false) {
72
- return id;
73
- }
74
- intervalProvider.clearInterval(id);
75
- return undefined;
76
- }
77
- execute(state, delay) {
78
- if (this.closed) {
79
- return new Error('executing a cancelled action');
80
- }
81
- this.pending = false;
82
- const error = this._execute(state, delay);
83
- if (error) {
84
- return error;
85
- }
86
- else if (this.pending === false && this.id != null) {
87
- this.id = this.recycleAsyncId(this.scheduler, this.id, null);
88
- }
89
- }
90
- _execute(state, _delay) {
91
- let errored = false;
92
- let errorValue;
93
- try {
94
- this.work(state);
95
- }
96
- catch (e) {
97
- errored = true;
98
- errorValue = e ? e : new Error('Scheduled action threw falsy error');
99
- }
100
- if (errored) {
101
- this.unsubscribe();
102
- return errorValue;
103
- }
104
- }
105
- unsubscribe() {
106
- if (!this.closed) {
107
- const { id, scheduler } = this;
108
- const { actions } = scheduler;
109
- this.work = this.state = this.scheduler = null;
110
- this.pending = false;
111
- arrRemove(actions, this);
112
- if (id != null) {
113
- this.id = this.recycleAsyncId(scheduler, id, null);
114
- }
115
- this.delay = null;
116
- super.unsubscribe();
117
- }
118
- }
119
- }
120
-
121
- class Scheduler {
122
- constructor(schedulerActionCtor, now = Scheduler.now) {
123
- this.schedulerActionCtor = schedulerActionCtor;
124
- this.now = now;
125
- }
126
- schedule(work, delay = 0, state) {
127
- return new this.schedulerActionCtor(this, work).schedule(state, delay);
128
- }
129
- }
130
- Scheduler.now = dateTimestampProvider.now;
131
-
132
- class AsyncScheduler extends Scheduler {
133
- constructor(SchedulerAction, now = Scheduler.now) {
134
- super(SchedulerAction, now);
135
- this.actions = [];
136
- this._active = false;
137
- this._scheduled = undefined;
138
- }
139
- flush(action) {
140
- const { actions } = this;
141
- if (this._active) {
142
- actions.push(action);
143
- return;
144
- }
145
- let error;
146
- this._active = true;
147
- do {
148
- if ((error = action.execute(action.state, action.delay))) {
149
- break;
150
- }
151
- } while ((action = actions.shift()));
152
- this._active = false;
153
- if (error) {
154
- while ((action = actions.shift())) {
155
- action.unsubscribe();
156
- }
157
- throw error;
158
- }
159
- }
160
- }
161
-
162
- const asyncScheduler = new AsyncScheduler(AsyncAction);
163
- const async = asyncScheduler;
164
-
165
14
  function of(...args) {
166
15
  const scheduler = popScheduler(args);
167
16
  return from(args, scheduler);
@@ -173,10 +22,6 @@ const EmptyError = createErrorClass((_super) => function EmptyErrorImpl() {
173
22
  this.message = 'no elements in sequence';
174
23
  });
175
24
 
176
- function isValidDate(value) {
177
- return value instanceof Date && !isNaN(value);
178
- }
179
-
180
25
  function concatAll() {
181
26
  return mergeAll(1);
182
27
  }
@@ -185,36 +30,6 @@ function concat(...args) {
185
30
  return concatAll()(from(args, popScheduler(args)));
186
31
  }
187
32
 
188
- function timer(dueTime = 0, intervalOrScheduler, scheduler = async) {
189
- let intervalDuration = -1;
190
- if (intervalOrScheduler != null) {
191
- if (isScheduler(intervalOrScheduler)) {
192
- scheduler = intervalOrScheduler;
193
- }
194
- else {
195
- intervalDuration = intervalOrScheduler;
196
- }
197
- }
198
- return new Observable((subscriber) => {
199
- let due = isValidDate(dueTime) ? +dueTime - scheduler.now() : dueTime;
200
- if (due < 0) {
201
- due = 0;
202
- }
203
- let n = 0;
204
- return scheduler.schedule(function () {
205
- if (!subscriber.closed) {
206
- subscriber.next(n++);
207
- if (0 <= intervalDuration) {
208
- this.schedule(undefined, intervalDuration);
209
- }
210
- else {
211
- subscriber.complete();
212
- }
213
- }
214
- }, due);
215
- });
216
- }
217
-
218
33
  function catchError(selector) {
219
34
  return operate((source, subscriber) => {
220
35
  let innerSub = null;
@@ -1170,6 +985,6 @@ function defineCustomElement() {
1170
985
  } });
1171
986
  }
1172
987
 
1173
- export { CatSelect as C, asyncScheduler as a, timer as b, concat as c, defineCustomElement as d, of as o, take as t };
988
+ export { CatSelect as C, concat as c, defineCustomElement as d, of as o, take as t };
1174
989
 
1175
990
  //# sourceMappingURL=cat-select2.js.map