@loafacto/ui 0.18.1 → 0.20.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/map3d.js CHANGED
@@ -2,7 +2,7 @@ var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
4
  import { defineComponent, ref, shallowRef, computed, onMounted, onBeforeUnmount, watch, openBlock, createElementBlock, createElementVNode, createBlock, createCommentVNode, createVNode } from "vue";
5
- import { f as LfSelect, e as LfSegmented, c as LfIconButton, _ as _export_sfc } from "./LfSegmented-C35GdK7N.js";
5
+ import { f as LfSelect, e as LfSegmented, c as LfIconButton, _ as _export_sfc } from "./LfSegmented-BjlkJm2I.js";
6
6
  import { WebGLRenderer, LinearSRGBColorSpace, PCFSoftShadowMap, Vector3, Scene, OrthographicCamera, PerspectiveCamera, HemisphereLight, DirectionalLight, Group, MeshBasicMaterial, LineBasicMaterial, MeshStandardMaterial, DoubleSide, RingGeometry, MOUSE, TOUCH, Box3, LineSegments, LineLoop, Mesh, BoxGeometry, EdgesGeometry, BufferGeometry, Float32BufferAttribute, Vector2, Shape, ShapeGeometry, Raycaster, Color } from "three";
7
7
  import { OrbitControls } from "three/examples/jsm/controls/OrbitControls.js";
8
8
  import { mergeGeometries } from "three/examples/jsm/utils/BufferGeometryUtils.js";
@@ -29,7 +29,7 @@ export declare const useConfirmStore: import("pinia").StoreDefinition<"confirm",
29
29
  canConfirm: import("vue").ComputedRef<boolean>;
30
30
  ask: (opts: ConfirmOptions) => Promise<boolean>;
31
31
  resolve: (v: boolean) => void;
