@erplora/outfitkit 0.1.15 → 0.1.17

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 (46) hide show
  1. package/dist/cdn.d.ts +1 -0
  2. package/dist/components/ok-data-table/csv-encoding.d.ts +4 -0
  3. package/dist/components/ok-data-table/csv-encoding.test.d.ts +1 -0
  4. package/dist/components/ok-receipt/ok-receipt.d.ts +7 -0
  5. package/dist/components/ok-receipt/ok-receipt.test.d.ts +1 -0
  6. package/dist/components/ok-theme-picker/ok-theme-picker.d.ts +46 -0
  7. package/dist/components/ok-theme-picker/ok-theme-picker.test.d.ts +1 -0
  8. package/dist/index.d.ts +4 -2
  9. package/dist/index.js +4 -0
  10. package/dist/ok-app-launcher.js +1 -1
  11. package/dist/ok-audio.js +1 -1
  12. package/dist/ok-calendar.js +1 -1
  13. package/dist/ok-carousel.js +1 -1
  14. package/dist/ok-chat.js +1 -1
  15. package/dist/ok-combo.js +1 -1
  16. package/dist/ok-command-palette.js +1 -1
  17. package/dist/ok-data-table.js +13 -3
  18. package/dist/ok-date-picker.js +1 -1
  19. package/dist/ok-drawer.js +1 -1
  20. package/dist/ok-dropzone.js +1 -1
  21. package/dist/ok-file-manager.js +1 -1
  22. package/dist/ok-inline-feedback.js +1 -1
  23. package/dist/ok-kpi.js +1 -1
  24. package/dist/ok-lightbox.js +1 -1
  25. package/dist/ok-mail.js +1 -1
  26. package/dist/ok-menubar.js +1 -1
  27. package/dist/ok-notification-center.js +1 -1
  28. package/dist/ok-pdf.js +1 -1
  29. package/dist/ok-pinpad.js +1 -1
  30. package/dist/ok-qty-stepper.js +1 -1
  31. package/dist/ok-receipt.js +11 -0
  32. package/dist/ok-scheduler.js +1 -1
  33. package/dist/ok-signature.js +1 -1
  34. package/dist/ok-split-button.js +1 -1
  35. package/dist/ok-stepper.js +1 -1
  36. package/dist/ok-tag-input.js +1 -1
  37. package/dist/ok-theme-picker.js +221 -0
  38. package/dist/ok-tree.js +1 -1
  39. package/dist/ok-video.js +1 -1
  40. package/dist/ok-widget-board.js +1 -1
  41. package/dist/outfitkit.bundle.js +1257 -1041
  42. package/dist/outfitkit.js +1 -0
  43. package/dist/palettes.css +422 -0
  44. package/dist/shared/icons.js +45 -45
  45. package/dist/theme/palettes.test.d.ts +1 -0
  46. package/package.json +4 -1
