@tmorrow/cre8-wc 1.2.2 → 1.2.3

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 (50) hide show
  1. package/cdn/cre8-wc.esm.js +3384 -3344
  2. package/cdn/cre8-wc.esm.js.map +1 -1
  3. package/cdn/cre8-wc.min.js +774 -770
  4. package/cdn/cre8-wc.min.js.map +1 -1
  5. package/lib/components/alert/alert.d.ts.map +1 -1
  6. package/lib/components/alert/alert.js +2 -2
  7. package/lib/components/alert/alert.js.map +1 -1
  8. package/lib/components/alert/alert.styles.js +1 -1
  9. package/lib/components/alert/alert.styles.js.map +1 -1
  10. package/lib/components/button/button.d.ts.map +1 -1
  11. package/lib/components/button/button.js +0 -7
  12. package/lib/components/button/button.js.map +1 -1
  13. package/lib/components/contexts/form-internals-context.d.ts +5 -0
  14. package/lib/components/contexts/form-internals-context.d.ts.map +1 -1
  15. package/lib/components/contexts/form-internals-context.js.map +1 -1
  16. package/lib/components/cre8-field.js +1 -1
  17. package/lib/components/date-picker/date-picker.d.ts +5 -2
  18. package/lib/components/date-picker/date-picker.d.ts.map +1 -1
  19. package/lib/components/date-picker/date-picker.js +21 -17
  20. package/lib/components/date-picker/date-picker.js.map +1 -1
  21. package/lib/components/dropdown/dropdown.styles.js +1 -1
  22. package/lib/components/dropdown/dropdown.styles.js.map +1 -1
  23. package/lib/components/modal/modal.d.ts +0 -1
  24. package/lib/components/modal/modal.d.ts.map +1 -1
  25. package/lib/components/modal/modal.js +2 -4
  26. package/lib/components/modal/modal.js.map +1 -1
  27. package/lib/components/multi-select/multi-select.js +3 -3
  28. package/lib/components/multi-select/multi-select.js.map +1 -1
  29. package/lib/components/multi-select/multi-select.styles.js +1 -1
  30. package/lib/components/multi-select/multi-select.styles.js.map +1 -1
  31. package/lib/components/pagination/pagination.d.ts.map +1 -1
  32. package/lib/components/pagination/pagination.js +13 -10
  33. package/lib/components/pagination/pagination.js.map +1 -1
  34. package/lib/components/progress-steps/progress-steps.d.ts +32 -2
  35. package/lib/components/progress-steps/progress-steps.d.ts.map +1 -1
  36. package/lib/components/progress-steps/progress-steps.js +37 -16
  37. package/lib/components/progress-steps/progress-steps.js.map +1 -1
  38. package/lib/components/progress-steps/progress-steps.styles.d.ts.map +1 -1
  39. package/lib/components/progress-steps/progress-steps.styles.js +4 -0
  40. package/lib/components/progress-steps/progress-steps.styles.js.map +1 -1
  41. package/lib/components/select-tile/select-tile.d.ts.map +1 -1
  42. package/lib/components/select-tile/select-tile.js +3 -1
  43. package/lib/components/select-tile/select-tile.js.map +1 -1
  44. package/lib/cre8-form-element-7TQ7UIBX.js +247 -0
  45. package/lib/design-tokens/brands/notion/tokens_notion.module.d.ts +3 -0
  46. package/lib/design-tokens/brands/notion/tokens_notion.module.d.ts.map +1 -0
  47. package/lib/design-tokens/brands/notion/tokens_notion.module.js +91 -0
  48. package/lib/design-tokens/brands/notion/tokens_notion.module.js.map +1 -0
  49. package/mcp-manifest.json +1 -1
  50. package/package.json +2 -2
