@tatamicks/select 0.0.1 → 0.1.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.
package/dist/index.mjs CHANGED
@@ -1,815 +1,456 @@
1
- import $e, { useCallback as L, useId as yr, forwardRef as Rr, useRef as Er, useImperativeHandle as xr, useMemo as K } from "react";
2
- import { HorizontalAlign as ke, VerticalAlign as De, toPx as Y, NoteMode as Ie, validationDefinition as Sr, fontStyleDefinition as jr, placeholderDefinition as Cr, universalProperties as wr } from "@tatamicks/core";
3
- var H = { exports: {} }, M = {};
1
+ import ce, { useCallback as j, useId as ue, forwardRef as fe, useRef as de, useImperativeHandle as me, useMemo as P } from "react";
2
+ import { ColorPicker as be, HorizontalAlign as C, VerticalAlign as q, toPx as T, NoteMode as J, validationDefinition as pe, fontStyleDefinition as he, placeholderDefinition as _e, universalProperties as ve } from "@tatamicks/core";
3
+ var I = { exports: {} }, N = {};
4
4
  /**
5
5
  * @license React
6
- * react-jsx-runtime.production.min.js
6
+ * react-jsx-runtime.production.js
7
7
  *
8
- * Copyright (c) Facebook, Inc. and its affiliates.
8
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
9
9
  *
10
10
  * This source code is licensed under the MIT license found in the
11
11
  * LICENSE file in the root directory of this source tree.
12
12
  */