@@ -0,0 +1,221 @@
1
+ import { LitElement, css, nothing, html } from "lit";
2
+ import { property } from "lit/decorators.js";
3
+ import { define } from "./define.js";
4
+ var __defProp = Object.defineProperty;
5
+ var __decorateClass = (decorators, target, key, kind) => {
6
+ var result = void 0;
7
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
8
+ if (decorator = decorators[i])
9
+ result = decorator(target, key, result) || result;
10
+ if (result) __defProp(target, key, result);
11
+ return result;
12
+ };
13
+ const DEFAULT_PALETTES = [
14
+ { id: "erplora", label: "ERPlora", brand: "#1496D6" },
15
+ { id: "terracotta", label: "Terracotta", brand: "#E8552A" },
16
+ { id: "corporate", label: "Corporate", brand: "#0F3F9C" },
17
+ { id: "minimal", label: "Minimal", brand: "#111111" },
18
+ { id: "forest", label: "Forest", brand: "#1F542A" },
19
+ { id: "ocean", label: "Ocean", brand: "#008CBD" },
20
+ { id: "violet", label: "Violet", brand: "#742AD9" }
21
+ ];
22
+ function applyPalette(root, palette) {
23
+ if (!palette || palette === "erplora") root.removeAttribute("data-ok-palette");
24
+ else root.setAttribute("data-ok-palette", palette);
25
+ }
26
+ const DEFAULT_LABELS = {
27
+ palette: "Theme palette",
28
+ mode: "Appearance",
29
+ system: "System",
30
+ light: "Light",
31
+ dark: "Dark"
32
+ };
33
+ class OkThemePicker extends LitElement {
34
+ constructor() {
35
+ super(...arguments);
36
+ this.palette = "erplora";
37
+ this.mode = "system";
38
+ this.hideMode = false;
39
+ this.palettes = DEFAULT_PALETTES;
40
+ this.labels = {};
41
+ }
42
+ static {
43
+ this.styles = css`
44
+ :host {
45
+ display: block;
46
+ width: 100%;
47
+ --text: var(--ok-text, var(--ion-text-color, #1a1c20));
48
+ --muted: var(--ok-muted, rgba(var(--ion-text-color-rgb, 26, 28, 32), 0.6));
49
+ --surface: var(--ok-surface, var(--ion-card-background, #fff));
50
+ --border: var(--ok-border, var(--ion-border-color, rgba(26, 28, 32, 0.14)));
51
+ --primary: var(--ok-primary, var(--ion-color-primary, #1496d6));
52
+ --radius: var(--ok-radius, 14px);
53
+ font-family: var(--ok-font, var(--ion-font-family, system-ui, sans-serif));
54
+ color: var(--text);
55
+ }
56
+ .head {
57
+ font-size: 0.8rem;
58
+ font-weight: 600;
59
+ color: var(--muted);
60
+ text-transform: uppercase;
61
+ letter-spacing: 0.04em;
62
+ margin: 0 0 0.6rem;
63
+ }
64
+ .section + .section { margin-top: 1.1rem; }
65
+
66
+ .palettes {
67
+ display: flex;
68
+ flex-wrap: wrap;
69
+ gap: 0.75rem;
70
+ }
71
+ .swatch {
72
+ display: flex;
73
+ flex-direction: column;
74
+ align-items: center;
75
+ gap: 0.35rem;
76
+ padding: 0.5rem 0.4rem 0.4rem;
77
+ min-width: 4.2rem;
78
+ background: transparent;
79
+ border: 1px solid transparent;
80
+ border-radius: var(--radius);
81
+ color: var(--muted);
82
+ font: inherit;
83
+ font-size: 0.75rem;
84
+ cursor: pointer;
85
+ transition: border-color var(--ok-transition, 150ms ease), background-color var(--ok-transition, 150ms ease);
86
+ }
87
+ @media (hover: hover) {
88
+ .swatch:hover { background: color-mix(in oklab, var(--text) 5%, transparent); }
89
+ }
90
+ .swatch[aria-pressed='true'] {
91
+ border-color: var(--primary);
92
+ color: var(--text);
93
+ font-weight: 600;
94
+ }
95
+ .dot {
96
+ width: 1.9rem;
97
+ height: 1.9rem;
98
+ border-radius: 50%;
99
+ border: 1px solid var(--border);
100
+ box-shadow: inset 0 0 0 2px var(--surface);
101
+ }
102
+ .swatch[aria-pressed='true'] .dot {
103
+ outline: 2px solid var(--primary);
104
+ outline-offset: 2px;
105
+ }
106
+
107
+ .modes {
108
+ display: inline-flex;
109
+ gap: 0;
110
+ border: 1px solid var(--border);
111
+ border-radius: var(--ok-radius-pill, 999px);
112
+ padding: 0.2rem;
113
+ background: color-mix(in oklab, var(--text) 4%, transparent);
114
+ }
115
+ .mode {
116
+ border: 0;
117
+ background: transparent;
118
+ color: var(--muted);
119
+ font: inherit;
120
+ font-size: 0.85rem;
121
+ padding: 0.35rem 0.9rem;
122
+ border-radius: var(--ok-radius-pill, 999px);
123
+ cursor: pointer;
124
+ transition: background-color var(--ok-transition, 150ms ease), color var(--ok-transition, 150ms ease);
125
+ }
126
+ .mode[aria-pressed='true'] {
127
+ background: var(--surface);
128
+ color: var(--text);
129
+ font-weight: 600;
130
+ box-shadow: var(--ok-shadow-xs, 0 1px 2px rgba(0, 0, 0, 0.08));
131
+ }
132
+ `;
133
+ }
134
+ get t() {
135
+ return { ...DEFAULT_LABELS, ...this.labels };
136
+ }
137
+ emitChange() {
138
+ this.dispatchEvent(
139
+ new CustomEvent("ok-change", {
140
+ detail: { palette: this.palette, mode: this.mode },
141
+ bubbles: true,
142
+ composed: true
143
+ })
144
+ );
145
+ }
146
+ pickPalette(id) {
147
+ if (id === this.palette) return;
148
+ this.palette = id;
149
+ this.emitChange();
150
+ }
151
+ pickMode(mode) {
152
+ if (mode === this.mode) return;
153
+ this.mode = mode;
154
+ this.emitChange();
155
+ }
156
+ render() {
157
+ const modes = ["system", "light", "dark"];
158
+ return html`
159
+ <div class="section">
160
+ <p class="head">${this.t.palette}</p>
161
+ <div class="palettes" role="group" aria-label=${this.t.palette}>
162
+ ${this.palettes.map(
163
+ (p) => html`
164
+ <button
165
+ class="swatch"
166
+ type="button"
167
+ aria-label=${p.label}
168
+ aria-pressed=${this.palette === p.id ? "true" : "false"}
169
+ @click=${() => this.pickPalette(p.id)}
170
+ >
171
+ <span class="dot" style="background:${p.brand}"></span>
172
+ <span>${p.label}</span>
173
+ </button>
174
+ `
175
+ )}
176
+ </div>
177
+ </div>
178
+ ${this.hideMode ? nothing : html`
179
+ <div class="section">
180
+ <p class="head">${this.t.mode}</p>
181
+ <div class="modes" role="group" aria-label=${this.t.mode}>
182
+ ${modes.map(
183
+ (m) => html`
184
+ <button
185
+ class="mode"
186
+ type="button"
187
+ data-mode=${m}
188
+ aria-pressed=${this.mode === m ? "true" : "false"}
189
+ @click=${() => this.pickMode(m)}
190
+ >
191
+ ${this.t[m]}
192
+ </button>
193
+ `
194
+ )}
195
+ </div>
196
+ </div>
197
+ `}
198
+ `;
199
+ }
200
+ }
201
+ __decorateClass([
202
+ property()
203
+ ], OkThemePicker.prototype, "palette");
204
+ __decorateClass([
205
+ property()
206
+ ], OkThemePicker.prototype, "mode");
207
+ __decorateClass([
208
+ property({ type: Boolean, attribute: "hide-mode" })
209
+ ], OkThemePicker.prototype, "hideMode");
210
+ __decorateClass([
211
+ property({ attribute: false })
212
+ ], OkThemePicker.prototype, "palettes");
213
+ __decorateClass([
214
+ property({ attribute: false })
215
+ ], OkThemePicker.prototype, "labels");
216
+ define("ok-theme-picker", OkThemePicker);
217
+ export {
218
+ DEFAULT_PALETTES,
219
+ OkThemePicker,
220
+ applyPalette
221
+ };
package/dist/ok-tree.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { LitElement, css, html } from "lit";
2
2
  import { property, state } from "lit/decorators.js";