@@ -0,0 +1,247 @@
1
+ import { property as h } from "lit/decorators.js";
2
+ import { Cre8Element as f } from "./components/cre8-element.js";
3
+ let b = class extends Event {
4
+ constructor(t, s, i, e) {
5
+ super("context-request", { bubbles: !0, composed: !0 }), this.context = t, this.contextTarget = s, this.callback = i, this.subscribe = e ?? !1;
6
+ }
7
+ };
8
+ class v {
9
+ get value() {
10
+ return this.o;
11
+ }
12
+ set value(t) {
13
+ this.setValue(t);
14
+ }
15
+ setValue(t, s = !1) {
16
+ const i = s || !Object.is(t, this.o);
17
+ this.o = t, i && this.updateObservers();
18
+ }
19
+ constructor(t) {
20
+ this.subscriptions = /* @__PURE__ */ new Map(), this.updateObservers = () => {
21
+ for (const [s, { disposer: i }] of this.subscriptions) s(this.o, i);
22
+ }, t !== void 0 && (this.value = t);
23
+ }
24
+ addCallback(t, s, i) {
25
+ if (!i) return void t(this.value);
26
+ this.subscriptions.has(t) || this.subscriptions.set(t, { disposer: () => {
27
+ this.subscriptions.delete(t);
28
+ }, consumerHost: s });
29
+ const { disposer: e } = this.subscriptions.get(t);
30
+ t(this.value, e);
31
+ }
32
+ clearCallbacks() {
33
+ this.subscriptions.clear();
34
+ }
35
+ }
36
+ let x = class extends Event {
37
+ constructor(t, s) {
38
+ super("context-provider", { bubbles: !0, composed: !0 }), this.context = t, this.contextTarget = s;
39
+ }
40
+ };
41
+ class d extends v {
42
+ constructor(t, s, i) {
43
+ super(s.context !== void 0 ? s.initialValue : i), this.onContextRequest = (e) => {
44
+ if (e.context !== this.context) return;
45
+ const a = e.contextTarget ?? e.composedPath()[0];
46
+ a !== this.host && (e.stopPropagation(), this.addCallback(e.callback, a, e.subscribe));
47
+ }, this.onProviderRequest = (e) => {
48
+ if (e.context !== this.context || (e.contextTarget ?? e.composedPath()[0]) === this.host) return;
49
+ const a = /* @__PURE__ */ new Set();
50
+ for (const [r, { consumerHost: l }] of this.subscriptions) a.has(r) || (a.add(r), l.dispatchEvent(new b(this.context, l, r, !0)));
51
+ e.stopPropagation();
52
+ }, this.host = t, s.context !== void 0 ? this.context = s.context : this.context = s, this.attachListeners(), this.host.addController?.(this);
53
+ }
54
+ attachListeners() {
55
+ this.host.addEventListener("context-request", this.onContextRequest), this.host.addEventListener("context-provider", this.onProviderRequest);
56
+ }
57
+ hostConnected() {
58
+ this.host.dispatchEvent(new x(this.context, this.host));
59
+ }
60
+ }
61
+ function p({ context: n }) {
62
+ return (t, s) => {
63
+ const i = /* @__PURE__ */ new WeakMap();
64
+ if (typeof s == "object") return { get() {
65
+ return t.get.call(this);
66
+ }, set(e) {
67
+ return i.get(this).setValue(e), t.set.call(this, e);
68
+ }, init(e) {
69
+ return i.set(this, new d(this, { context: n, initialValue: e })), e;
70
+ } };
71
+ {
72
+ t.constructor.addInitializer(((r) => {
73
+ i.set(r, new d(r, { context: n }));
74
+ }));
75
+ const e = Object.getOwnPropertyDescriptor(t, s);
76
+ let a;
77
+ if (e === void 0) {
78
+ const r = /* @__PURE__ */ new WeakMap();
79
+ a = { get() {
80
+ return r.get(this);
81
+ }, set(l) {
82
+ i.get(this).setValue(l), r.set(this, l);
83
+ }, configurable: !0, enumerable: !0 };
84
+ } else {
85
+ const r = e.set;
86
+ a = { ...e, set(l) {
87
+ i.get(this).setValue(l), r?.call(this, l);
88
+ } };
89
+ }
90
+ return void Object.defineProperty(t, s, a);
91
+ }
92
+ };
93
+ }
94
+ const m = Symbol("cre8-form-internals"), y = Symbol("cre8-form-state");
95
+ var V = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, u = (n, t, s, i) => {
96
+ for (var e = i > 1 ? void 0 : i ? _(t, s) : t, a = n.length - 1, r; a >= 0; a--)
97
+ (r = n[a]) && (e = (i ? r(t, s, e) : r(e)) || e);
98
+ return i && e && V(t, s, e), e;
99
+ };
100
+ const c = class c extends f {
101
+ constructor() {
102
+ super(), this.internalValue = "", this.defaultValue = "", this._formState = {
103
+ value: "",
104
+ disabled: !1,
105
+ required: !1,
106
+ isError: !1,
107
+ isSuccess: !1
108
+ }, this._internals = this.attachInternals();
109
+ }
110
+ get value() {
111
+ return this.internalValue;
112
+ }
113
+ /**
114
+ * Sets the value of the form field.
115
+ * 1. Stores the new value so it can be retrieved by the getter.
116
+ * 2. Sets the current value of the control via ElementInternals.
117
+ * 3. Updates the actual field element.
118
+ * 4. Updates the form state context.
119
+ * 5. Triggers a re-render.
120
+ */
121
+ set value(t) {
122
+ const s = this.value;
123
+ this.internalValue = t, this.type !== "checkbox" && this.type !== "radio" && this._internals?.setFormValue(t), this.updateField(), this.updateFormState(), this.requestUpdate("value", s);
124
+ }
125
+ /**
126
+ * Updates the form state context for descendant consumption
127
+ */
128
+ updateFormState() {
129
+ this._formState = {
130
+ value: this.internalValue,
131
+ disabled: this.disabled ?? !1,
132
+ required: this.required ?? !1,
133
+ isError: this.isError ?? !1,
134
+ isSuccess: this.isSuccess ?? !1,
135
+ name: this.name
136
+ };
137
+ }
138
+ /**
139
+ * Updates the actual field element's value
140
+ */
141
+ updateField() {
142
+ this.field && this.internalValue !== void 0 && (this.field.value = this.internalValue ?? "");
143
+ }
144
+ /**
145
+ * Lifecycle hook called after first render
146
+ */
147
+ firstUpdated() {
148
+ this.type !== "checkbox" && this.type !== "radio" && (this.defaultValue = this.value || this.getAttribute("value") || ""), this.updateField(), this.updateFormState();
149
+ }
150
+ /**
151
+ * Called when properties change
152
+ */
153
+ updated(t) {
154
+ super.updated(t), (t.has("disabled") || t.has("required") || t.has("isError") || t.has("isSuccess") || t.has("name")) && this.updateFormState();
155
+ }
156
+ /**
157
+ * Form lifecycle callback - called when the form is reset
158
+ */
159
+ formResetCallback() {
160
+ this.value = this.defaultValue, this.updateField();
161
+ }
162
+ /**
163
+ * Form lifecycle callback - called when the element is disabled via fieldset
164
+ */
165
+ formDisabledCallback(t) {
166
+ this.disabled = t;
167
+ }
168
+ /**
169
+ * Form lifecycle callback - called when form state is restored
170
+ */
171
+ formStateRestoreCallback(t, s) {
172
+ typeof t == "string" && (this.value = t);
173
+ }
174
+ /**
175
+ * Gets the form associated with this element
176
+ */
177
+ get form() {
178
+ return this._internals?.form ?? null;
179
+ }
180
+ /**
181
+ * Gets the validation message
182
+ */
183
+ get validationMessage() {
184
+ return this._internals?.validationMessage ?? "";
185
+ }
186
+ /**
187
+ * Gets the validity state
188
+ */
189
+ get validity() {
190
+ return this._internals?.validity;
191
+ }
192
+ /**
193
+ * Gets whether the element will be validated
194
+ */
195
+ get willValidate() {
196
+ return this._internals?.willValidate ?? !1;
197
+ }
198
+ /**
199
+ * Checks validity and reports to the user
200
+ */
201
+ reportValidity() {
202
+ return this._internals?.reportValidity() ?? !0;
203
+ }
204
+ /**
205
+ * Checks validity without reporting
206
+ */
207
+ checkValidity() {
208
+ return this._internals?.checkValidity() ?? !0;
209
+ }
210
+ /**
211
+ * Sets a custom validity message
212
+ */
213
+ setCustomValidity(t) {
214
+ this._internals && this.field && (t ? this._internals.setValidity({ customError: !0 }, t, this.field) : this._internals.setValidity({}));
215
+ }
216
+ };
217
+ c.formAssociated = !0;
218
+ let o = c;
219
+ u([
220
+ p({ context: m })
221
+ ], o.prototype, "_internals", 2);
222
+ u([
223
+ p({ context: y })
224
+ ], o.prototype, "_formState", 2);
225
+ u([
226
+ h()
227
+ ], o.prototype, "name", 2);
228
+ u([
229
+ h({ type: Boolean, reflect: !0 })
230
+ ], o.prototype, "disabled", 2);
231
+ u([
232
+ h({ type: Boolean, reflect: !0 })
233
+ ], o.prototype, "required", 2);
234
+ u([
235
+ h({ type: Boolean, reflect: !0 })
236
+ ], o.prototype, "isError", 2);
237
+ u([
238
+ h({ type: Boolean, reflect: !0 })
239
+ ], o.prototype, "isSuccess", 2);
240
+ u([
241
+ h()
242
+ ], o.prototype, "value", 1);
243
+ export {
244
+ o as C,
245
+ m as f,
246
+ b as s
247
+ };
@@ -0,0 +1,3 @@
1
+ declare const notion: import("lit").CSSResult;
2
+ export default notion;
3
+ //# sourceMappingURL=tokens_notion.module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokens_notion.module.d.ts","sourceRoot":"","sources":["../../../../design-tokens/brands/notion/tokens_notion.module.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,MAAM,yBAuFX,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -0,0 +1,91 @@
1
+ import { css } from "lit";
2
+ const notion = css `
3
+ /**
4
+ * Cre8 Theme: Notion
5
+ * Generated by Cre8 Brand Themer
6
+ *
7
+ * Usage: Include this CSS file after the Cre8 component styles.
8
+ * All Cre8 components will automatically pick up these overrides.
9
+ */
10
+
11
+ :root {
12
+ /* ──────────── Brand Colors ──────────── */
13
+ --cre8-color-bg-brand-subtle: #f5f5f5;
14
+ --cre8-color-bg-brand-strong: #000000;
15
+ --cre8-color-bg-brand-xstrong: #37352f;
16
+ --cre8-color-content-brand: #000000;
17
+ --cre8-color-border-brand: #000000;
18
+
19
+ /* ──────────── Backgrounds ──────────── */
20
+ --cre8-color-bg-default: #ffffff;
21
+ --cre8-color-bg-subtle: #fafafa;
22
+ --cre8-color-bg-muted: #f2f2f2;
23
+ --cre8-color-bg-inverse: #37352f;
24
+
25
+ /* ──────────── Content / Text ──────────── */
26
+ --cre8-color-content-default: #292823;
27
+ --cre8-color-content-subtle: #7c776a;
28
+ --cre8-color-content-muted: #ada99f;
29
+ --cre8-color-content-inverse: #ffffff;
30
+
31
+ /* ──────────── Borders ──────────── */
32
+ --cre8-color-border-default: #e8e7e4;
33
+ --cre8-color-border-subtle: #ffffff;
34
+ --cre8-color-border-strong: #c5c2bb;
35
+ --cre8-color-border-inverse: #605d52;
36
+
37
+ /* ──────────── Buttons ──────────── */
38
+ --cre8-color-button-primary-background: #000000;
39
+ --cre8-color-button-primary-background-hover: #000000;
40
+ --cre8-color-button-primary-border: #000000;
41
+ --cre8-color-button-primary-content: #ffffff;
42
+ --cre8-color-button-secondary-background: transparent;
43
+ --cre8-color-button-secondary-border: #000000;
44
+ --cre8-color-button-tertiary-background: transparent;
45
+
46
+ /* ──────────── Links ──────────── */
47
+ --cre8-color-link-default: #000000;
48
+ --cre8-color-link-hover: #000000;
49
+ --cre8-color-link-visited: #000000;
50
+ --cre8-color-link-inverse: #2eaadc;
51
+
52
+ /* ──────────── Header ──────────── */
53
+ --cre8-header-background: #37352f;
54
+ --cre8-header-top-background: #292823;
55
+ --cre8-header-bottom-background: #45423b;
56
+ --cre8-header-middle-border-bottom-color:#525047;
57
+ --cre8-color-header-bg-default: #37352f;
58
+
59
+ /* ──────────── Status Colors ──────────── */
60
+ --cre8-color-bg-error: #fef2f2;
61
+ --cre8-color-border-error: #ef4444;
62
+ --cre8-color-content-error: #dc2626;
63
+ --cre8-color-bg-warning: #fffbeb;
64
+ --cre8-color-border-warning: #f59e0b;
65
+ --cre8-color-content-warning: #d97706;
66
+ --cre8-color-bg-success: #f0fdf4;
67
+ --cre8-color-border-success: #22c55e;
68
+ --cre8-color-content-success: #16a34a;
69
+ --cre8-color-bg-info: #f5f5f5;
70
+ --cre8-color-border-info: #000000;
71
+ --cre8-color-content-info: #000000;
72
+
73
+ /* ──────────── Border Radius ──────────── */
74
+ --cre8-border-radius-default: 6px;
75
+ --cre8-border-radius-lg: 9px;
76
+ --cre8-border-radius-button: 6px;
77
+ --cre8-border-radius-card: 9px;
78
+ --cre8-border-radius-input: 6px;
79
+
80
+ /* ──────────── Shadows ──────────── */
81
+ --cre8-shadow-default: 0 1px 3px rgba(0,0,0,0.08);
82
+ --cre8-shadow-elevated: 0 4px 12px rgba(0,0,0,0.12);
83
+ --cre8-shadow-card: 0 2px 8px rgba(0,0,0,0.06);
84
+
85
+ /* ──────────── Typography ──────────── */
86
+ --cre8-font-family-default: 'Assisstant', system-ui, sans-serif;
87
+
88
+ }
89
+ `;
90
+ export default notion;
91
+ //# sourceMappingURL=tokens_notion.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokens_notion.module.js","sourceRoot":"","sources":["../../../../design-tokens/brands/notion/tokens_notion.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuFjB,CAAC;AAEF,eAAe,MAAM,CAAC","sourcesContent":["import { css } from \"lit\";\n\nconst notion = css`\n/**\n * Cre8 Theme: Notion\n * Generated by Cre8 Brand Themer\n * \n * Usage: Include this CSS file after the Cre8 component styles.\n * All Cre8 components will automatically pick up these overrides.\n */\n\n:root {\n /* ──────────── Brand Colors ──────────── */\n --cre8-color-bg-brand-subtle: #f5f5f5;\n --cre8-color-bg-brand-strong: #000000;\n --cre8-color-bg-brand-xstrong: #37352f;\n --cre8-color-content-brand: #000000;\n --cre8-color-border-brand: #000000;\n\n /* ──────────── Backgrounds ──────────── */\n --cre8-color-bg-default: #ffffff;\n --cre8-color-bg-subtle: #fafafa;\n --cre8-color-bg-muted: #f2f2f2;\n --cre8-color-bg-inverse: #37352f;\n\n /* ──────────── Content / Text ──────────── */\n --cre8-color-content-default: #292823;\n --cre8-color-content-subtle: #7c776a;\n --cre8-color-content-muted: #ada99f;\n --cre8-color-content-inverse: #ffffff;\n\n /* ──────────── Borders ──────────── */\n --cre8-color-border-default: #e8e7e4;\n --cre8-color-border-subtle: #ffffff;\n --cre8-color-border-strong: #c5c2bb;\n --cre8-color-border-inverse: #605d52;\n\n /* ──────────── Buttons ──────────── */\n --cre8-color-button-primary-background: #000000;\n --cre8-color-button-primary-background-hover: #000000;\n --cre8-color-button-primary-border: #000000;\n --cre8-color-button-primary-content: #ffffff;\n --cre8-color-button-secondary-background: transparent;\n --cre8-color-button-secondary-border: #000000;\n --cre8-color-button-tertiary-background: transparent;\n\n /* ──────────── Links ──────────── */\n --cre8-color-link-default: #000000;\n --cre8-color-link-hover: #000000;\n --cre8-color-link-visited: #000000;\n --cre8-color-link-inverse: #2eaadc;\n\n /* ──────────── Header ──────────── */\n --cre8-header-background: #37352f;\n --cre8-header-top-background: #292823;\n --cre8-header-bottom-background: #45423b;\n --cre8-header-middle-border-bottom-color:#525047;\n --cre8-color-header-bg-default: #37352f;\n\n /* ──────────── Status Colors ──────────── */\n --cre8-color-bg-error: #fef2f2;\n --cre8-color-border-error: #ef4444;\n --cre8-color-content-error: #dc2626;\n --cre8-color-bg-warning: #fffbeb;\n --cre8-color-border-warning: #f59e0b;\n --cre8-color-content-warning: #d97706;\n --cre8-color-bg-success: #f0fdf4;\n --cre8-color-border-success: #22c55e;\n --cre8-color-content-success: #16a34a;\n --cre8-color-bg-info: #f5f5f5;\n --cre8-color-border-info: #000000;\n --cre8-color-content-info: #000000;\n\n /* ──────────── Border Radius ──────────── */\n --cre8-border-radius-default: 6px;\n --cre8-border-radius-lg: 9px;\n --cre8-border-radius-button: 6px;\n --cre8-border-radius-card: 9px;\n --cre8-border-radius-input: 6px;\n\n /* ──────────── Shadows ──────────── */\n --cre8-shadow-default: 0 1px 3px rgba(0,0,0,0.08);\n --cre8-shadow-elevated: 0 4px 12px rgba(0,0,0,0.12);\n --cre8-shadow-card: 0 2px 8px rgba(0,0,0,0.06);\n\n /* ──────────── Typography ──────────── */\n --cre8-font-family-default: 'Assisstant', system-ui, sans-serif;\n\n}\n`;\n\nexport default notion;"]}
package/mcp-manifest.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.2.1",
2
+ "version": "1.2.2",
3
3
  "library": "@tmorrow/cre8-wc",
4
4
  "tagPrefix": "cre8",
5
5
  "description": "cre8 Web Components is a library of presentational UI web components to be consumed by # web applications.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tmorrow/cre8-wc",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "description": "cre8 Web Components is a library of presentational UI web components to be consumed by # web applications.",
5
5
  "license": "BSD-3-Clause",
6
6
  "scripts": {
@@ -160,4 +160,4 @@
160
160
  "*.ts": "eslint --cache --fix"
161
161
  },
162
162
  "customElements": ".storybook/custom-elements.json"
163
- }
163
+ }