32
- }, "message" | "title" | "open" | "confirmText" | "cancelText" | "danger" | "requireText" | "requireLabel" | "typedText">, Pick<{
32
+ }, "title" | "message" | "open" | "confirmText" | "cancelText" | "danger" | "requireText" | "requireLabel" | "typedText">, Pick<{
33
33
  open: import("vue").Ref<boolean, boolean>;
34
34
  title: import("vue").Ref<string, string>;
35
35
  message: import("vue").Ref<string, string>;
package/dist/types.d.ts CHANGED
@@ -177,3 +177,58 @@ export interface AppShellLabels {
177
177
  toLightLong: string;
178
178
  toDarkLong: string;
179
179
  }
180
+ /** 상태 색의 뜻. 테마의 상태색에서 고른다(map3d 의 MapTone 과 같은 이름). */
181
+ export type LfTone = 'neutral' | 'accent' | 'success' | 'warning' | 'error' | 'info' | 'purple' | 'teal';
182
+ /** LfRankBars 한 줄 */
183
+ export interface LfRankItem {
184
+ key: string;
185
+ label: string;
186
+ value: number;
187
+ /** 넘으면 붉게 보이는 한계 */
188
+ limit?: number | null;
189
+ /** 막대 색을 직접 정할 때 */
190
+ tone?: LfTone;
191
+ }
192
+ /** LfChoiceCard 의 지표 한 칸 */
193
+ export interface LfChoiceMetric {
194
+ label: string;
195
+ value: string | number;
196
+ tone?: 'success' | 'warning' | 'error' | 'info';
197
+ }
198
+ /** LfCellGrid 의 칸 하나. row · col 은 1부터. */
199
+ export interface LfCell {
200
+ id: string;
201
+ row: number;
202
+ col: number;
203
+ tone?: LfTone;
204
+ /** 0~1 — 칸 아래에서 차오르는 채움(점유율) */
205
+ fill?: number;
206
+ /** 칸 안의 짧은 글자(2~3자) */
207
+ text?: string;
208
+ /** 마우스를 올렸을 때 · 읽어 줄 설명 */
209
+ title?: string;
210
+ /** 막힘 — 빗금 */
211
+ blocked?: boolean;
212
+ disabled?: boolean;
213
+ }
214
+ /** LfStatusTile 의 보조 줄 */
215
+ export interface LfStatusTileLine {
216
+ label?: string;
217
+ value: string | number;
218
+ }
219
+ /** LfGridEditor 의 열(보통 주 · 월) */
220
+ export interface LfGridColumn {
221
+ key: string;
222
+ label: string;
223
+ /** 머리 아래 작은 글자(날짜 범위) */
224
+ sub?: string;
225
+ /** 고칠 수 없는 열(지난 주) */
226
+ readonly?: boolean;
227
+ }
228
+ /** LfGridEditor 의 줄(보통 품목) */
229
+ export interface LfGridRow {
230
+ key: string;
231
+ label: string;
232
+ sub?: string;
233
+ readonly?: boolean;
234
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loafacto/ui",
3
- "version": "0.18.1",
3
+ "version": "0.20.0",
4
4
  "description": "Loafacto 공용 UI — 테마(시맨틱 팔레트 파생), 애플리케이션 셸, 공통 오버레이, Vuetify 없는 프리미티브",
5
5
  "type": "module",
6
6
  "files": [
@@ -1,455 +0,0 @@
1
- import { defineComponent, computed, openBlock, createElementBlock, normalizeStyle, toDisplayString, createCommentVNode, createElementVNode, createBlock, resolveDynamicComponent, normalizeClass, withCtx, createTextVNode, renderSlot, useAttrs, useModel, useId, mergeProps, unref, withDirectives, isRef, Fragment, renderList, vModelSelect, createVNode, mergeModels, useTemplateRef, ref, watch, nextTick, onMounted, onBeforeUnmount } from "vue";
2
- const _export_sfc = (sfc, props) => {
3
- const target = sfc.__vccOpts || sfc;
4
- for (const [key, val] of props) {
5
- target[key] = val;
6
- }
7
- return target;
8
- };
9
- const LF_ICONS = {
10
- close: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z",
11
- search: "M15.5 14h-.79l-.28-.27A6.47 6.47 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19 15.5 14zm-6 0A4.5 4.5 0 1 1 14 9.5 4.5 4.5 0 0 1 9.5 14z",
12
- check: "M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z",
13
- check_circle: "M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z",
14
- info: "M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z",
15
- warning: "M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z",
16
- error: "M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z",
17
- expand_more: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z",
18
- expand_less: "M12 8.83 16.59 13.41 18 12l-6-6-6 6 1.41 1.41z",
19
- chevron_left: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z",
20
- chevron_right: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",
21
- arrow_back: "M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z",
22
- arrow_upward: "M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8z",
23
- arrow_downward: "M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z",
24
- add: "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z",
25
- remove: "M19 13H5v-2h14z",
26
- edit: "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04a1 1 0 0 0 0-1.41l-2.34-2.34a1 1 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z",
27
- delete: "M6 19a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z",
28
- refresh: "M17.65 6.35A8 8 0 1 0 19.73 14h-2.08A6 6 0 1 1 12 6a5.94 5.94 0 0 1 4.22 1.78L13 11h7V4l-2.35 2.35z",
29
- more_vert: "M12 8a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0 2a2 2 0 1 0 0 4 2 2 0 0 0 0-4zm0 6a2 2 0 1 0 0 4 2 2 0 0 0 0-4z",
30
- download: "M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z",
31
- upload: "M9 16h6v-6h4l-7-7-7 7h4v6zM5 18h14v2H5v-2z",
32
- filter_list: "M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z",
33
- settings: "M19.14 12.94a7.07 7.07 0 0 0 0-1.88l2.03-1.58a.5.5 0 0 0 .12-.62l-1.92-3.32a.5.5 0 0 0-.6-.22l-2.39.96a7.3 7.3 0 0 0-1.62-.94l-.36-2.54a.5.5 0 0 0-.5-.42h-3.84a.5.5 0 0 0-.5.42l-.36 2.54c-.59.24-1.13.56-1.62.94l-2.39-.96a.5.5 0 0 0-.6.22L2.67 8.86a.5.5 0 0 0 .12.62l2.03 1.58a7.07 7.07 0 0 0 0 1.88l-2.03 1.58a.5.5 0 0 0-.12.62l1.92 3.32c.12.22.38.3.6.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.04.24.25.42.5.42h3.84c.25 0 .46-.18.5-.42l.36-2.54c.59-.24 1.12-.56 1.62-.94l2.39.96c.22.08.48 0 .6-.22l1.92-3.32a.5.5 0 0 0-.12-.62l-2.03-1.58zM12 15.6A3.6 3.6 0 1 1 15.6 12 3.6 3.6 0 0 1 12 15.6z",
34
- person: "M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z",
35
- people: "M16 11a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-8 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z",
36
- logout: "M17 7l-1.41 1.41L17.17 10H9v2h8.17l-1.58 1.59L17 15l4-4-4-4zM5 5h7V3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h7v-2H5V5z",
37
- menu: "M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z",
38
- visibility: "M12 4.5A11.83 11.83 0 0 0 1 12a11.83 11.83 0 0 0 22 0 11.83 11.83 0 0 0-11-7.5zm0 12.5a5 5 0 1 1 5-5 5 5 0 0 1-5 5zm0-8a3 3 0 1 0 3 3 3 3 0 0 0-3-3z",
39
- visibility_off: "M12 6.5a5 5 0 0 1 5 5c0 .51-.08 1-.23 1.45l2.92 2.92A11.8 11.8 0 0 0 23 11.5 11.83 11.83 0 0 0 8.36 4.9l2.16 2.16c.46-.35.99-.56 1.48-.56zM2.71 3.16 1.29 4.58l2.44 2.44A11.75 11.75 0 0 0 1 11.5a11.83 11.83 0 0 0 15.23 6.7l3.19 3.19 1.41-1.41L2.71 3.16zM12 16.5a5 5 0 0 1-5-5c0-.69.15-1.34.4-1.93l1.57 1.57c-.03.12-.05.24-.05.36a3 3 0 0 0 3 3c.12 0 .24-.02.36-.05l1.57 1.57c-.59.25-1.24.4-1.93.4z",
40
- content_copy: "M16 1H4a2 2 0 0 0-2 2v14h2V3h12V1zm3 4H8a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2zm0 16H8V7h11v14z",
41
- open_in_new: "M19 19H5V5h7V3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z",
42
- help: "M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm1 17h-2v-2h2v2zm2.07-7.75-.9.92A3.4 3.4 0 0 0 13 14h-2v-.5a4 4 0 0 1 1.17-2.83l1.24-1.26A1.96 1.96 0 0 0 12 6a2 2 0 0 0-2 2H8a4 4 0 1 1 8 0 3.2 3.2 0 0 1-.93 2.25z",
43
- lock: "M18 8h-1V6a5 5 0 0 0-10 0v2H6a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V10a2 2 0 0 0-2-2zM9 6a3 3 0 0 1 6 0v2H9V6zm3 12a2 2 0 1 1 2-2 2 2 0 0 1-2 2z",
44
- mail: "M20 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zm0 4-8 5-8-5V6l8 5 8-5v2z",
45
- calendar_today: "M19 3h-1V1h-2v2H8V1H6v2H5a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2zm0 18H5V9h14v12z",
46
- save: "M17 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V7l-4-4zm-5 16a3 3 0 1 1 3-3 3 3 0 0 1-3 3zm3-10H5V5h10v4z",
47
- /* 0.18.0 — 공장 · 업무 화면에서 자주 쓰는 것(Material Icons, Apache-2.0) */
48
- home: "M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z",
49
- dashboard: "M3 13h8V3H3v10zm0 8h8v-6H3v6zm10 0h8V11h-8v10zm0-18v6h8V3h-8z",
50
- list: "M3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7z",
51
- view_column: "M10 18h5V5h-5v13zm-6 0h5V5H4v13zM16 5v13h5V5h-5z",
52
- notifications: "M12 22a2 2 0 0 0 2-2h-4a2 2 0 0 0 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4a1.5 1.5 0 0 0-3 0v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z",
53
- language: "M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95a15.65 15.65 0 0 0-1.38-3.56A8.03 8.03 0 0 1 18.92 8zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2s.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56A7.99 7.99 0 0 1 5.08 16zm2.95-8H5.08a7.99 7.99 0 0 1 4.33-3.56A15.65 15.65 0 0 0 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2s.07-1.35.16-2h4.68c.09.65.16 1.32.16 2s-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95a8.03 8.03 0 0 1-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2s-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z",
54
- factory: "M22 22H2V10l7-3v2l5-2v3h3l1-8h3l1 8v12zM12 9.95l-5 2V10l-3 1.32V20h16v-8h-8V9.95zM11 18h2v-4h-2v4zm-4 0h2v-4H7v4zm10-4h-2v4h2v-4z",
55
- inventory: "M20 2H4c-1 0-2 .9-2 2v3.01c0 .72.43 1.34 1 1.69V20c0 1.1 1.1 2 2 2h14c.9 0 2-.9 2-2V8.7c.57-.35 1-.97 1-1.69V4c0-1.1-1-2-2-2zm-5 12H9v-2h6v2zm5-7H4V4l16-.02V7z",
56
- local_shipping: "M20 8h-3V4H3a2 2 0 0 0-2 2v11h2a3 3 0 0 0 6 0h6a3 3 0 0 0 6 0h2v-5l-3-4zM6 18.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm13.5-9 1.96 2.5H17V9.5h2.5zm-1.5 9a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z",
57
- warehouse: "M22 21V7L12 3 2 7v14h5v-9h10v9h5zm-11-2H9v2h2v-2zm2-3h-2v2h2v-2zm2 3h-2v2h2v-2z",
58
- memory: "M15 9H9v6h6V9zm-2 4h-2v-2h2v2zm8-2V9h-2V7a2 2 0 0 0-2-2h-2V3h-2v2h-2V3H9v2H7a2 2 0 0 0-2 2v2H3v2h2v2H3v2h2v2a2 2 0 0 0 2 2h2v2h2v-2h2v2h2v-2h2a2 2 0 0 0 2-2v-2h2v-2h-2v-2h2zm-4 6H7V7h10v10z",
59
- smart_toy: "M20 9V7a2 2 0 0 0-2-2h-3a3 3 0 0 0-6 0H6a2 2 0 0 0-2 2v2a3 3 0 0 0 0 6v4a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4a3 3 0 0 0 0-6zM7.5 11.5a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0zM16 17H8v-2h8v2zm-1-4a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z",
60
- bar_chart: "M5 9.2h3V19H5zM10.6 5h2.8v14h-2.8zm5.6 8H19v6h-2.8z",
61
- show_chart: "M3.5 18.49l6-6.01 4 4L22 6.92l-1.41-1.41-7.09 7.97-4-4L2 16.99z",
62
- insights: "M21 8c-1.45 0-2.26 1.44-1.93 2.51l-3.55 3.56c-.3-.09-.74-.09-1.04 0l-2.55-2.55C12.27 10.45 11.46 9 10 9c-1.45 0-2.27 1.44-1.93 2.52l-4.56 4.55C2.44 15.74 1 16.55 1 18a2 2 0 0 0 2 2c1.45 0 2.26-1.44 1.93-2.51l4.55-4.56c.3.09.74.09 1.04 0l2.55 2.55C12.73 16.55 13.54 18 15 18c1.45 0 2.27-1.44 1.93-2.52l3.56-3.55c1.07.33 2.51-.48 2.51-1.93a2 2 0 0 0-2-2z",
63
- history: "M13 3a9 9 0 0 0-9 9H1l3.89 3.89.07.14L9 12H6a7 7 0 1 1 2.06 4.94l-1.42 1.42A8.95 8.95 0 0 0 13 21a9 9 0 0 0 0-18zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z",
64
- task_alt: "M22 5.18 10.59 16.6l-4.24-4.24 1.41-1.41 2.83 2.83 10-10L22 5.18zm-2.21 5.04c.13.57.21 1.17.21 1.78a8 8 0 1 1-8-8c1.58 0 3.04.46 4.28 1.25l1.44-1.44A9.9 9.9 0 0 0 12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10c0-1.19-.22-2.33-.6-3.39l-1.61 1.61z",
65
- schedule: "M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20a8 8 0 1 1 0-16 8 8 0 0 1 0 16zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z",
66
- play_arrow: "M8 5v14l11-7z",
67
- pause: "M6 19h4V5H6v14zm8-14v14h4V5h-4z",
68
- stop: "M6 6h12v12H6z",
69
- tune: "M3 17v2h6v-2H3zM3 5v2h10V5H3zm10 16v-2h8v-2h-8v-2h-2v6h2zM7 9v2H3v2h4v2h2V9H7zm14 4v-2H11v2h10zm-6-4h2V7h4V5h-4V3h-2v6z",
70
- account_tree: "M22 11V3h-7v3H9V3H2v8h7V8h2v10h4v3h7v-8h-7v3h-2V8h2v3z",
71
- route: "M19 15.18V7a4 4 0 0 0-8 0v10a2 2 0 0 1-4 0V8.82A3 3 0 1 0 5 8.82V17a4 4 0 0 0 8 0V7a2 2 0 0 1 4 0v8.18A3 3 0 1 0 19 15.18z",
72
- view_in_ar: "M18.25 7.6l-5.5-3.18a1.5 1.5 0 0 0-1.5 0L5.75 7.6c-.46.27-.75.76-.75 1.3v6.35c0 .54.29 1.03.75 1.3l5.5 3.18c.46.27 1.04.27 1.5 0l5.5-3.18c.46-.27.75-.76.75-1.3V8.9c0-.54-.29-1.03-.75-1.3zM7 14.96v-4.62l4 2.32v4.61l-4-2.31zm5-4.03L8 8.61l4-2.31 4 2.31-4 2.32zm1 6.34v-4.61l4-2.32v4.62l-4 2.31zM7 2H3.5C2.67 2 2 2.67 2 3.5V7h2V4h3V2zm10 0h3.5c.83 0 1.5.67 1.5 1.5V7h-2V4h-3V2zM7 22H3.5c-.83 0-1.5-.67-1.5-1.5V17h2v3h3v2zm10 0h3.5c.83 0 1.5-.67 1.5-1.5V17h-2v3h-3v2z",
73
- build: "M22.7 19l-9.1-9.1c.9-2.3.4-5-1.5-6.9-2-2-5-2.4-7.4-1.3L9 6 6 9 1.6 4.7C.4 7.1.9 10.1 2.9 12.1c1.9 1.9 4.6 2.4 6.9 1.5l9.1 9.1c.4.4 1 .4 1.4 0l2.3-2.3c.5-.4.5-1.1.1-1.4z",
74
- link: "M3.9 12A3.1 3.1 0 0 1 7 8.9h4V7H7a5 5 0 0 0 0 10h4v-1.9H7A3.1 3.1 0 0 1 3.9 12zM8 13h8v-2H8v2zm9-6h-4v1.9h4a3.1 3.1 0 0 1 0 6.2h-4V17h4a5 5 0 0 0 0-10z",
75
- block: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM4 12a8 8 0 0 1 12.9-6.31L5.69 16.9A7.9 7.9 0 0 1 4 12zm8 8a7.9 7.9 0 0 1-4.9-1.69L18.31 7.1A7.9 7.9 0 0 1 20 12a8 8 0 0 1-8 8z",
76
- swap_horiz: "M6.99 11 3 15l3.99 4v-3H14v-2H6.99v-3zM21 9l-3.99-4v3H10v2h7.01v3L21 9z",
77
- description: "M14 2H6a2 2 0 0 0-1.99 2L4 20a2 2 0 0 0 1.99 2H18a2 2 0 0 0 2-2V8l-6-6zm2 16H8v-2h8v2zm0-4H8v-2h8v2zm-3-5V3.5L18.5 9H13z",
78
- auto_awesome: "M19 9l1.25-2.75L23 5l-2.75-1.25L19 1l-1.25 2.75L15 5l2.75 1.25L19 9zm-7.5.5L9 4 6.5 9.5 1 12l5.5 2.5L9 20l2.5-5.5L17 12l-5.5-2.5zM19 15l-1.25 2.75L15 19l2.75 1.25L19 23l1.25-2.75L23 19l-2.75-1.25L19 15z",
79
- sync: "M12 4V1L8 5l4 4V6a6 6 0 0 1 5.3 8.8l1.46 1.46A7.93 7.93 0 0 0 20 12a8 8 0 0 0-8-8zm0 14a6 6 0 0 1-5.3-8.8L5.24 7.74A7.93 7.93 0 0 0 4 12a8 8 0 0 0 8 8v3l4-4-4-4v3z",
80
- fullscreen: "M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z",
81
- qr_code_scanner: "M9.5 6.5v3h-3v-3h3M11 5H5v6h6V5zm-1.5 9.5v3h-3v-3h3M11 13H5v6h6v-6zm6.5-6.5v3h-3v-3h3M19 5h-6v6h6V5zm-6 8h1.5v1.5H13V13zm1.5 1.5H16V16h-1.5v-1.5zM16 13h1.5v1.5H16V13zm-3 3h1.5v1.5H13V16zm1.5 1.5H16V19h-1.5v-1.5zM16 16h1.5v1.5H16V16zm1.5-1.5H19V16h-1.5v-1.5zm0 3H19V19h-1.5v-1.5zM22 7h-2V4h-3V2h5v5zm0 15v-5h-2v3h-3v2h5zM2 22h5v-2H4v-3H2v5zM2 2v5h2V4h3V2H2z",
82
- attach_money: "M11.8 10.9c-2.27-.59-3-1.2-3-2.15 0-1.09 1.01-1.85 2.7-1.85 1.78 0 2.44.85 2.5 2.1h2.21c-.07-1.72-1.12-3.3-3.21-3.81V3h-3v2.16c-1.94.42-3.5 1.68-3.5 3.61 0 2.31 1.91 3.46 4.7 4.13 2.5.6 3 1.48 3 2.41 0 .69-.49 1.79-2.7 1.79-2.06 0-2.87-.92-2.98-2.1h-2.2c.12 2.19 1.76 3.42 3.68 3.83V21h3v-2.15c1.95-.37 3.5-1.5 3.5-3.55 0-2.84-2.43-3.81-4.7-4.4z",
83
- sensors: "M7.76 16.24A5.97 5.97 0 0 1 6 12c0-1.66.67-3.16 1.76-4.24l1.42 1.42A3.96 3.96 0 0 0 8 12c0 1.1.45 2.1 1.17 2.83l-1.41 1.41zm8.48 0A5.97 5.97 0 0 0 18 12c0-1.66-.67-3.16-1.76-4.24l-1.42 1.42A3.96 3.96 0 0 1 16 12c0 1.1-.45 2.1-1.17 2.83l1.41 1.41zM12 10a2 2 0 1 0 0 4 2 2 0 0 0 0-4zm8 2c0 2.21-.9 4.21-2.35 5.65l1.42 1.42A9.97 9.97 0 0 0 22 12c0-2.76-1.12-5.26-2.93-7.07l-1.42 1.42A7.97 7.97 0 0 1 20 12zM6.35 6.35 4.93 4.93A9.97 9.97 0 0 0 2 12c0 2.76 1.12 5.26 2.93 7.07l1.42-1.42A7.94 7.94 0 0 1 4 12c0-2.21.9-4.21 2.35-5.65z",
84
- science: "M19.8 18.4 14 10.67V6.5l1.35-1.69c.26-.33.03-.81-.39-.81H9.04c-.42 0-.65.48-.39.81L10 6.5v4.17L4.2 18.4c-.49.66-.02 1.6.8 1.6h14c.82 0 1.29-.94.8-1.6z"
85
- };
86
- const _hoisted_1$4 = ["role", "aria-label", "aria-hidden"];
87
- const _hoisted_2$3 = { key: 0 };
88
- const _hoisted_3$3 = ["d"];
89
- const _sfc_main$5 = /* @__PURE__ */ defineComponent({
90
- __name: "LfIcon",
91
- props: {
92
- name: {},
93
- path: {},
94
- size: { default: "1em" },
95
- label: {}
96
- },
97
- setup(__props) {
98
- const props = __props;
99
- const d = computed(() => props.path ?? (props.name ? LF_ICONS[props.name] : void 0));
100
- const resolvedSize = computed(
101
- () => typeof props.size === "number" ? `${props.size}px` : props.size
102
- );
103
- return (_ctx, _cache) => {
104
- return openBlock(), createElementBlock("svg", {
105
- class: "lf-icon",
106
- viewBox: "0 0 24 24",
107
- style: normalizeStyle({ width: resolvedSize.value, height: resolvedSize.value }),
108
- role: __props.label ? "img" : void 0,
109
- "aria-label": __props.label || void 0,
110
- "aria-hidden": __props.label ? void 0 : "true"
111
- }, [
112
- __props.label ? (openBlock(), createElementBlock("title", _hoisted_2$3, toDisplayString(__props.label), 1)) : createCommentVNode("", true),
113
- d.value ? (openBlock(), createElementBlock("path", {
114
- key: 1,
115
- d: d.value,
116
- fill: "currentColor"
117
- }, null, 8, _hoisted_3$3)) : createCommentVNode("", true)
118
- ], 12, _hoisted_1$4);
119
- };
120
- }
121
- });
122
- const LfIcon = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-b70b3868"]]);
123
- const _hoisted_1$3 = ["role", "aria-label", "aria-hidden"];
124
- const _sfc_main$4 = /* @__PURE__ */ defineComponent({
125
- __name: "LfSpinner",
126
- props: {
127
- size: { default: "1.25rem" },
128
- label: {}
129
- },
130
- setup(__props) {
131
- const props = __props;
132
- const resolvedSize = computed(
133
- () => typeof props.size === "number" ? `${props.size}px` : props.size
134
- );
135
- return (_ctx, _cache) => {
136
- return openBlock(), createElementBlock("svg", {
137
- class: "lf-spinner",
138
- viewBox: "0 0 24 24",
139
- style: normalizeStyle({ width: resolvedSize.value, height: resolvedSize.value }),
140
- role: __props.label ? "status" : void 0,
141
- "aria-label": __props.label || void 0,
142
- "aria-hidden": __props.label ? void 0 : "true"
143
- }, [..._cache[0] || (_cache[0] = [
144
- createElementVNode("circle", {
145
- class: "lf-spinner__track",
146
- cx: "12",
147
- cy: "12",
148
- r: "9"
149
- }, null, -1),
150
- createElementVNode("circle", {
151
- class: "lf-spinner__head",
152
- cx: "12",
153
- cy: "12",
154
- r: "9"
155
- }, null, -1)
156
- ])], 12, _hoisted_1$3);
157
- };
158
- }
159
- });
160
- const LfSpinner = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-4aedf6b0"]]);
161
- const _sfc_main$3 = /* @__PURE__ */ defineComponent({
162
- __name: "LfIconButton",
163
- props: {
164
- icon: {},
165
- iconPath: {},
166
- label: {},
167
- size: { default: "md" },
168
- accent: { type: Boolean },
169
- danger: { type: Boolean },
170
- disabled: { type: Boolean },
171
- loading: { type: Boolean },
172
- href: {},
173
- external: { type: Boolean }
174
- },
175
- setup(__props) {
176
- const props = __props;
177
- const iconSize = computed(() => props.size === "sm" ? "1.125rem" : "1.375rem");
178
- return (_ctx, _cache) => {
179
- return openBlock(), createBlock(resolveDynamicComponent(__props.href ? "a" : "button"), {
180
- class: normalizeClass(["lf-icon-btn", [`lf-icon-btn--${__props.size}`, { "lf-icon-btn--accent": __props.accent, "lf-icon-btn--danger": __props.danger }]]),
181
- type: __props.href ? void 0 : "button",
182
- href: __props.href,
183
- target: __props.href && __props.external ? "_blank" : void 0,
184
- rel: __props.href && __props.external ? "noopener noreferrer" : void 0,
185
- disabled: __props.href ? void 0 : __props.disabled || __props.loading,
186
- "aria-busy": __props.loading ? "true" : void 0,
187
- "aria-label": __props.label,
188
- title: __props.label
189
- }, {
190
- default: withCtx(() => [
191
- __props.loading ? (openBlock(), createBlock(LfSpinner, {
192
- key: 0,
193
- size: iconSize.value
194
- }, null, 8, ["size"])) : (openBlock(), createBlock(LfIcon, {
195
- key: 1,
196
- name: __props.icon,
197
- path: __props.iconPath,
198
- size: iconSize.value
199
- }, null, 8, ["name", "path", "size"]))
200
- ]),
201
- _: 1
202
- }, 8, ["class", "type", "href", "target", "rel", "disabled", "aria-busy", "aria-label", "title"]);
203
- };
204
- }
205
- });
206
- const LfIconButton = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-6af12755"]]);
207
- const _hoisted_1$2 = ["for"];
208
- const _hoisted_2$2 = {
209
- key: 0,
210
- class: "lf-field__required",
211
- "aria-hidden": "true"
212
- };
213
- const _hoisted_3$2 = {
214
- key: 1,
215
- class: "lf-field__error",
216
- role: "alert"
217
- };
218
- const _hoisted_4$2 = {
219
- key: 2,
220
- class: "lf-field__hint"
221
- };
222
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
223
- __name: "LfField",
224
- props: {
225
- label: {},
226
- hint: {},
227
- error: {},
228
- required: { type: Boolean },
229
- htmlFor: {}
230
- },
231
- setup(__props) {
232
- return (_ctx, _cache) => {
233
- return openBlock(), createElementBlock("div", {
234
- class: normalizeClass(["lf-field", { "lf-field--error": !!__props.error }])
235
- }, [
236
- __props.label ? (openBlock(), createElementBlock("label", {
237
- key: 0,
238
- class: "lf-field__label",
239
- for: __props.htmlFor
240
- }, [
241
- createTextVNode(toDisplayString(__props.label) + " ", 1),
242
- __props.required ? (openBlock(), createElementBlock("span", _hoisted_2$2, "*")) : createCommentVNode("", true)
243
- ], 8, _hoisted_1$2)) : createCommentVNode("", true),
244
- renderSlot(_ctx.$slots, "default", {}, void 0, true),
245
- __props.error ? (openBlock(), createElementBlock("p", _hoisted_3$2, toDisplayString(__props.error), 1)) : __props.hint ? (openBlock(), createElementBlock("p", _hoisted_4$2, toDisplayString(__props.hint), 1)) : createCommentVNode("", true)
246
- ], 2);
247
- };
248
- }
249
- });
250
- const LfField = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-38509e4d"]]);
251
- function useSplitAttrs() {
252
- const attrs = useAttrs();
253
- const rootAttrs = computed(() => ({ class: attrs.class, style: attrs.style }));
254
- const controlAttrs = computed(() => {
255
- const { class: _class, style: _style, ...rest } = attrs;
256
- return rest;
257
- });
258
- return { rootAttrs, controlAttrs };
259
- }
260
- const _hoisted_1$1 = { class: "lf-control-wrap" };
261
- const _hoisted_2$1 = ["id", "disabled", "required", "aria-invalid"];
262
- const _hoisted_3$1 = ["disabled"];
263
- const _hoisted_4$1 = ["value", "disabled"];
264
- const _hoisted_5 = { class: "lf-control-wrap__icon lf-control-wrap__icon--right" };
265
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
266
- ...{ inheritAttrs: false },
267
- __name: "LfSelect",
268
- props: /* @__PURE__ */ mergeModels({
269
- options: { default: () => [] },
270
- label: {},
271
- hint: {},
272
- error: {},
273
- required: { type: Boolean },
274
- placeholder: {},
275
- clearable: { type: Boolean },
276
- disabled: { type: Boolean },
277
- size: { default: "md" }
278
- }, {
279
- "modelValue": {
280
- required: true
281
- },
282
- "modelModifiers": {}
283
- }),
284
- emits: ["update:modelValue"],
285
- setup(__props) {
286
- const props = __props;
287
- const [model, modifiers] = useModel(__props, "modelValue", {
288
- set(value) {
289
- if (!modifiers.number || value === "" || typeof value === "number") return value;
290
- const n = parseFloat(String(value));
291
- return Number.isNaN(n) ? value : n;
292
- }
293
- });
294
- const { rootAttrs, controlAttrs } = useSplitAttrs();
295
- const inputId = useId();
296
- const normalized = computed(
297
- () => props.options.map((o) => typeof o === "string" || typeof o === "number" ? { value: o, label: String(o) } : o)
298
- );
299
- return (_ctx, _cache) => {
300
- return openBlock(), createBlock(LfField, mergeProps(unref(rootAttrs), {
301
- label: __props.label,
302
- hint: __props.hint,
303
- error: __props.error,
304
- required: __props.required,
305
- "html-for": unref(inputId)
306
- }), {
307
- default: withCtx(() => [
308
- createElementVNode("div", _hoisted_1$1, [
309
- withDirectives(createElementVNode("select", mergeProps({ id: unref(inputId) }, unref(controlAttrs), {
310
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(model) ? model.value = $event : null),
311
- class: ["lf-control lf-select lf-control--has-right", { "lf-control--sm": __props.size === "sm", "lf-control--error": !!__props.error }],
312
- disabled: __props.disabled,
313
- required: __props.required,
314
- "aria-invalid": __props.error ? "true" : void 0
315
- }), [
316
- __props.placeholder ? (openBlock(), createElementBlock("option", {
317
- key: 0,
318
- value: "",
319
- disabled: !__props.clearable
320
- }, toDisplayString(__props.placeholder), 9, _hoisted_3$1)) : createCommentVNode("", true),
321
- (openBlock(true), createElementBlock(Fragment, null, renderList(normalized.value, (opt) => {
322
- return openBlock(), createElementBlock("option", {
323
- key: String(opt.value),
324
- value: opt.value,
325
- disabled: opt.disabled
326
- }, toDisplayString(opt.label), 9, _hoisted_4$1);
327
- }), 128))
328
- ], 16, _hoisted_2$1), [
329
- [vModelSelect, unref(model)]
330
- ]),
331
- createElementVNode("span", _hoisted_5, [
332
- createVNode(LfIcon, {
333
- name: "expand_more",
334
- size: "1.125rem"
335
- })
336
- ])
337
- ])
338
- ]),
339
- _: 1
340
- }, 16, ["label", "hint", "error", "required", "html-for"]);
341
- };
342
- }
343
- });
344
- const LfSelect = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-01fa2b3e"]]);
345
- const _hoisted_1 = ["aria-label"];
346
- const _hoisted_2 = ["aria-checked", "aria-label", "title", "disabled", "onClick"];
347
- const _hoisted_3 = {
348
- key: 1,
349
- class: "lf-seg__label"
350
- };
351
- const _hoisted_4 = {
352
- key: 2,
353
- class: "lf-seg__badge"
354
- };
355
- const _sfc_main = /* @__PURE__ */ defineComponent({
356
- __name: "LfSegmented",
357
- props: /* @__PURE__ */ mergeModels({
358
- options: { default: () => [] },
359
- size: { default: "md" },
360
- labelHidden: { type: Boolean },
361
- block: { type: Boolean },
362
- disabled: { type: Boolean },
363
- ariaLabel: {}
364
- }, {
365
- "modelValue": { required: true },
366
- "modelModifiers": {}
367
- }),
368
- emits: ["update:modelValue"],
369
- setup(__props) {
370
- const props = __props;
371
- const model = useModel(__props, "modelValue");
372
- const normalized = computed(
373
- () => props.options.map((o) => typeof o === "string" ? { value: o, label: o } : o)
374
- );
375
- const root = useTemplateRef("root");
376
- const thumb = ref(null);
377
- const instant = ref(true);
378
- let lastEl = null;
379
- function measure() {
380
- var _a;
381
- const el = ((_a = root.value) == null ? void 0 : _a.querySelector(".lf-seg__btn--on")) ?? null;
382
- const next = el && el.offsetWidth ? { x: el.offsetLeft, w: el.offsetWidth } : null;
383
- const cur = thumb.value;
384
- if (cur && next && cur.x === next.x && cur.w === next.w) return;
385
- instant.value = !lastEl || el === lastEl || !cur;
386
- if (next) lastEl = el;
387
- thumb.value = next;
388
- }
389
- watch(() => [model.value, normalized.value.length], () => {
390
- void nextTick(measure);
391
- });
392
- let ro = null;
393
- onMounted(() => {
394
- measure();
395
- if (typeof ResizeObserver !== "undefined" && root.value) {
396
- ro = new ResizeObserver(() => measure());
397
- ro.observe(root.value);
398
- }
399
- });
400
- onBeforeUnmount(() => ro == null ? void 0 : ro.disconnect());
401
- function iconOf(opt) {
402
- if (!opt.icon) return {};
403
- return opt.icon in LF_ICONS ? { name: opt.icon } : { path: opt.icon };
404
- }
405
- return (_ctx, _cache) => {
406
- return openBlock(), createElementBlock("div", {
407
- ref_key: "root",
408
- ref: root,
409
- class: normalizeClass(["lf-seg", [`lf-seg--${__props.size}`, { "lf-seg--block": __props.block, "lf-seg--thumb": thumb.value }]]),
410
- role: "radiogroup",
411
- "aria-label": __props.ariaLabel
412
- }, [
413
- thumb.value ? (openBlock(), createElementBlock("span", {
414
- key: 0,
415
- class: normalizeClass(["lf-seg__thumb", { "lf-seg__thumb--instant": instant.value }]),
416
- style: normalizeStyle({ transform: `translateX(${thumb.value.x}px)`, width: `${thumb.value.w}px` }),
417
- "aria-hidden": "true"
418
- }, null, 6)) : createCommentVNode("", true),
419
- (openBlock(true), createElementBlock(Fragment, null, renderList(normalized.value, (opt) => {
420
- return openBlock(), createElementBlock("button", {
421
- key: String(opt.value),
422
- type: "button",
423
- class: normalizeClass(["lf-seg__btn", { "lf-seg__btn--on": opt.value === model.value }]),
424
- role: "radio",
425
- "aria-checked": opt.value === model.value ? "true" : "false",
426
- "aria-label": __props.labelHidden ? opt.label : void 0,
427
- title: __props.labelHidden ? opt.label : void 0,
428
- disabled: __props.disabled || opt.disabled,
429
- onClick: ($event) => model.value = opt.value
430
- }, [
431
- opt.icon ? (openBlock(), createBlock(LfIcon, mergeProps({
432
- key: 0,
433
- ref_for: true
434
- }, iconOf(opt), { class: "lf-seg__icon" }), null, 16)) : createCommentVNode("", true),
435
- !__props.labelHidden ? (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(opt.label), 1)) : createCommentVNode("", true),
436
- opt.badge !== void 0 && opt.badge !== "" ? (openBlock(), createElementBlock("span", _hoisted_4, toDisplayString(opt.badge), 1)) : createCommentVNode("", true)
437
- ], 10, _hoisted_2);
438
- }), 128))
439
- ], 10, _hoisted_1);
440
- };
441
- }
442
- });
443
- const LfSegmented = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-10fad8e3"]]);
444
- export {
445
- LfSpinner as L,
446
- _export_sfc as _,
447
- LfIcon as a,
448
- LfField as b,
449
- LfIconButton as c,
450
- LF_ICONS as d,
451
- LfSegmented as e,
452
- LfSelect as f,
453
- useSplitAttrs as u
454
- };
455
- //# sourceMappingURL=LfSegmented-C35GdK7N.js.map