3
3
  import { define } from "./define.js";
4
- import { q as iconChevronForwardOutline, o as okIcon } from "./shared/icons.js";
4
+ import { g as iconChevronForwardOutline, o as okIcon } from "./shared/icons.js";
5
5
  var __defProp = Object.defineProperty;
6
6
  var __decorateClass = (decorators, target, key, kind) => {
7
7
  var result = void 0;
package/dist/ok-video.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { LitElement, css, html } from "lit";
2
2
  import { property, state, query } from "lit/decorators.js";
3
3
  import { define } from "./define.js";
4
- import { M as iconExpandOutline, o as okIcon } from "./shared/icons.js";
4
+ import { H as iconExpandOutline, o as okIcon } from "./shared/icons.js";
5
5
  var __defProp = Object.defineProperty;
6
6
  var __decorateClass = (decorators, target, key, kind) => {
7
7
  var result = void 0;
@@ -2,7 +2,7 @@ import { LitElement, css, nothing, html } from "lit";
2
2
  import { property, state } from "lit/decorators.js";
3
3
  import { repeat } from "lit/directives/repeat.js";
4
4
  import { define } from "./define.js";
5
- import { a as iconEllipsisVertical } from "./shared/icons.js";
5
+ import { s as iconEllipsisVertical } from "./shared/icons.js";
6
6
  var __defProp = Object.defineProperty;
7
7
  var __decorateClass = (decorators, target, key, kind) => {
8
8
  var result = void 0;