13
- var Fe;
14
- function Tr() {
15
- if (Fe) return M;
16
- Fe = 1;
17
- var n = $e, v = Symbol.for("react.element"), T = Symbol.for("react.fragment"), f = Object.prototype.hasOwnProperty, _ = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, D = { key: !0, ref: !0, __self: !0, __source: !0 };
18
- function I(j, b, k) {
19
- var E, C = {}, s = null, u = null;
20
- k !== void 0 && (s = "" + k), b.key !== void 0 && (s = "" + b.key), b.ref !== void 0 && (u = b.ref);
21
- for (E in b) f.call(b, E) && !D.hasOwnProperty(E) && (C[E] = b[E]);
22
- if (j && j.defaultProps) for (E in b = j.defaultProps, b) C[E] === void 0 && (C[E] = b[E]);
23
- return { $$typeof: v, type: j, key: s, ref: u, props: C, _owner: _.current };
13
+ var X;
14
+ function ge() {
15
+ if (X) return N;
16
+ X = 1;
17
+ var t = Symbol.for("react.transitional.element"), c = Symbol.for("react.fragment");
18
+ function _(l, i, h) {
19
+ var g = null;
20
+ if (h !== void 0 && (g = "" + h), i.key !== void 0 && (g = "" + i.key), "key" in i) {
21
+ h = {};
22
+ for (var v in i)
23
+ v !== "key" && (h[v] = i[v]);
24
+ } else h = i;
25
+ return i = h.ref, {
26
+ $$typeof: t,
27
+ type: l,
28
+ key: g,
29
+ ref: i !== void 0 ? i : null,
30
+ props: h
31
+ };
24
32
  }
25
- return M.Fragment = T, M.jsx = I, M.jsxs = I, M;
33
+ return N.Fragment = c, N.jsx = _, N.jsxs = _, N;
26
34
  }
27
- var U = {};
35
+ var O = {};
28
36
  /**
29
37
  * @license React
30
38
  * react-jsx-runtime.development.js
31
39
  *
32
- * Copyright (c) Facebook, Inc. and its affiliates.
40
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
33
41
  *
34
42
  * This source code is licensed under the MIT license found in the
35
43
  * LICENSE file in the root directory of this source tree.
36
44
  */
37
- var Ae;
38
- function Or() {
39
- return Ae || (Ae = 1, process.env.NODE_ENV !== "production" && (function() {
40
- var n = $e, v = Symbol.for("react.element"), T = Symbol.for("react.portal"), f = Symbol.for("react.fragment"), _ = Symbol.for("react.strict_mode"), D = Symbol.for("react.profiler"), I = Symbol.for("react.provider"), j = Symbol.for("react.context"), b = Symbol.for("react.forward_ref"), k = Symbol.for("react.suspense"), E = Symbol.for("react.suspense_list"), C = Symbol.for("react.memo"), s = Symbol.for("react.lazy"), u = Symbol.for("react.offscreen"), y = Symbol.iterator, a = "@@iterator";
41
- function x(e) {
42
- if (e === null || typeof e != "object")
43
- return null;
44
- var r = y && e[y] || e[a];
45
- return typeof r == "function" ? r : null;
46
- }
47
- var O = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
48
- function g(e) {
49
- {
50
- for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), o = 1; o < r; o++)
51
- t[o - 1] = arguments[o];
52
- X("error", e, t);
53
- }
54
- }
55
- function X(e, r, t) {
56
- {
57
- var o = O.ReactDebugCurrentFrame, c = o.getStackAddendum();
58
- c !== "" && (r += "%s", t = t.concat([c]));
59
- var d = t.map(function(l) {
60
- return String(l);
61
- });
62
- d.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, d);
63
- }
64
- }
65
- var Ye = !1, Be = !1, Ve = !1, Me = !1, Ue = !1, ie;
66
- ie = Symbol.for("react.module.reference");
67
- function ze(e) {
68
- return !!(typeof e == "string" || typeof e == "function" || e === f || e === D || Ue || e === _ || e === k || e === E || Me || e === u || Ye || Be || Ve || typeof e == "object" && e !== null && (e.$$typeof === s || e.$$typeof === C || e.$$typeof === I || e.$$typeof === j || e.$$typeof === b || // This needs to include all possible module reference object
69
- // types supported by any Flight configuration anywhere since
70
- // we don't know which Flight build this will end up being used
71
- // with.
72
- e.$$typeof === ie || e.getModuleId !== void 0));
73
- }
74
- function Ge(e, r, t) {
75
- var o = e.displayName;
76
- if (o)
77
- return o;
78
- var c = r.displayName || r.name || "";
79
- return c !== "" ? t + "(" + c + ")" : t;
80
- }
81
- function le(e) {
82
- return e.displayName || "Context";
83
- }
84
- function F(e) {
85
- if (e == null)
86
- return null;
87
- if (typeof e.tag == "number" && g("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
88
- return e.displayName || e.name || null;
89
- if (typeof e == "string")
90
- return e;
45
+ var H;
46
+ function Ee() {
47
+ return H || (H = 1, process.env.NODE_ENV !== "production" && (function() {
48
+ function t(e) {
49
+ if (e == null) return null;
50
+ if (typeof e == "function")
51
+ return e.$$typeof === le ? null : e.displayName || e.name || null;
52
+ if (typeof e == "string") return e;
91
53
  switch (e) {
92
54
  case f:
93
55
  return "Fragment";
94
- case T:
95
- return "Portal";
96
- case D:
56
+ case k:
97
57
  return "Profiler";
98
- case _:
58
+ case R:
99
59
  return "StrictMode";
100
- case k:
60
+ case re:
101
61
  return "Suspense";
102
- case E:
62
+ case ne:
103
63
  return "SuspenseList";
64
+ case ae:
65
+ return "Activity";
104
66
  }
105
67
  if (typeof e == "object")
106
- switch (e.$$typeof) {
107
- case j:
108
- var r = e;
109
- return le(r) + ".Consumer";
110
- case I:
111
- var t = e;
112
- return le(t._context) + ".Provider";
113
- case b:
114
- return Ge(e, e.render, "ForwardRef");
115
- case C:
116
- var o = e.displayName || null;
117
- return o !== null ? o : F(e.type) || "Memo";
118
- case s: {
119
- var c = e, d = c._payload, l = c._init;
68
+ switch (typeof e.tag == "number" && console.error(
69
+ "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
70
+ ), e.$$typeof) {
71
+ case r:
72
+ return "Portal";
73
+ case ee:
74
+ return e.displayName || "Context";
75
+ case D:
76
+ return (e._context.displayName || "Context") + ".Consumer";
77
+ case te:
78
+ var n = e.render;
79
+ return e = e.displayName, e || (e = n.displayName || n.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
80
+ case oe:
81
+ return n = e.displayName || null, n !== null ? n : t(e.type) || "Memo";
82
+ case $:
83
+ n = e._payload, e = e._init;
120
84
  try {
121
- return F(l(d));
85
+ return t(e(n));
122
86
  } catch {
123
- return null;
124
87
  }
125
- }
126
88
  }
127
89
  return null;
128
90
  }
129
- var A = Object.assign, B = 0, se, ue, ce, fe, de, ve, pe;
130
- function be() {
131
- }
132
- be.__reactDisabledLog = !0;
133
- function Je() {
134
- {
135
- if (B === 0) {
136
- se = console.log, ue = console.info, ce = console.warn, fe = console.error, de = console.group, ve = console.groupCollapsed, pe = console.groupEnd;
137
- var e = {
138
- configurable: !0,
139
- enumerable: !0,
140
- value: be,
141
- writable: !0
142
- };
143
- Object.defineProperties(console, {
144
- info: e,
145
- log: e,
146
- warn: e,
147
- error: e,
148
- group: e,
149
- groupCollapsed: e,
150
- groupEnd: e
151
- });
152
- }
153
- B++;
154
- }
155
- }
156
- function qe() {
157
- {
158
- if (B--, B === 0) {
159
- var e = {
160
- configurable: !0,
161
- enumerable: !0,
162
- writable: !0
163
- };
164
- Object.defineProperties(console, {
165
- log: A({}, e, {
166
- value: se
167
- }),
168
- info: A({}, e, {
169
- value: ue
170
- }),
171
- warn: A({}, e, {
172
- value: ce
173
- }),
174
- error: A({}, e, {
175
- value: fe
176
- }),
177
- group: A({}, e, {
178
- value: de
179
- }),
180
- groupCollapsed: A({}, e, {
181
- value: ve
182
- }),
183
- groupEnd: A({}, e, {
184
- value: pe
185
- })
186
- });
187
- }
188
- B < 0 && g("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
189
- }
190
- }
191
- var Z = O.ReactCurrentDispatcher, Q;
192
- function z(e, r, t) {
193
- {
194
- if (Q === void 0)
195
- try {
196
- throw Error();
197
- } catch (c) {
198
- var o = c.stack.trim().match(/\n( *(at )?)/);
199
- Q = o && o[1] || "";
200
- }
201
- return `
202
- ` + Q + e;
203
- }
204
- }
205
- var ee = !1, G;
206
- {
207
- var Ke = typeof WeakMap == "function" ? WeakMap : Map;
208
- G = new Ke();
91
+ function c(e) {
92
+ return "" + e;
209
93
  }
210
- function he(e, r) {
211
- if (!e || ee)
212
- return "";
213
- {
214
- var t = G.get(e);
215
- if (t !== void 0)
216
- return t;
217
- }
218
- var o;
219
- ee = !0;
220
- var c = Error.prepareStackTrace;
221
- Error.prepareStackTrace = void 0;
222
- var d;
223
- d = Z.current, Z.current = null, Je();
94
+ function _(e) {
224
95
  try {
225
- if (r) {
226
- var l = function() {
227
- throw Error();
228
- };
229
- if (Object.defineProperty(l.prototype, "props", {
230
- set: function() {
231
- throw Error();
232
- }
233
- }), typeof Reflect == "object" && Reflect.construct) {
234
- try {
235
- Reflect.construct(l, []);
236
- } catch (w) {
237
- o = w;
238
- }
239
- Reflect.construct(e, [], l);
240
- } else {
241
- try {
242
- l.call();
243
- } catch (w) {
244
- o = w;
245
- }
246
- e.call(l.prototype);
247
- }
248
- } else {
249
- try {
250
- throw Error();
251
- } catch (w) {
252
- o = w;
253
- }
254
- e();
255
- }
256
- } catch (w) {
257
- if (w && o && typeof w.stack == "string") {
258
- for (var i = w.stack.split(`
259
- `), S = o.stack.split(`
260
- `), h = i.length - 1, m = S.length - 1; h >= 1 && m >= 0 && i[h] !== S[m]; )
261
- m--;
262
- for (; h >= 1 && m >= 0; h--, m--)
263
- if (i[h] !== S[m]) {
264
- if (h !== 1 || m !== 1)
265
- do
266
- if (h--, m--, m < 0 || i[h] !== S[m]) {
267
- var P = `
268
- ` + i[h].replace(" at new ", " at ");
269
- return e.displayName && P.includes("<anonymous>") && (P = P.replace("<anonymous>", e.displayName)), typeof e == "function" && G.set(e, P), P;
270
- }
271
- while (h >= 1 && m >= 0);
272
- break;
273
- }
274
- }
275
- } finally {
276
- ee = !1, Z.current = d, qe(), Error.prepareStackTrace = c;
277
- }
278
- var W = e ? e.displayName || e.name : "", N = W ? z(W) : "";
279
- return typeof e == "function" && G.set(e, N), N;
280
- }
281
- function He(e, r, t) {
282
- return he(e, !1);
283
- }
284
- function Xe(e) {
285
- var r = e.prototype;
286
- return !!(r && r.isReactComponent);
287
- }
288
- function J(e, r, t) {
289
- if (e == null)
290
- return "";
291
- if (typeof e == "function")
292
- return he(e, Xe(e));
293
- if (typeof e == "string")
294
- return z(e);
295
- switch (e) {
296
- case k:
297
- return z("Suspense");
298
- case E:
299
- return z("SuspenseList");
300
- }
301
- if (typeof e == "object")
302
- switch (e.$$typeof) {
303
- case b:
304
- return He(e.render);
305
- case C:
306
- return J(e.type, r, t);
307
- case s: {
308
- var o = e, c = o._payload, d = o._init;
309
- try {
310
- return J(d(c), r, t);
311
- } catch {
312
- }
313
- }
314
- }
315
- return "";
316
- }
317
- var V = Object.prototype.hasOwnProperty, ge = {}, me = O.ReactDebugCurrentFrame;
318
- function q(e) {
319
- if (e) {
320
- var r = e._owner, t = J(e.type, e._source, r ? r.type : null);
321
- me.setExtraStackFrame(t);
322
- } else
323
- me.setExtraStackFrame(null);
324
- }
325
- function Ze(e, r, t, o, c) {
326
- {
327
- var d = Function.call.bind(V);
328
- for (var l in e)
329
- if (d(e, l)) {
330
- var i = void 0;
331
- try {
332
- if (typeof e[l] != "function") {
333
- var S = Error((o || "React class") + ": " + t + " type `" + l + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[l] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
334
- throw S.name = "Invariant Violation", S;
335
- }
336
- i = e[l](r, l, o, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
337
- } catch (h) {
338
- i = h;
339
- }
340
- i && !(i instanceof Error) && (q(c), g("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", o || "React class", t, l, typeof i), q(null)), i instanceof Error && !(i.message in ge) && (ge[i.message] = !0, q(c), g("Failed %s type: %s", t, i.message), q(null));
341
- }
96
+ c(e);
97
+ var n = !1;
98
+ } catch {
99
+ n = !0;
342
100
  }
343
- }
344
- var Qe = Array.isArray;
345
- function re(e) {
346
- return Qe(e);
347
- }
348
- function er(e) {
349
- {
350
- var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
351
- return t;
101
+ if (n) {
102
+ n = console;
103
+ var u = n.error, d = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
104
+ return u.call(
105
+ n,
106
+ "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
107
+ d
108
+ ), c(e);
352
109
  }
353
110
  }
354
- function rr(e) {
111
+ function l(e) {
112
+ if (e === f) return "<>";
113
+ if (typeof e == "object" && e !== null && e.$$typeof === $)
114
+ return "<...>";
355
115
  try {
356
- return _e(e), !1;
116
+ var n = t(e);
117
+ return n ? "<" + n + ">" : "<...>";
357
118
  } catch {
358
- return !0;
119
+ return "<...>";
359
120
  }
360
121
  }
361
- function _e(e) {
362
- return "" + e;
363
- }
364
- function ye(e) {
365
- if (rr(e))
366
- return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", er(e)), _e(e);
122
+ function i() {
123
+ var e = L.A;
124
+ return e === null ? null : e.getOwner();
367
125
  }
368
- var Re = O.ReactCurrentOwner, tr = {
369
- key: !0,
370
- ref: !0,
371
- __self: !0,
372
- __source: !0
373
- }, Ee, xe;
374
- function nr(e) {
375
- if (V.call(e, "ref")) {
376
- var r = Object.getOwnPropertyDescriptor(e, "ref").get;
377
- if (r && r.isReactWarning)
378
- return !1;
379
- }
380
- return e.ref !== void 0;
126
+ function h() {
127
+ return Error("react-stack-top-frame");
381
128
  }
382
- function or(e) {
383
- if (V.call(e, "key")) {
384
- var r = Object.getOwnPropertyDescriptor(e, "key").get;
385
- if (r && r.isReactWarning)
386
- return !1;
129
+ function g(e) {
130
+ if (M.call(e, "key")) {
131
+ var n = Object.getOwnPropertyDescriptor(e, "key").get;
132
+ if (n && n.isReactWarning) return !1;
387
133
  }
388
134
  return e.key !== void 0;
389
135
  }
390
- function ar(e, r) {
391
- typeof e.ref == "string" && Re.current;
392
- }
393
- function ir(e, r) {
394
- {
395
- var t = function() {
396
- Ee || (Ee = !0, g("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
397
- };
398
- t.isReactWarning = !0, Object.defineProperty(e, "key", {
399
- get: t,
400
- configurable: !0
401
- });
136
+ function v(e, n) {
137
+ function u() {
138
+ V || (V = !0, console.error(
139
+ "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
140
+ n
141
+ ));
402
142
  }
403
- }
404
- function lr(e, r) {
405
- {
406
- var t = function() {
407
- xe || (xe = !0, g("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
408
- };
409
- t.isReactWarning = !0, Object.defineProperty(e, "ref", {
410
- get: t,
411
- configurable: !0
412
- });
413
- }
414
- }
415
- var sr = function(e, r, t, o, c, d, l) {
416
- var i = {
417
- // This tag allows us to uniquely identify this as a React Element
418
- $$typeof: v,
419
- // Built-in properties that belong on the element
143
+ u.isReactWarning = !0, Object.defineProperty(e, "key", {
144
+ get: u,
145
+ configurable: !0
146
+ });
147
+ }
148
+ function E() {
149
+ var e = t(this.type);
150
+ return W[e] || (W[e] = !0, console.error(
151
+ "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
152
+ )), e = this.props.ref, e !== void 0 ? e : null;
153
+ }
154
+ function S(e, n, u, d, A, F) {
155
+ var m = u.ref;
156
+ return e = {
157
+ $$typeof: p,
420
158
  type: e,
421
- key: r,
422
- ref: t,
423
- props: l,
424
- // Record the component responsible for creating this element.
159
+ key: n,
160
+ props: u,
425
161
  _owner: d
426
- };
427
- return i._store = {}, Object.defineProperty(i._store, "validated", {
162
+ }, (m !== void 0 ? m : null) !== null ? Object.defineProperty(e, "ref", {
163
+ enumerable: !1,
164
+ get: E
165
+ }) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
428
166
  configurable: !1,
429
167
  enumerable: !1,
430
168
  writable: !0,
431
- value: !1
432
- }), Object.defineProperty(i, "_self", {
169
+ value: 0
170
+ }), Object.defineProperty(e, "_debugInfo", {
433
171
  configurable: !1,
434
172
  enumerable: !1,
435
- writable: !1,
436
- value: o
437
- }), Object.defineProperty(i, "_source", {
173
+ writable: !0,
174
+ value: null
175
+ }), Object.defineProperty(e, "_debugStack", {
438
176
  configurable: !1,
439
177
  enumerable: !1,
440
- writable: !1,
441
- value: c
442
- }), Object.freeze && (Object.freeze(i.props), Object.freeze(i)), i;
443
- };
444
- function ur(e, r, t, o, c) {
445
- {
446
- var d, l = {}, i = null, S = null;
447
- t !== void 0 && (ye(t), i = "" + t), or(r) && (ye(r.key), i = "" + r.key), nr(r) && (S = r.ref, ar(r, c));
448
- for (d in r)
449
- V.call(r, d) && !tr.hasOwnProperty(d) && (l[d] = r[d]);
450
- if (e && e.defaultProps) {
451
- var h = e.defaultProps;
452
- for (d in h)
453
- l[d] === void 0 && (l[d] = h[d]);
454
- }
455
- if (i || S) {
456
- var m = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
457
- i && ir(l, m), S && lr(l, m);
458
- }
459
- return sr(e, i, S, c, o, Re.current, l);
460
- }
461
- }
462
- var te = O.ReactCurrentOwner, Se = O.ReactDebugCurrentFrame;
463
- function $(e) {
464
- if (e) {
465
- var r = e._owner, t = J(e.type, e._source, r ? r.type : null);
466
- Se.setExtraStackFrame(t);
467
- } else
468
- Se.setExtraStackFrame(null);
469
- }
470
- var ne;
471
- ne = !1;
472
- function oe(e) {
473
- return typeof e == "object" && e !== null && e.$$typeof === v;
474
- }
475
- function je() {
476
- {
477
- if (te.current) {
478
- var e = F(te.current.type);
479
- if (e)
480
- return `
481
-
482
- Check the render method of \`` + e + "`.";
483
- }
484
- return "";
485
- }
486
- }
487
- function cr(e) {
488
- return "";
489
- }
490
- var Ce = {};
491
- function fr(e) {
492
- {
493
- var r = je();
494
- if (!r) {
495
- var t = typeof e == "string" ? e : e.displayName || e.name;
496
- t && (r = `
497
-
498
- Check the top-level render call using <` + t + ">.");
499
- }
500
- return r;
501
- }
502
- }
503
- function we(e, r) {
504
- {
505
- if (!e._store || e._store.validated || e.key != null)
506
- return;
507
- e._store.validated = !0;
508
- var t = fr(r);
509
- if (Ce[t])
510
- return;
511
- Ce[t] = !0;
512
- var o = "";
513
- e && e._owner && e._owner !== te.current && (o = " It was passed a child from " + F(e._owner.type) + "."), $(e), g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, o), $(null);
514
- }
515
- }
516
- function Te(e, r) {
517
- {
518
- if (typeof e != "object")
519
- return;
520
- if (re(e))
521
- for (var t = 0; t < e.length; t++) {
522
- var o = e[t];
523
- oe(o) && we(o, r);
524
- }
525
- else if (oe(e))
526
- e._store && (e._store.validated = !0);
527
- else if (e) {
528
- var c = x(e);
529
- if (typeof c == "function" && c !== e.entries)
530
- for (var d = c.call(e), l; !(l = d.next()).done; )
531
- oe(l.value) && we(l.value, r);
532
- }
533
- }
534
- }
535
- function dr(e) {
536
- {
537
- var r = e.type;
538
- if (r == null || typeof r == "string")
539
- return;
540
- var t;
541
- if (typeof r == "function")
542
- t = r.propTypes;
543
- else if (typeof r == "object" && (r.$$typeof === b || // Note: Memo only checks outer props here.
544
- // Inner props are checked in the reconciler.
545
- r.$$typeof === C))
546
- t = r.propTypes;
547
- else
548
- return;
549
- if (t) {
550
- var o = F(r);
551
- Ze(t, e.props, "prop", o, e);
552
- } else if (r.PropTypes !== void 0 && !ne) {
553
- ne = !0;
554
- var c = F(r);
555
- g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", c || "Unknown");
556
- }
557
- typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
558
- }
559
- }
560
- function vr(e) {
561
- {
562
- for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
563
- var o = r[t];
564
- if (o !== "children" && o !== "key") {
565
- $(e), g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", o), $(null);
566
- break;
567
- }
568
- }
569
- e.ref !== null && ($(e), g("Invalid attribute `ref` supplied to `React.Fragment`."), $(null));
570
- }
571
- }
572
- var Oe = {};
573
- function Pe(e, r, t, o, c, d) {
574
- {
575
- var l = ze(e);
576
- if (!l) {
577
- var i = "";
578
- (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (i += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
579
- var S = cr();
580
- S ? i += S : i += je();
581
- var h;
582
- e === null ? h = "null" : re(e) ? h = "array" : e !== void 0 && e.$$typeof === v ? (h = "<" + (F(e.type) || "Unknown") + " />", i = " Did you accidentally export a JSX literal instead of a component?") : h = typeof e, g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", h, i);
583
- }
584
- var m = ur(e, r, t, c, d);
585
- if (m == null)
586
- return m;
587
- if (l) {
588
- var P = r.children;
589
- if (P !== void 0)
590
- if (o)
591
- if (re(P)) {
592
- for (var W = 0; W < P.length; W++)
593
- Te(P[W], e);
594
- Object.freeze && Object.freeze(P);
595
- } else
596
- g("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
597
- else
598
- Te(P, e);
599
- }
600
- if (V.call(r, "key")) {
601
- var N = F(e), w = Object.keys(r).filter(function(_r) {
602
- return _r !== "key";
603
- }), ae = w.length > 0 ? "{key: someKey, " + w.join(": ..., ") + ": ...}" : "{key: someKey}";
604
- if (!Oe[N + ae]) {
605
- var mr = w.length > 0 ? "{" + w.join(": ..., ") + ": ...}" : "{}";
606
- g(`A props object containing a "key" prop is being spread into JSX:
178
+ writable: !0,
179
+ value: A
180
+ }), Object.defineProperty(e, "_debugTask", {
181
+ configurable: !1,
182
+ enumerable: !1,
183
+ writable: !0,
184
+ value: F
185
+ }), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
186
+ }
187
+ function w(e, n, u, d, A, F) {
188
+ var m = n.children;
189
+ if (m !== void 0)
190
+ if (d)
191
+ if (ie(m)) {
192
+ for (d = 0; d < m.length; d++)
193
+ x(m[d]);
194
+ Object.freeze && Object.freeze(m);
195
+ } else
196
+ console.error(
197
+ "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
198
+ );
199
+ else x(m);
200
+ if (M.call(n, "key")) {
201
+ m = t(e);
202
+ var y = Object.keys(n).filter(function(se) {
203
+ return se !== "key";
204
+ });
205
+ d = 0 < y.length ? "{key: someKey, " + y.join(": ..., ") + ": ...}" : "{key: someKey}", U[m + d] || (y = 0 < y.length ? "{" + y.join(": ..., ") + ": ...}" : "{}", console.error(
206
+ `A props object containing a "key" prop is being spread into JSX:
607
207
  let props = %s;
608
208
  <%s {...props} />
609
209
  React keys must be passed directly to JSX without using spread:
610
210
  let props = %s;
611
- <%s key={someKey} {...props} />`, ae, N, mr, N), Oe[N + ae] = !0;
612
- }
613
- }
614
- return e === f ? vr(m) : dr(m), m;
211
+ <%s key={someKey} {...props} />`,
212
+ d,
213
+ m,
214
+ y,
215
+ m
216
+ ), U[m + d] = !0);
615
217
  }
218
+ if (m = null, u !== void 0 && (_(u), m = "" + u), g(n) && (_(n.key), m = "" + n.key), "key" in n) {
219
+ u = {};
220
+ for (var z in n)
221
+ z !== "key" && (u[z] = n[z]);
222
+ } else u = n;
223
+ return m && v(
224
+ u,
225
+ typeof e == "function" ? e.displayName || e.name || "Unknown" : e
226
+ ), S(
227
+ e,
228
+ m,
229
+ u,
230
+ i(),
231
+ A,
232
+ F
233
+ );
616
234
  }
617
- function pr(e, r, t) {
618
- return Pe(e, r, t, !0);
235
+ function x(e) {
236
+ a(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === $ && (e._payload.status === "fulfilled" ? a(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
619
237
  }
620
- function br(e, r, t) {
621
- return Pe(e, r, t, !1);
238
+ function a(e) {
239
+ return typeof e == "object" && e !== null && e.$$typeof === p;
622
240
  }
623
- var hr = br, gr = pr;
624
- U.Fragment = f, U.jsx = hr, U.jsxs = gr;
625
- })()), U;
241
+ var o = ce, p = Symbol.for("react.transitional.element"), r = Symbol.for("react.portal"), f = Symbol.for("react.fragment"), R = Symbol.for("react.strict_mode"), k = Symbol.for("react.profiler"), D = Symbol.for("react.consumer"), ee = Symbol.for("react.context"), te = Symbol.for("react.forward_ref"), re = Symbol.for("react.suspense"), ne = Symbol.for("react.suspense_list"), oe = Symbol.for("react.memo"), $ = Symbol.for("react.lazy"), ae = Symbol.for("react.activity"), le = Symbol.for("react.client.reference"), L = o.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, M = Object.prototype.hasOwnProperty, ie = Array.isArray, Y = console.createTask ? console.createTask : function() {
242
+ return null;
243
+ };
244
+ o = {
245
+ react_stack_bottom_frame: function(e) {
246
+ return e();
247
+ }
248
+ };
249
+ var V, W = {}, B = o.react_stack_bottom_frame.bind(
250
+ o,
251
+ h
252
+ )(), G = Y(l(h)), U = {};
253
+ O.Fragment = f, O.jsx = function(e, n, u) {
254
+ var d = 1e4 > L.recentlyCreatedOwnerStacks++;
255
+ return w(
256
+ e,
257
+ n,
258
+ u,
259
+ !1,
260
+ d ? Error("react-stack-top-frame") : B,
261
+ d ? Y(l(e)) : G
262
+ );
263
+ }, O.jsxs = function(e, n, u) {
264
+ var d = 1e4 > L.recentlyCreatedOwnerStacks++;
265
+ return w(
266
+ e,
267
+ n,
268
+ u,
269
+ !0,
270
+ d ? Error("react-stack-top-frame") : B,
271
+ d ? Y(l(e)) : G
272
+ );
273
+ };
274
+ })()), O;
626
275
  }
627
- var Ne;
628
- function Pr() {
629
- return Ne || (Ne = 1, process.env.NODE_ENV === "production" ? H.exports = Tr() : H.exports = Or()), H.exports;
276
+ var Z;
277
+ function Re() {
278
+ return Z || (Z = 1, process.env.NODE_ENV === "production" ? I.exports = ge() : I.exports = Ee()), I.exports;
630
279
  }
631
- var p = Pr();
632
- const kr = "_container_puorg_1", Dr = "_defaultSection_puorg_15", Ir = "_optionsList_puorg_35", Fr = "_optionItem_puorg_51", Ar = "_inputGroup_puorg_71", Nr = "_label_puorg_83", $r = "_input_puorg_71", Wr = "_colorInput_puorg_133", Lr = "_clearColorButton_puorg_163", Yr = "_removeButton_puorg_215", Br = "_addButton_puorg_269", R = {
633
- container: kr,
634
- defaultSection: Dr,
635
- optionsList: Ir,
636
- optionItem: Fr,
637
- inputGroup: Ar,
638
- label: Nr,
639
- input: $r,
640
- colorInput: Wr,
641
- clearColorButton: Lr,
642
- removeButton: Yr,
643
- addButton: Br
644
- }, We = ({
645
- value: n,
646
- onChange: v,
647
- readOnly: T = !1
280
+ var s = Re();
281
+ const xe = "_container_y9aws_1", we = "_defaultSection_y9aws_8", ke = "_optionsList_y9aws_18", ye = "_optionItem_y9aws_26", je = "_header_y9aws_35", Te = "_headerLabel_y9aws_42", Se = "_inputGroup_y9aws_48", Ne = "_label_y9aws_54", Oe = "_input_y9aws_48", Ae = "_removeButton_y9aws_122", Pe = "_addButton_y9aws_145", b = {
282
+ container: xe,
283
+ defaultSection: we,
284
+ optionsList: ke,
285
+ optionItem: ye,
286
+ header: je,
287
+ headerLabel: Te,
288
+ inputGroup: Se,
289
+ label: Ne,
290
+ input: Oe,
291
+ removeButton: Ae,
292
+ addButton: Pe
293
+ }, Q = ({
294
+ value: t,
295
+ onChange: c,
296
+ readOnly: _ = !1
648
297
  }) => {
649
- const { options: f, defaultOption: _ } = n, D = L(() => {
650
- const s = {
651
- label: `選択肢${f.length + 1}`,
652
- value: `option${f.length + 1}`
298
+ const { options: l, defaultOption: i } = t, h = j(() => {
299
+ const a = {
300
+ label: `選択肢${l.length + 1}`,
301
+ value: `option${l.length + 1}`
653
302
  };
654
- v({ ...n, options: [...f, s] });
655
- }, [f, n, v]), I = L(
656
- (s) => {
657
- var x;
658
- const u = f.filter((O, g) => g !== s), y = (x = f[s]) == null ? void 0 : x.value;
659
- v({ options: u, defaultOption: y !== void 0 && _ === y ? void 0 : _ });
303
+ c({ ...t, options: [...l, a] });
304
+ }, [l, t, c]), g = j(
305
+ (a) => {
306
+ var f;
307
+ const o = l.filter((R, k) => k !== a), p = (f = l[a]) == null ? void 0 : f.value;
308
+ c({ options: o, defaultOption: p !== void 0 && i === p ? void 0 : i });
660
309
  },
661
- [f, _, v]
662
- ), j = L(
663
- (s, u) => {
664
- const y = f.map(
665
- (a, x) => x === s ? { ...a, label: u } : a
310
+ [l, i, c]
311
+ ), v = j(
312
+ (a, o) => {
313
+ const p = l.map(
314
+ (r, f) => f === a ? { ...r, label: o } : r
666
315
  );
667
- v({ ...n, options: y });
316
+ c({ ...t, options: p });
668
317
  },
669
- [f, n, v]
670
- ), b = L(
671
- (s, u) => {
672
- var O;
673
- const y = (O = f[s]) == null ? void 0 : O.value, a = f.map(
674
- (g, X) => X === s ? { ...g, value: u } : g
318
+ [l, t, c]
319
+ ), E = j(
320
+ (a, o) => {
321
+ var R;
322
+ const p = (R = l[a]) == null ? void 0 : R.value, r = l.map(
323
+ (k, D) => D === a ? { ...k, value: o } : k
675
324
  );
676
- v({ options: a, defaultOption: _ === y ? u : _ });
325
+ c({ options: r, defaultOption: i === p ? o : i });
677
326
  },
678
- [f, _, v]
679
- ), k = L(
680
- (s, u) => {
681
- const y = f.map(
682
- (a, x) => x === s ? { ...a, color: u || void 0 } : a
327
+ [l, i, c]
328
+ ), S = j(
329
+ (a, o) => {
330
+ const p = l.map(
331
+ (r, f) => f === a ? { ...r, color: o || void 0 } : r
683
332
  );
684
- v({ ...n, options: y });
333
+ c({ ...t, options: p });
685
334
  },
686
- [f, n, v]
687
- ), E = L(
688
- (s) => {
689
- v({ ...n, defaultOption: s || void 0 });
335
+ [l, t, c]
336
+ ), w = j(
337
+ (a) => {
338
+ c({ ...t, defaultOption: a || void 0 });
690
339
  },
691
- [n, v]
692
- ), C = yr();
693
- return /* @__PURE__ */ p.jsxs("div", { className: R.container, children: [
694
- /* @__PURE__ */ p.jsxs("div", { className: R.defaultSection, children: [
695
- /* @__PURE__ */ p.jsx("label", { className: R.label, htmlFor: C, children: "初期選択値:" }),
696
- /* @__PURE__ */ p.jsxs(
340
+ [t, c]
341
+ ), x = ue();
342
+ return /* @__PURE__ */ s.jsxs("div", { className: b.container, children: [
343
+ /* @__PURE__ */ s.jsxs("div", { className: b.defaultSection, children: [
344
+ /* @__PURE__ */ s.jsx("label", { className: b.label, htmlFor: x, children: "初期選択値:" }),
345
+ /* @__PURE__ */ s.jsxs(
697
346
  "select",
698
347
  {
699
- id: C,
700
- className: R.input,
701
- value: _ || "",
702
- onChange: (s) => E(s.target.value),
703
- disabled: T,
348
+ id: x,
349
+ className: b.input,
350
+ value: i || "",
351
+ onChange: (a) => w(a.target.value),
352
+ disabled: _,
704
353
  children: [
705
- /* @__PURE__ */ p.jsx("option", { value: "", children: "未選択" }),
706
- f.map((s, u) => (
707
- // biome-ignore lint/suspicious/noArrayIndexKey: 選択肢の順序は重要で、固有IDがないためindexを使用
708
- /* @__PURE__ */ p.jsx("option", { value: s.value, children: s.label }, u)
709
- ))
354
+ /* @__PURE__ */ s.jsx("option", { value: "", children: "placeholder" }),
355
+ l.map((a, o) => {
356
+ const p = `option-${o}`;
357
+ return /* @__PURE__ */ s.jsx("option", { value: a.value, children: a.label }, p);
358
+ })
710
359
  ]
711
360
  }
712
361
  )
713
362
  ] }),
714
- /* @__PURE__ */ p.jsx("div", { className: R.optionsList, children: f.map((s, u) => (
715
- // biome-ignore lint/suspicious/noArrayIndexKey: 選択肢の順序は重要で、固有IDがないためindexを使用
716
- /* @__PURE__ */ p.jsxs("div", { className: R.optionItem, children: [
717
- /* @__PURE__ */ p.jsxs("div", { className: R.inputGroup, children: [
718
- /* @__PURE__ */ p.jsx("label", { className: R.label, htmlFor: `label-${u}`, children: "ラベル:" }),
719
- /* @__PURE__ */ p.jsx(
363
+ /* @__PURE__ */ s.jsx("div", { className: b.optionsList, children: l.map((a, o) => {
364
+ const p = `option-${o}`;
365
+ return /* @__PURE__ */ s.jsxs("div", { className: b.optionItem, children: [
366
+ /* @__PURE__ */ s.jsxs("div", { className: b.header, children: [
367
+ /* @__PURE__ */ s.jsxs("span", { className: b.headerLabel, children: [
368
+ "オプション",
369
+ o + 1
370
+ ] }),
371
+ /* @__PURE__ */ s.jsx(
372
+ "button",
373
+ {
374
+ type: "button",
375
+ className: b.removeButton,
376
+ onClick: () => g(o),
377
+ disabled: _ || l.length === 1,
378
+ title: "削除",
379
+ children: "削除"
380
+ }
381
+ )
382
+ ] }),
383
+ /* @__PURE__ */ s.jsxs("div", { className: b.inputGroup, children: [
384
+ /* @__PURE__ */ s.jsx("label", { className: b.label, htmlFor: `label-${o}`, children: "ラベル" }),
385
+ /* @__PURE__ */ s.jsx(
720
386
  "input",
721
387
  {
722
388
  type: "text",
723
- id: `label-${u}`,
724
- className: R.input,
725
- value: s.label,
726
- onChange: (y) => j(u, y.target.value),
727
- disabled: T,
389
+ id: `label-${o}`,
390
+ className: b.input,
391
+ value: a.label,
392
+ onChange: (r) => v(o, r.target.value),
393
+ disabled: _,
728
394
  placeholder: "表示名"
729
395
  }
730
396
  )
731
397
  ] }),
732
- /* @__PURE__ */ p.jsxs("div", { className: R.inputGroup, children: [
733
- /* @__PURE__ */ p.jsx("label", { className: R.label, htmlFor: `value-${u}`, children: "値:" }),
734
- /* @__PURE__ */ p.jsx(
398
+ /* @__PURE__ */ s.jsxs("div", { className: b.inputGroup, children: [
399
+ /* @__PURE__ */ s.jsx("label", { className: b.label, htmlFor: `value-${o}`, children: "" }),
400
+ /* @__PURE__ */ s.jsx(
735
401
  "input",
736
402
  {
737
403
  type: "text",
738
- id: `value-${u}`,
739
- className: R.input,
740
- value: s.value,
741
- onChange: (y) => b(u, y.target.value),
742
- disabled: T,
404
+ id: `value-${o}`,
405
+ className: b.input,
406
+ value: a.value,
407
+ onChange: (r) => E(o, r.target.value),
408
+ disabled: _,
743
409
  placeholder: "内部値"
744
410
  }
745
411
  )
746
412
  ] }),
747
- /* @__PURE__ */ p.jsxs("div", { className: R.inputGroup, children: [
748
- /* @__PURE__ */ p.jsx("label", { className: R.label, htmlFor: `color-${u}`, children: "色:" }),
749
- /* @__PURE__ */ p.jsx(
750
- "input",
413
+ /* @__PURE__ */ s.jsxs("div", { className: b.inputGroup, children: [
414
+ /* @__PURE__ */ s.jsx("label", { className: b.label, htmlFor: `color-${o}`, children: "" }),
415
+ /* @__PURE__ */ s.jsx(
416
+ be,
751
417
  {
752
- type: "color",
753
- id: `color-${u}`,
754
- className: R.colorInput,
755
- value: s.color || "#ffffff",
756
- onChange: (y) => k(u, y.target.value),
757
- disabled: T,
758
- title: "背景色"
759
- }
760
- ),
761
- s.color && /* @__PURE__ */ p.jsx(
762
- "button",
763
- {
764
- type: "button",
765
- className: R.clearColorButton,
766
- onClick: () => k(u, ""),
767
- disabled: T,
768
- title: "色をクリア",
769
- children: "✕"
418
+ value: a.color,
419
+ onChange: (r) => S(o, r || ""),
420
+ allowUndefined: !0,
421
+ placeholder: "色を選択"
770
422
  }
771
423
  )
772
- ] }),
773
- /* @__PURE__ */ p.jsx(
774
- "button",
775
- {
776
- type: "button",
777
- className: R.removeButton,
778
- onClick: () => I(u),
779
- disabled: T || f.length === 1,
780
- title: "削除",
781
- children: "×"
782
- }
783
- )
784
- ] }, u)
785
- )) }),
786
- /* @__PURE__ */ p.jsx(
424
+ ] })
425
+ ] }, p);
426
+ }) }),
427
+ /* @__PURE__ */ s.jsx(
787
428
  "button",
788
429
  {
789
430
  type: "button",
790
- className: R.addButton,
791
- onClick: D,
792
- disabled: T,
431
+ className: b.addButton,
432
+ onClick: h,
433
+ disabled: _,
793
434
  children: "+ 選択肢を追加"
794
435
  }
795
436
  )
796
437
  ] });
797
438
  };
798
- We.displayName = "OptionsEditor";
799
- const Le = Rr(({ props: n, value: v, onChange: T, onBlur: f, readOnly: _, mode: D }, I) => {
800
- const j = Er(null);
801
- xr(
802
- I,
439
+ Q.displayName = "OptionsEditor";
440
+ const K = fe(({ props: t, value: c, onChange: _, onBlur: l, readOnly: i, mode: h }, g) => {
441
+ const v = de(null);
442
+ me(
443
+ g,
803
444
  () => ({
804
445
  focus: () => {
805
- var a, x, O;
806
- (a = j.current) == null || a.focus(), j.current && !_ && ((O = (x = j.current).showPicker) == null || O.call(x));
446
+ var r, f, R;
447
+ (r = v.current) == null || r.focus(), v.current && !i && ((R = (f = v.current).showPicker) == null || R.call(f));
807
448
  }
808
449
  }),
809
- [_]
450
+ [i]
810
451
  );
811
- const b = K(() => v && n.selectConfig.options.find((a) => a.value === v) || null, [v, n.selectConfig.options]), k = K(() => {
812
- const a = {
452
+ const E = P(() => c && t.selectConfig.options.find((r) => r.value === c) || null, [c, t.selectConfig.options]), S = P(() => {
453
+ const r = {
813
454
  width: "100%",
814
455
  height: "100%",
815
456
  display: "flex",
@@ -818,37 +459,37 @@ const Le = Rr(({ props: n, value: v, onChange: T, onBlur: f, readOnly: _, mode:
818
459
  position: "relative"
819
460
  // 矢印アイコンの配置用
820
461
  };
821
- switch (n.justifyContent) {
822
- case ke.center:
823
- a.justifyContent = "center";
462
+ switch (t.justifyContent) {
463
+ case C.center:
464
+ r.justifyContent = "center";
824
465
  break;
825
- case ke.right:
826
- a.justifyContent = "flex-end";
466
+ case C.right:
467
+ r.justifyContent = "flex-end";
827
468
  break;
828
469
  default:
829
- a.justifyContent = "flex-start";
470
+ r.justifyContent = "flex-start";
830
471
  break;
831
472
  }
832
- switch (n.alignItems) {
833
- case De.top:
834
- a.alignItems = "flex-start";
473
+ switch (t.alignItems) {
474
+ case q.top:
475
+ r.alignItems = "flex-start";
835
476
  break;
836
- case De.bottom:
837
- a.alignItems = "flex-end";
477
+ case q.bottom:
478
+ r.alignItems = "flex-end";
838
479
  break;
839
480
  default:
840
- a.alignItems = "center";
481
+ r.alignItems = "center";
841
482
  break;
842
483
  }
843
- if (n.isIndividual)
844
- n.top && (a.paddingTop = Y.fromDim(n.top)), n.right && (a.paddingRight = Y.fromDim(n.right)), n.bottom && (a.paddingBottom = Y.fromDim(n.bottom)), n.left && (a.paddingLeft = Y.fromDim(n.left));
845
- else if (n.all) {
846
- const x = Y.fromDim(n.all);
847
- a.padding = `${x}px`;
484
+ if (t.isIndividual)
485
+ t.top && (r.paddingTop = T.fromDim(t.top)), t.right && (r.paddingRight = T.fromDim(t.right)), t.bottom && (r.paddingBottom = T.fromDim(t.bottom)), t.left && (r.paddingLeft = T.fromDim(t.left));
486
+ else if (t.all) {
487
+ const f = T.fromDim(t.all);
488
+ r.padding = `${f}px`;
848
489
  }
849
- return a;
850
- }, [n]), E = K(() => {
851
- const a = {
490
+ return c && (E != null && E.color) && (r.backgroundColor = E.color), r;
491
+ }, [t, c, E]), w = P(() => {
492
+ const r = {
852
493
  appearance: "none",
853
494
  // ネイティブの矢印を消す
854
495
  background: "transparent",
@@ -859,24 +500,35 @@ const Le = Rr(({ props: n, value: v, onChange: T, onBlur: f, readOnly: _, mode:
859
500
  // 右側に矢印用のスペース
860
501
  margin: 0,
861
502
  width: "100%",
503
+ // ブロック全体の幅に合わせる
862
504
  height: "100%",
863
505
  // ブロック全体の高さに合わせる
864
506
  boxSizing: "border-box",
865
507
  fontFamily: "inherit",
866
508
  cursor: "pointer",
867
509
  // readOnly時は操作を無効化(disabledを使わない)
868
- pointerEvents: _ ? "none" : "auto"
510
+ pointerEvents: i ? "none" : "auto"
869
511
  };
870
- return n.fontSize && (a.fontSize = Y.fromDim(n.fontSize)), n.color && (a.color = n.color), n.fontWeight && (a.fontWeight = "bold"), n.italic && (a.fontStyle = "italic"), v && (b != null && b.color) ? a.backgroundColor = b.color : a.backgroundColor = "transparent", a;
512
+ switch (t.justifyContent) {
513
+ case C.center:
514
+ r.textAlign = "center";
515
+ break;
516
+ case C.right:
517
+ r.textAlign = "right";
518
+ break;
519
+ default:
520
+ r.textAlign = "left";
521
+ break;
522
+ }
523
+ return t.fontSize && (r.fontSize = T.fromDim(t.fontSize)), t.color && (r.color = t.color), t.fontWeight && (r.fontWeight = "bold"), t.italic && (r.fontStyle = "italic"), r;
871
524
  }, [
872
- n.fontSize,
873
- n.color,
874
- n.fontWeight,
875
- n.italic,
876
- b,
877
- _,
878
- v
879
- ]), C = {
525
+ t.justifyContent,
526
+ t.fontSize,
527
+ t.color,
528
+ t.fontWeight,
529
+ t.italic,
530
+ i
531
+ ]), x = {
880
532
  position: "absolute",
881
533
  right: "8px",
882
534
  top: "50%",
@@ -887,54 +539,54 @@ const Le = Rr(({ props: n, value: v, onChange: T, onBlur: f, readOnly: _, mode:
887
539
  borderLeft: "4px solid transparent",
888
540
  borderRight: "4px solid transparent",
889
541
  borderTop: "5px solid",
890
- borderTopColor: n.color || "#6b7280"
891
- }, s = K(() => D === Ie.FORM ? !0 : D === Ie.EDIT ? !_ : !1, [D, _]), u = (a) => {
892
- const x = a.target.value;
893
- T(x === "" ? null : x);
894
- }, y = () => {
895
- f && f(v);
542
+ borderTopColor: t.color || "#6b7280"
543
+ }, a = P(() => h === J.FORM ? !0 : h === J.EDIT ? !i : !1, [h, i]), o = (r) => {
544
+ const f = r.target.value;
545
+ _(f === "" ? null : f);
546
+ }, p = () => {
547
+ l && l(c);
896
548
  };
897
- return /* @__PURE__ */ p.jsxs("div", { style: k, children: [
898
- /* @__PURE__ */ p.jsxs(
549
+ return /* @__PURE__ */ s.jsxs("div", { style: S, children: [
550
+ /* @__PURE__ */ s.jsxs(
899
551
  "select",
900
552
  {
901
- ref: j,
902
- value: v ?? "",
903
- onChange: u,
904
- onBlur: y,
905
- style: E,
553
+ ref: v,
554
+ value: c ?? "",
555
+ onChange: o,
556
+ onBlur: p,
557
+ style: w,
906
558
  children: [
907
- /* @__PURE__ */ p.jsx("option", { value: "", style: { backgroundColor: "#ffffff" }, children: "未選択" }),
908
- n.selectConfig.options.map((a) => /* @__PURE__ */ p.jsx(
559
+ /* @__PURE__ */ s.jsx("option", { value: "", style: { backgroundColor: "#ffffff" }, children: t.placeholder || "" }),
560
+ t.selectConfig.options.map((r) => /* @__PURE__ */ s.jsx(
909
561
  "option",
910
562
  {
911
- value: a.value,
912
- style: a.color ? { backgroundColor: a.color } : void 0,
913
- children: a.label
563
+ value: r.value,
564
+ style: r.color ? { backgroundColor: r.color } : void 0,
565
+ children: r.label
914
566
  },
915
- a.value
567
+ r.value
916
568
  ))
917
569
  ]
918
570
  }
919
571
  ),
920
- s && /* @__PURE__ */ p.jsx("div", { style: C })
572
+ a && /* @__PURE__ */ s.jsx("div", { style: x })
921
573
  ] });
922
574
  });
923
- Le.displayName = "SelectRenderer";
924
- const Ur = {
575
+ K.displayName = "SelectRenderer";
576
+ const De = {
925
577
  kind: "select",
926
578
  meta: {
927
579
  displayName: "セレクトボックス",
928
580
  description: "ドロップダウンから選択肢を選ぶ入力ブロック",
929
581
  defaultSize: { w: 4, h: 2 }
930
582
  },
931
- Renderer: Le,
583
+ Renderer: K,
932
584
  properties: {
933
- ...wr,
585
+ ...ve,
934
586
  // alignment + padding
935
- ...Cr,
936
- ...jr,
937
- ...Sr,
587
+ ..._e,
588
+ ...he,
589
+ ...pe,
938
590
  // Select固有プロパティ - 選択肢とデフォルト値を統合
939
591
  selectConfig: {
940
592
  defaultValue: {
@@ -946,16 +598,16 @@ const Ur = {
946
598
  },
947
599
  label: "選択肢設定",
948
600
  group: "セレクト",
949
- Component: We,
601
+ Component: Q,
950
602
  disableInMultiSelection: !0
951
603
  }
952
604
  },
953
- validateProps: (n) => n,
954
- validateValue: (n) => typeof n == "string" ? n : null
605
+ validateProps: (t) => t,
606
+ validateValue: (t) => typeof t == "string" ? t : null
955
607
  };
956
608
  export {
957
- We as OptionsEditor,
958
- Ur as SelectPlugin,
959
- Le as SelectRenderer
609
+ Q as OptionsEditor,
610
+ De as SelectPlugin,
611
+ K as SelectRenderer
960
612
  };
961
613
  //# sourceMappingURL=index.mjs.map