@m3ui-vue/m3ui-vue 1.7.0 → 1.8.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.
Files changed (88) hide show
  1. package/dist/API.md +578 -3
  2. package/dist/{MColorPickerModal-BKM1CHxr.js → MColorPickerModal-H8nuX0Wu.js} +3 -4
  3. package/dist/{MColorPickerModal-BKM1CHxr.js.map → MColorPickerModal-H8nuX0Wu.js.map} +1 -1
  4. package/dist/MDialog-B42Mhn8W.js +331 -0
  5. package/dist/MDialog-B42Mhn8W.js.map +1 -0
  6. package/dist/{MListItem-BU5KDRCB.js → MListItem-DiOAxaN7.js} +102 -102
  7. package/dist/{MListItem-BU5KDRCB.js.map → MListItem-DiOAxaN7.js.map} +1 -1
  8. package/dist/{MLoadingIndicator-RykOo5tf.js → MLoadingIndicator-CuTZYFFj.js} +2 -2
  9. package/dist/{MLoadingIndicator-RykOo5tf.js.map → MLoadingIndicator-CuTZYFFj.js.map} +1 -1
  10. package/dist/{MSeekBar-B_Y3MpVz.js → MSeekBar-BCDQTx2t.js} +2 -2
  11. package/dist/{MSeekBar-B_Y3MpVz.js.map → MSeekBar-BCDQTx2t.js.map} +1 -1
  12. package/dist/{MSegmentedButton-CiOOY1-N.js → MSegmentedButton-BXzRsg1S.js} +2 -2
  13. package/dist/{MSegmentedButton-CiOOY1-N.js.map → MSegmentedButton-BXzRsg1S.js.map} +1 -1
  14. package/dist/MSignaturePad-BTqGaPXA.js +313 -0
  15. package/dist/MSignaturePad-BTqGaPXA.js.map +1 -0
  16. package/dist/{MSlider-BCeVIxcq.js → MSlider-D_O8J9YH.js} +3 -3
  17. package/dist/{MSlider-BCeVIxcq.js.map → MSlider-D_O8J9YH.js.map} +1 -1
  18. package/dist/{MSpinner-Cs03qoqE.js → MSpinner-UCdtSOHP.js} +2 -2
  19. package/dist/{MSpinner-Cs03qoqE.js.map → MSpinner-UCdtSOHP.js.map} +1 -1
  20. package/dist/{MTextField-NaFbMkjv.js → MTextField-CYk9yFvi.js} +3 -3
  21. package/dist/{MTextField-NaFbMkjv.js.map → MTextField-CYk9yFvi.js.map} +1 -1
  22. package/dist/{_useFieldValidation-Bz34IAQY.js → _useFieldValidation-B0B44M_t.js} +2 -2
  23. package/dist/{_useFieldValidation-Bz34IAQY.js.map → _useFieldValidation-B0B44M_t.js.map} +1 -1
  24. package/dist/api.json +1 -1
  25. package/dist/code-editor.js +2 -2
  26. package/dist/components/MFormBuilder.vue.d.ts +22 -0
  27. package/dist/components/MFormRenderer.vue.d.ts +151 -0
  28. package/dist/components/MMapRoute.vue.d.ts +13 -5
  29. package/dist/components/MPdfSigner.vue.d.ts +499 -0
  30. package/dist/components/MPdfViewer.vue.d.ts +12 -0
  31. package/dist/components/MPosKeypad.vue.d.ts +1 -1
  32. package/dist/components/MSpreadsheet.vue.d.ts +137 -0
  33. package/dist/components/MStack.vue.d.ts +1 -1
  34. package/dist/composables/pdfSign.d.ts +52 -0
  35. package/dist/composables/spreadsheetFormula.d.ts +55 -0
  36. package/dist/composables/useLocale.d.ts +154 -0
  37. package/dist/draw.js +2 -2
  38. package/dist/flow.js +1 -1
  39. package/dist/gantt.js +2 -2
  40. package/dist/index.d.ts +7 -0
  41. package/dist/locales/index.js +539 -0
  42. package/dist/locales/index.js.map +1 -1
  43. package/dist/m3ui-vue.css +1 -1
  44. package/dist/m3ui.js +16988 -15064
  45. package/dist/m3ui.js.map +1 -1
  46. package/dist/map.js +601 -585
  47. package/dist/map.js.map +1 -1
  48. package/dist/media.js +4 -4
  49. package/dist/pdf.d.ts +3 -0
  50. package/dist/pdf.js +1228 -687
  51. package/dist/pdf.js.map +1 -1
  52. package/dist/rich-text-editor.js +12 -13
  53. package/dist/rich-text-editor.js.map +1 -1
  54. package/dist/styles.css +1 -1
  55. package/dist/{useLocale-Dh1xZZ8i.js → useLocale-DL96OFgr.js} +78 -1
  56. package/dist/useLocale-DL96OFgr.js.map +1 -0
  57. package/package.json +5 -1
  58. package/src/__tests__/MFormRenderer.test.ts +157 -0
  59. package/src/__tests__/MMapRoute.test.ts +34 -0
  60. package/src/__tests__/MPdfSigner.test.ts +175 -0
  61. package/src/__tests__/MSpreadsheet.test.ts +223 -0
  62. package/src/__tests__/spreadsheetFormula.test.ts +77 -0
  63. package/src/__tests__/ssr.test.ts +3 -0
  64. package/src/components/MFormBuilder.vue +417 -0
  65. package/src/components/MFormRenderer.vue +324 -0
  66. package/src/components/MMapRoute.vue +64 -11
  67. package/src/components/MPdfSigner.vue +433 -0
  68. package/src/components/MPdfViewer.vue +12 -0
  69. package/src/components/MSpreadsheet.vue +992 -0
  70. package/src/composables/pdfSign.ts +141 -0
  71. package/src/composables/spreadsheetFormula.ts +459 -0
  72. package/src/composables/useLocale.ts +231 -0
  73. package/src/index.ts +7 -0
  74. package/src/locales/de.ts +77 -0
  75. package/src/locales/es.ts +77 -0
  76. package/src/locales/fr.ts +77 -0
  77. package/src/locales/ja.ts +77 -0
  78. package/src/locales/ko.ts +77 -0
  79. package/src/locales/pt.ts +77 -0
  80. package/src/locales/zh.ts +77 -0
  81. package/src/pdf.ts +3 -0
  82. package/dist/MButton-CN3wYwIG.js +0 -171
  83. package/dist/MButton-CN3wYwIG.js.map +0 -1
  84. package/dist/MDialog-1LAk9WAO.js +0 -167
  85. package/dist/MDialog-1LAk9WAO.js.map +0 -1
  86. package/dist/MProgressBar-BWly1UKN.js +0 -179
  87. package/dist/MProgressBar-BWly1UKN.js.map +0 -1
  88. package/dist/useLocale-Dh1xZZ8i.js.map +0 -1
package/src/locales/ko.ts CHANGED
@@ -246,6 +246,83 @@ export const koLocale: M3Locale = {
246
246
  mapNoPlaces: '장소를 찾을 수 없습니다',
247
247
  mapRouteStop: '경유지',
248
248
  mapRouteVehicle: '차량',
249
+ spreadsheet: '스프레드시트',
250
+ spreadsheetFormula: '수식',
251
+ spreadsheetName: '이름 상자',
252
+ formSubmit: '제출',
253
+ formBuilderEdit: '편집',
254
+ formBuilderPreview: '미리보기',
255
+ formBuilderJson: 'JSON',
256
+ formBuilderAddField: '필드 추가',
257
+ formBuilderEmpty: '아직 필드가 없습니다. 목록에서 추가하세요',
258
+ formBuilderForm: '양식',
259
+ formBuilderTitle: '제목',
260
+ formBuilderDescription: '설명',
261
+ formBuilderSubmitLabel: '제출 버튼 텍스트',
262
+ formBuilderLabel: '레이블',
263
+ formBuilderName: '이름(키)',
264
+ formBuilderPlaceholder: '자리 표시자',
265
+ formBuilderHint: '도움말',
266
+ formBuilderRequired: '필수',
267
+ formBuilderWidth: '너비',
268
+ formBuilderWidthFull: '전체',
269
+ formBuilderWidthHalf: '절반',
270
+ formBuilderWidthThird: '3분의 1',
271
+ formBuilderWidthTwoThirds: '3분의 2',
272
+ formBuilderOptions: '옵션, 한 줄에 하나(레이블 또는 레이블=값)',
273
+ formBuilderMin: '최솟값',
274
+ formBuilderMax: '최댓값',
275
+ formBuilderStep: '단계',
276
+ formBuilderMinLength: '최소 길이',
277
+ formBuilderMaxLength: '최대 길이',
278
+ formBuilderPattern: '패턴(정규식)',
279
+ formBuilderPatternMessage: '일치하지 않을 때 메시지',
280
+ formBuilderRows: '줄 수',
281
+ formBuilderShowWhen: '다음일 때만 표시',
282
+ formBuilderAlways: '항상',
283
+ formBuilderEquals: '값이',
284
+ formBuilderDuplicate: '복제',
285
+ formBuilderDelete: '삭제',
286
+ formBuilderCopy: '복사',
287
+ formBuilderCopied: '복사됨',
288
+ formBuilderSubmitted: '제출된 값',
289
+ formBuilderSelectField: '편집할 필드를 선택하세요',
290
+ formFieldText: '텍스트',
291
+ formFieldEmail: '이메일',
292
+ formFieldPassword: '비밀번호',
293
+ formFieldTel: '전화(단순)',
294
+ formFieldUrl: '링크',
295
+ formFieldTextarea: '긴 텍스트',
296
+ formFieldNumber: '숫자',
297
+ formFieldSelect: '드롭다운',
298
+ formFieldAutocomplete: '검색 목록',
299
+ formFieldRadio: '단일 선택',
300
+ formFieldCheckbox: '체크박스',
301
+ formFieldSwitch: '스위치',
302
+ formFieldDate: '날짜',
303
+ formFieldTime: '시간',
304
+ formFieldSlider: '슬라이더',
305
+ formFieldRating: '평점',
306
+ formFieldPhone: '국가 포함 전화',
307
+ formFieldHeading: '제목',
308
+ formFieldDivider: '구분선',
309
+ pdfSignSignature: '서명',
310
+ pdfSignInitials: '이니셜',
311
+ pdfSignName: '이름',
312
+ pdfSignDate: '날짜',
313
+ pdfSignText: '텍스트',
314
+ pdfSignCheckbox: '체크박스',
315
+ pdfSignHere: '여기에 서명',
316
+ pdfSignNext: '다음 필드',
317
+ pdfSignFinish: '완료',
318
+ pdfSignProgress: '{total}개 중 {done}개',
319
+ pdfSignDraw: '그리기',
320
+ pdfSignTypeIt: '입력',
321
+ pdfSignAdopt: '서명하기',
322
+ pdfSignAddField: '필드 추가',
323
+ pdfSignRequired: '필수',
324
+ pdfSignDelete: '필드 삭제',
325
+ pdfSignComplete: '모든 필드를 채웠습니다',
249
326
  trackingArrives: '{time} 도착 예정',
250
327
  trackingArrivingNow: '곧 도착',
251
328
  trackingDelivered: '배달 완료',
package/src/locales/pt.ts CHANGED
@@ -246,6 +246,83 @@ export const ptLocale: M3Locale = {
246
246
  mapNoPlaces: 'Nenhum lugar encontrado',
247
247
  mapRouteStop: 'Parada',
248
248
  mapRouteVehicle: 'Veículo',
249
+ spreadsheet: 'Planilha',
250
+ spreadsheetFormula: 'Fórmula',
251
+ spreadsheetName: 'Caixa de nome',
252
+ formSubmit: 'Enviar',
253
+ formBuilderEdit: 'Editar',
254
+ formBuilderPreview: 'Pré-visualizar',
255
+ formBuilderJson: 'JSON',
256
+ formBuilderAddField: 'Adicionar um campo',
257
+ formBuilderEmpty: 'Ainda não há campos: adicione um da lista',
258
+ formBuilderForm: 'Formulário',
259
+ formBuilderTitle: 'Título',
260
+ formBuilderDescription: 'Descrição',
261
+ formBuilderSubmitLabel: 'Texto do botão de envio',
262
+ formBuilderLabel: 'Rótulo',
263
+ formBuilderName: 'Nome (chave)',
264
+ formBuilderPlaceholder: 'Texto de exemplo',
265
+ formBuilderHint: 'Texto de ajuda',
266
+ formBuilderRequired: 'Obrigatório',
267
+ formBuilderWidth: 'Largura',
268
+ formBuilderWidthFull: 'Inteira',
269
+ formBuilderWidthHalf: 'Metade',
270
+ formBuilderWidthThird: 'Um terço',
271
+ formBuilderWidthTwoThirds: 'Dois terços',
272
+ formBuilderOptions: 'Opções, uma por linha (rótulo ou rótulo=valor)',
273
+ formBuilderMin: 'Mínimo',
274
+ formBuilderMax: 'Máximo',
275
+ formBuilderStep: 'Passo',
276
+ formBuilderMinLength: 'Comprimento mínimo',
277
+ formBuilderMaxLength: 'Comprimento máximo',
278
+ formBuilderPattern: 'Padrão (expressão regular)',
279
+ formBuilderPatternMessage: 'Mensagem quando não corresponde',
280
+ formBuilderRows: 'Linhas',
281
+ formBuilderShowWhen: 'Mostrar somente se',
282
+ formBuilderAlways: 'Sempre',
283
+ formBuilderEquals: 'é',
284
+ formBuilderDuplicate: 'Duplicar',
285
+ formBuilderDelete: 'Excluir',
286
+ formBuilderCopy: 'Copiar',
287
+ formBuilderCopied: 'Copiado',
288
+ formBuilderSubmitted: 'Valores enviados',
289
+ formBuilderSelectField: 'Selecione um campo para editá-lo',
290
+ formFieldText: 'Texto',
291
+ formFieldEmail: 'E-mail',
292
+ formFieldPassword: 'Senha',
293
+ formFieldTel: 'Telefone (simples)',
294
+ formFieldUrl: 'Link',
295
+ formFieldTextarea: 'Texto longo',
296
+ formFieldNumber: 'Número',
297
+ formFieldSelect: 'Lista suspensa',
298
+ formFieldAutocomplete: 'Lista com busca',
299
+ formFieldRadio: 'Escolha única',
300
+ formFieldCheckbox: 'Caixa de seleção',
301
+ formFieldSwitch: 'Interruptor',
302
+ formFieldDate: 'Data',
303
+ formFieldTime: 'Hora',
304
+ formFieldSlider: 'Controle deslizante',
305
+ formFieldRating: 'Avaliação',
306
+ formFieldPhone: 'Telefone com país',
307
+ formFieldHeading: 'Título',
308
+ formFieldDivider: 'Divisor',
309
+ pdfSignSignature: 'Assinatura',
310
+ pdfSignInitials: 'Iniciais',
311
+ pdfSignName: 'Nome',
312
+ pdfSignDate: 'Data',
313
+ pdfSignText: 'Texto',
314
+ pdfSignCheckbox: 'Caixa de seleção',
315
+ pdfSignHere: 'Assine aqui',
316
+ pdfSignNext: 'Próximo campo',
317
+ pdfSignFinish: 'Concluir',
318
+ pdfSignProgress: '{done} de {total} campos',
319
+ pdfSignDraw: 'Desenhar',
320
+ pdfSignTypeIt: 'Digitar',
321
+ pdfSignAdopt: 'Assinar',
322
+ pdfSignAddField: 'Adicionar um campo',
323
+ pdfSignRequired: 'Obrigatório',
324
+ pdfSignDelete: 'Excluir campo',
325
+ pdfSignComplete: 'Todos os campos estão preenchidos',
249
326
  trackingArrives: 'Chega {time}',
250
327
  trackingArrivingNow: 'Chegando',
251
328
  trackingDelivered: 'Entregue',
package/src/locales/zh.ts CHANGED
@@ -246,6 +246,83 @@ export const zhLocale: M3Locale = {
246
246
  mapNoPlaces: '未找到地点',
247
247
  mapRouteStop: '站点',
248
248
  mapRouteVehicle: '车辆',
249
+ spreadsheet: '电子表格',
250
+ spreadsheetFormula: '公式',
251
+ spreadsheetName: '名称框',
252
+ formSubmit: '提交',
253
+ formBuilderEdit: '编辑',
254
+ formBuilderPreview: '预览',
255
+ formBuilderJson: 'JSON',
256
+ formBuilderAddField: '添加字段',
257
+ formBuilderEmpty: '还没有字段:从列表中添加一个',
258
+ formBuilderForm: '表单',
259
+ formBuilderTitle: '标题',
260
+ formBuilderDescription: '描述',
261
+ formBuilderSubmitLabel: '提交按钮文字',
262
+ formBuilderLabel: '标签',
263
+ formBuilderName: '名称(键)',
264
+ formBuilderPlaceholder: '占位文字',
265
+ formBuilderHint: '帮助文字',
266
+ formBuilderRequired: '必填',
267
+ formBuilderWidth: '宽度',
268
+ formBuilderWidthFull: '整行',
269
+ formBuilderWidthHalf: '一半',
270
+ formBuilderWidthThird: '三分之一',
271
+ formBuilderWidthTwoThirds: '三分之二',
272
+ formBuilderOptions: '选项,每行一个(标签 或 标签=值)',
273
+ formBuilderMin: '最小值',
274
+ formBuilderMax: '最大值',
275
+ formBuilderStep: '步长',
276
+ formBuilderMinLength: '最小长度',
277
+ formBuilderMaxLength: '最大长度',
278
+ formBuilderPattern: '模式(正则表达式)',
279
+ formBuilderPatternMessage: '不匹配时的提示',
280
+ formBuilderRows: '行数',
281
+ formBuilderShowWhen: '仅在以下情况显示',
282
+ formBuilderAlways: '始终',
283
+ formBuilderEquals: '等于',
284
+ formBuilderDuplicate: '复制',
285
+ formBuilderDelete: '删除',
286
+ formBuilderCopy: '复制',
287
+ formBuilderCopied: '已复制',
288
+ formBuilderSubmitted: '提交的值',
289
+ formBuilderSelectField: '选择一个字段进行编辑',
290
+ formFieldText: '文本',
291
+ formFieldEmail: '电子邮件',
292
+ formFieldPassword: '密码',
293
+ formFieldTel: '电话(简单)',
294
+ formFieldUrl: '链接',
295
+ formFieldTextarea: '长文本',
296
+ formFieldNumber: '数字',
297
+ formFieldSelect: '下拉列表',
298
+ formFieldAutocomplete: '可搜索列表',
299
+ formFieldRadio: '单选',
300
+ formFieldCheckbox: '复选框',
301
+ formFieldSwitch: '开关',
302
+ formFieldDate: '日期',
303
+ formFieldTime: '时间',
304
+ formFieldSlider: '滑块',
305
+ formFieldRating: '评分',
306
+ formFieldPhone: '带国家的电话',
307
+ formFieldHeading: '标题',
308
+ formFieldDivider: '分隔线',
309
+ pdfSignSignature: '签名',
310
+ pdfSignInitials: '姓名缩写',
311
+ pdfSignName: '姓名',
312
+ pdfSignDate: '日期',
313
+ pdfSignText: '文本',
314
+ pdfSignCheckbox: '复选框',
315
+ pdfSignHere: '在此签名',
316
+ pdfSignNext: '下一个字段',
317
+ pdfSignFinish: '完成',
318
+ pdfSignProgress: '{done} / {total} 个字段',
319
+ pdfSignDraw: '手写',
320
+ pdfSignTypeIt: '输入',
321
+ pdfSignAdopt: '签署',
322
+ pdfSignAddField: '添加字段',
323
+ pdfSignRequired: '必填',
324
+ pdfSignDelete: '删除字段',
325
+ pdfSignComplete: '所有字段已填写',
249
326
  trackingArrives: '预计 {time} 送达',
250
327
  trackingArrivingNow: '即将送达',
251
328
  trackingDelivered: '已送达',
package/src/pdf.ts CHANGED
@@ -13,3 +13,6 @@ export type {
13
13
  PdfState,
14
14
  PdfjsModule,
15
15
  } from './composables/usePdf'
16
+ export { default as MPdfSigner } from './components/MPdfSigner.vue'
17
+ export { signPdf, shownToUser, fieldMissing } from './composables/pdfSign'
18
+ export type { PdfSignField, SignPdfOptions } from './composables/pdfSign'
@@ -1,171 +0,0 @@
1
- import { t as e } from "./MSpinner-Cs03qoqE.js";
2
- import { t } from "./MIcon-DpajuUTJ.js";
3
- import { p as n } from "./MIconButton-BBggVwBV.js";
4
- import { Fragment as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, defineComponent as c, normalizeClass as l, normalizeStyle as u, openBlock as d, renderSlot as f, resolveDynamicComponent as p, unref as m, withCtx as h, withDirectives as g } from "vue";
5
- // src/components/MButton.vue?vue&type=script&setup=true&lang.ts
6
- var _ = "relative inline-flex items-center justify-center font-medium whitespace-nowrap overflow-hidden transition-[box-shadow,background-color,color] duration-150 select-none cursor-pointer disabled:cursor-not-allowed disabled:shadow-none disabled:text-on-surface/38 before:content-[''] before:pointer-events-none before:absolute before:inset-0 before:bg-current before:opacity-0 before:transition-opacity before:duration-150 enabled:hover:before:opacity-[0.08] enabled:active:before:opacity-[0.12]", v = /* @__PURE__ */ c({
7
- __name: "MButton",
8
- props: {
9
- variant: { default: "filled" },
10
- color: { default: "primary" },
11
- type: { default: "button" },
12
- disabled: {
13
- type: Boolean,
14
- default: !1
15
- },
16
- loading: {
17
- type: Boolean,
18
- default: !1
19
- },
20
- icon: {},
21
- iconFilled: { type: Boolean },
22
- iconPos: { default: "leading" },
23
- size: { default: "sm" },
24
- shape: { default: "rounded" },
25
- to: {},
26
- rippleColor: {},
27
- contentColor: {}
28
- },
29
- setup(c) {
30
- let v = ["primary", "error"], y = c, b = i(() => y.to ? "RouterLink" : "button"), x = i(() => !!y.color && !v.includes(y.color)), S = i(() => {
31
- if (x.value) return {
32
- "--color-primary": y.color,
33
- "--color-on-primary": "#ffffff",
34
- "--color-primary-container": y.color + "33",
35
- "--color-on-primary-container": y.color
36
- };
37
- }), C = i(() => y.color === "error"), w = /^(on-)?(primary|secondary|tertiary|error|surface|surface-variant|inverse-surface|inverse-primary)(-container|-variant)?$/, T = i(() => {
38
- let e = y.contentColor;
39
- return !e || y.disabled || y.loading ? S.value : {
40
- ...S.value,
41
- color: w.test(e) ? `var(--color-${e})` : e
42
- };
43
- }), E = i(() => {
44
- switch (y.variant) {
45
- case "filled":
46
- case "tonal":
47
- case "elevated": return "disabled:bg-on-surface/10";
48
- case "outlined": return C.value ? "disabled:border-error/10" : "disabled:border-outline-variant/10";
49
- default: return "";
50
- }
51
- }), D = {
52
- xs: {
53
- h: "h-8",
54
- text: "text-label-large",
55
- icon: 20,
56
- spinner: 16,
57
- gap: "gap-1",
58
- px: "px-3",
59
- pxText: "px-2",
60
- squareRadius: "rounded-md"
61
- },
62
- sm: {
63
- h: "h-10",
64
- text: "text-label-large",
65
- icon: 20,
66
- spinner: 16,
67
- gap: "gap-2",
68
- px: "px-4",
69
- pxText: "px-3",
70
- squareRadius: "rounded-md"
71
- },
72
- md: {
73
- h: "h-14",
74
- text: "text-title-medium",
75
- icon: 24,
76
- spinner: 18,
77
- gap: "gap-2",
78
- px: "px-6",
79
- pxText: "px-3",
80
- squareRadius: "rounded-lg"
81
- },
82
- lg: {
83
- h: "h-24",
84
- text: "text-headline-small",
85
- icon: 32,
86
- spinner: 26,
87
- gap: "gap-3",
88
- px: "px-12",
89
- pxText: "px-4",
90
- squareRadius: "rounded-xl"
91
- },
92
- xl: {
93
- h: "h-[136px]",
94
- text: "text-headline-large",
95
- icon: 40,
96
- spinner: 34,
97
- gap: "gap-4",
98
- px: "px-16",
99
- pxText: "px-4",
100
- squareRadius: "rounded-xl"
101
- }
102
- }, O = i(() => D[y.size] ?? D.sm), k = i(() => `${O.value.h} ${O.value.text} ${O.value.gap}`), A = i(() => O.value.icon), j = i(() => O.value.spinner), M = i(() => y.variant === "text" ? O.value.pxText : O.value.px), N = i(() => y.shape === "squared" ? O.value.squareRadius : "rounded-full"), P = i(() => {
103
- let e = C.value;
104
- switch (y.variant) {
105
- case "filled": return e ? "bg-error text-on-error enabled:hover:shadow-elevation-1 enabled:active:shadow-none" : "bg-primary text-on-primary enabled:hover:shadow-elevation-1 enabled:active:shadow-none";
106
- case "tonal": return e ? "bg-error-container text-on-error-container enabled:hover:shadow-elevation-1 enabled:active:shadow-none" : "bg-secondary-container text-on-secondary-container enabled:hover:shadow-elevation-1 enabled:active:shadow-none";
107
- case "elevated": return e ? "bg-surface-container-low text-error shadow-elevation-1 enabled:hover:shadow-elevation-2" : "bg-surface-container-low text-primary shadow-elevation-1 enabled:hover:shadow-elevation-2";
108
- case "outlined": return e ? "border border-error text-error" : "border border-outline-variant text-primary";
109
- case "text": return e ? "text-error" : "text-primary";
110
- default: return "";
111
- }
112
- });
113
- return (i, v) => g((d(), a(p(b.value), {
114
- to: c.to || void 0,
115
- type: c.to ? void 0 : c.type,
116
- disabled: c.disabled || c.loading,
117
- class: l([
118
- _,
119
- N.value,
120
- k.value,
121
- M.value,
122
- P.value,
123
- E.value
124
- ]),
125
- style: u(T.value)
126
- }, {
127
- default: h(() => [
128
- c.iconPos === "leading" ? (d(), s(r, { key: 0 }, [c.loading ? (d(), a(e, {
129
- key: 0,
130
- size: j.value
131
- }, null, 8, ["size"])) : c.icon ? (d(), a(t, {
132
- key: 1,
133
- name: c.icon,
134
- size: A.value,
135
- filled: c.iconFilled
136
- }, null, 8, [
137
- "name",
138
- "size",
139
- "filled"
140
- ])) : o("", !0)], 64)) : o("", !0),
141
- f(i.$slots, "default"),
142
- c.iconPos === "trailing" ? (d(), s(r, { key: 1 }, [c.loading ? (d(), a(e, {
143
- key: 0,
144
- size: j.value
145
- }, null, 8, ["size"])) : c.icon ? (d(), a(t, {
146
- key: 1,
147
- name: c.icon,
148
- size: A.value,
149
- filled: c.iconFilled
150
- }, null, 8, [
151
- "name",
152
- "size",
153
- "filled"
154
- ])) : o("", !0)], 64)) : o("", !0)
155
- ]),
156
- _: 3
157
- }, 8, [
158
- "to",
159
- "type",
160
- "disabled",
161
- "class",
162
- "style"
163
- ])), [[m(n), {
164
- disabled: c.disabled || c.loading,
165
- color: c.rippleColor
166
- }]]);
167
- }
168
- });
169
- export { v as t };
170
-
171
- //# sourceMappingURL=MButton-CN3wYwIG.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MButton-CN3wYwIG.js","names":["_withDirectives","_openBlock","_createBlock","_resolveDynamicComponent","_normalizeClass","_normalizeStyle","_withCtx","_createElementBlock","_Fragment","MSpinner","MIcon","_renderSlot","_unref","MSpinner_default","vRipple","base","MButton_default","defineComponent","NAMED_COLORS","props","__props","tag","computed","isCustomColor","customStyle","isError","ROLE","style","c","disabledContainerClasses","sizeMap","s","sizeClasses","iconSize","spinnerSize","px","shapeClass","variantClasses","err","withDirectives","openBlock","createBlock","resolveDynamicComponent","normalizeClass","normalizeStyle","withCtx","createElementBlock","Fragment","MIcon_default","createCommentVNode","renderSlot","_ctx","unref"],"sources":["../src/components/MButton.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * The standard M3 button — five variants, five expressive size tiers, and either color.\n *\n * @slot default The button's label.\n */\nimport { computed } from 'vue'\nimport MSpinner from './MSpinner.vue'\nimport MIcon from './MIcon.vue'\nimport { vRipple } from '../directives/vRipple'\n\nconst NAMED_COLORS = ['primary', 'error'] as const\ntype NamedColor = (typeof NAMED_COLORS)[number]\n\nconst props = withDefaults(\n defineProps<{\n /** Visual style of the button */\n variant?: 'filled' | 'tonal' | 'outlined' | 'text' | 'elevated'\n /**\n * Named semantic color ('primary' | 'error') OR any CSS color string\n * ('red', '#e91e63', 'oklch(0.6 0.2 0)', …).\n * When a CSS color is passed, --color-primary is overridden for this button.\n */\n color?: string\n /** HTML button type */\n type?: 'button' | 'submit' | 'reset'\n /** Disables interaction */\n disabled?: boolean\n /** Shows a spinner and disables the button */\n loading?: boolean\n /** Material Symbol icon name shown next to the label */\n icon?: string\n /** Draw the icon filled (Material Symbols' FILL axis), e.g. a starred star or a play icon */\n iconFilled?: boolean\n /** Which side of the label the icon renders on */\n // Which side of the label `icon` renders on. Real M3 buttons support both via\n // `ButtonDefaults.contentPaddingFor(hasStartIcon/hasEndIcon)` — padding ends up identical\n // either way at every tier, so this only changes render order, not spacing.\n iconPos?: 'leading' | 'trailing'\n /**\n * M3's 5-tier expressive button sizing (xs: 32px, sm: 40px, md: 56px, lg: 96px, xl: 136px) — lg/xl are\n * meant for hero-style prominent buttons, not everyday UI\n */\n size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'\n /**\n * Button shape — rounded (pill, always) or squared (corner radius scales with size: 12px xs/sm, 16px md,\n * 28px lg/xl)\n */\n shape?: 'rounded' | 'squared'\n /** Vue Router destination — renders as RouterLink instead of button */\n to?: string | Record<string, any>\n /** Any CSS color for the press ripple; defaults to the button's content color */\n rippleColor?: string\n /**\n * Label and icon color, over what the variant and `color` give: an M3 role (`on-surface` for a neutral text\n * button, `on-primary-container`…) or any CSS color (`#000` on a white filled button). Disabled buttons keep\n * their own\n */\n contentColor?: string\n }>(),\n {\n variant: 'filled',\n color: 'primary',\n type: 'button',\n disabled: false,\n loading: false,\n iconPos: 'leading',\n size: 'sm',\n shape: 'rounded',\n },\n)\n\nconst tag = computed(() => props.to ? 'RouterLink' : 'button')\n\nconst isCustomColor = computed(\n () => !!props.color && !(NAMED_COLORS as readonly string[]).includes(props.color),\n)\n\nconst customStyle = computed(() => {\n if (!isCustomColor.value) return undefined\n return {\n '--color-primary': props.color,\n '--color-on-primary': '#ffffff',\n '--color-primary-container': props.color + '33',\n '--color-on-primary-container': props.color,\n }\n})\n\nconst isError = computed(() => props.color === 'error')\n\n// Color-role names (`on-surface`, `secondary-container`…) read the theme's token; anything else is a CSS color\nconst ROLE = /^(on-)?(primary|secondary|tertiary|error|surface|surface-variant|inverse-surface|inverse-primary)(-container|-variant)?$/\nconst style = computed(() => {\n const c = props.contentColor\n if (!c || props.disabled || props.loading) return customStyle.value\n return { ...customStyle.value, color: ROLE.test(c) ? `var(--color-${c})` : c }\n})\n\nconst base =\n 'relative inline-flex items-center justify-center font-medium ' +\n 'whitespace-nowrap overflow-hidden transition-[box-shadow,background-color,color] duration-150 select-none cursor-pointer ' +\n 'disabled:cursor-not-allowed disabled:shadow-none disabled:text-on-surface/38 ' +\n \"before:content-[''] before:pointer-events-none before:absolute before:inset-0 \" +\n 'before:bg-current before:opacity-0 before:transition-opacity before:duration-150 ' +\n 'enabled:hover:before:opacity-[0.08] enabled:active:before:opacity-[0.12]'\n\n// M3 disabled tokens: container at 10% on-surface opacity (DisabledContainerOpacity, same\n// across Filled/Tonal/Elevated), content/label always at 38% on-surface (handled in `base`\n// above, applies to every variant including text/elevated which have no container). The\n// outlined border uses the SAME color role as its enabled border (OutlineVariant, not\n// on-surface) just dimmed to that 10% too — see `variantClasses`' outlined case below for\n// why the enabled color is also outline-variant, not outline.\nconst disabledContainerClasses = computed(() => {\n switch (props.variant) {\n case 'filled':\n case 'tonal':\n case 'elevated':\n return 'disabled:bg-on-surface/10'\n case 'outlined':\n return isError.value ? 'disabled:border-error/10' : 'disabled:border-outline-variant/10'\n default:\n return ''\n }\n})\n\n/*\n * M3's newer 5-tier \"expressive\" button sizing (Button{XSmall,Small,Medium,Large,\n * XLarge}Tokens.kt + Button.kt's size-variant overloads — @ExperimentalMaterial3ExpressiveApi\n * in Compose, but this `size` prop is deliberately implementing exactly that system, same\n * as MFabMenu/MLoadingIndicator already do for other Expressive-only components). Content\n * padding is IDENTICAL whether or not an icon is present at every tier in the default\n * (non \"precision pointer\") mode — e.g. `IconMediumLeadingPadding = MediumLeadingPadding`\n * verbatim in the real source — so there's deliberately no separate icon-vs-no-icon padding\n * split here, unlike the old version of this file which had one (and got the values wrong\n * in both directions). `gap` between icon and label also varies by tier (IconLabelSpace),\n * not a flat value for every size.\n */\nconst sizeMap = {\n xs: { h: 'h-8', text: 'text-label-large', icon: 20, spinner: 16, gap: 'gap-1', px: 'px-3', pxText: 'px-2', squareRadius: 'rounded-md' },\n sm: { h: 'h-10', text: 'text-label-large', icon: 20, spinner: 16, gap: 'gap-2', px: 'px-4', pxText: 'px-3', squareRadius: 'rounded-md' },\n md: { h: 'h-14', text: 'text-title-medium', icon: 24, spinner: 18, gap: 'gap-2', px: 'px-6', pxText: 'px-3', squareRadius: 'rounded-lg' },\n lg: { h: 'h-24', text: 'text-headline-small', icon: 32, spinner: 26, gap: 'gap-3', px: 'px-12', pxText: 'px-4', squareRadius: 'rounded-xl' },\n xl: { h: 'h-[136px]', text: 'text-headline-large', icon: 40, spinner: 34, gap: 'gap-4', px: 'px-16', pxText: 'px-4', squareRadius: 'rounded-xl' },\n}\n\nconst s = computed(() => sizeMap[props.size] ?? sizeMap.sm)\nconst sizeClasses = computed(() => `${s.value.h} ${s.value.text} ${s.value.gap}`)\nconst iconSize = computed(() => s.value.icon)\nconst spinnerSize = computed(() => s.value.spinner)\n\nconst px = computed(() => props.variant === 'text' ? s.value.pxText : s.value.px)\n\n// Squared shape radius scales with size, matching each tier's own ContainerShapeSquare\n// token (ButtonXSmallTokens/ButtonSmallTokens use CornerMedium=12px, ButtonMediumTokens\n// CornerLarge=16px, ButtonLargeTokens/ButtonXLargeTokens CornerExtraLarge=28px) — the\n// pill (ContainerShapeRound) is CornerFull at every tier, so that half doesn't vary.\nconst shapeClass = computed(() => props.shape === 'squared' ? s.value.squareRadius : 'rounded-full')\n\nconst variantClasses = computed(() => {\n const err = isError.value\n switch (props.variant) {\n case 'filled':\n return err\n ? 'bg-error text-on-error enabled:hover:shadow-elevation-1 enabled:active:shadow-none'\n : 'bg-primary text-on-primary enabled:hover:shadow-elevation-1 enabled:active:shadow-none'\n case 'tonal':\n return err\n ? 'bg-error-container text-on-error-container enabled:hover:shadow-elevation-1 enabled:active:shadow-none'\n : 'bg-secondary-container text-on-secondary-container enabled:hover:shadow-elevation-1 enabled:active:shadow-none'\n case 'elevated':\n return err\n ? 'bg-surface-container-low text-error shadow-elevation-1 enabled:hover:shadow-elevation-2'\n : 'bg-surface-container-low text-primary shadow-elevation-1 enabled:hover:shadow-elevation-2'\n case 'outlined':\n // OutlinedButtonTokens.OutlineColor = ColorSchemeKeyTokens.OutlineVariant, not Outline\n return err\n ? 'border border-error text-error'\n : 'border border-outline-variant text-primary'\n case 'text':\n return err\n ? 'text-error'\n : 'text-primary'\n default:\n return ''\n }\n})\n</script>\n\n<template>\n <component\n :is=\"tag\"\n :to=\"to || undefined\"\n :type=\"to ? undefined : type\"\n :disabled=\"disabled || loading\"\n :class=\"[base, shapeClass, sizeClasses, px, variantClasses, disabledContainerClasses]\"\n :style=\"style\"\n v-ripple=\"{ disabled: disabled || loading, color: rippleColor }\"\n >\n <template v-if=\"iconPos === 'leading'\">\n <MSpinner v-if=\"loading\" :size=\"spinnerSize\" />\n <MIcon v-else-if=\"icon\" :name=\"icon\" :size=\"iconSize\" :filled=\"iconFilled\" />\n </template>\n <slot />\n <template v-if=\"iconPos === 'trailing'\">\n <MSpinner v-if=\"loading\" :size=\"spinnerSize\" />\n <MIcon v-else-if=\"icon\" :name=\"icon\" :size=\"iconSize\" :filled=\"iconFilled\" />\n </template>\n </component>\n</template>\n"],"mappings":"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"}
@@ -1,167 +0,0 @@
1
- import { t as e } from "./MIconButton-BBggVwBV.js";
2
- import { i as t } from "./useLocale-Dh1xZZ8i.js";
3
- import { r as n } from "./_popupPosition-nL8SVKPK.js";
4
- import { t as r } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
5
- import { Fragment as i, Teleport as a, Transition as o, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createTextVNode as f, createVNode as p, defineComponent as m, getCurrentInstance as h, mergeProps as g, nextTick as _, normalizeClass as v, onBeforeUnmount as y, onUnmounted as b, openBlock as x, ref as S, renderSlot as C, toDisplayString as w, unref as T, useId as E, watch as D, withCtx as O, withModifiers as k } from "vue";
6
- // src/composables/_useScrollLock.ts
7
- var A = 0, j = "";
8
- function M() {
9
- A++ === 0 && (j = document.body.style.overflow, document.body.style.overflow = "hidden");
10
- }
11
- function N() {
12
- A > 0 && --A === 0 && (document.body.style.overflow = j);
13
- }
14
- function P(e) {
15
- let t = !1;
16
- function n(e) {
17
- typeof document < "u" && e !== t && (t = e, e ? M() : N());
18
- }
19
- return e && D(e, (e) => n(!!e), { immediate: !0 }), h() && y(() => n(!1)), { set: n };
20
- }
21
- // src/components/MDialog.vue?vue&type=script&setup=true&lang.ts
22
- var F = ["aria-labelledby", "aria-label"], I = {
23
- key: 0,
24
- class: "min-h-0 overflow-y-auto rounded-[inherit]"
25
- }, L = { class: "relative px-6 pt-6 pb-2" }, R = {
26
- key: 0,
27
- class: "absolute right-4 top-4"
28
- }, z = {
29
- key: 1,
30
- class: "mb-4 flex justify-center text-secondary"
31
- }, B = {
32
- key: 0,
33
- class: "shrink-0 border-t border-outline-variant"
34
- }, V = {
35
- key: 1,
36
- class: "flex flex-wrap justify-end gap-2 px-6 pt-4 pb-6"
37
- }, H = ["aria-labelledby", "aria-label"], U = {
38
- key: 0,
39
- class: "min-h-0 flex-1 overflow-y-auto"
40
- }, W = {
41
- key: 1,
42
- class: "flex h-14 shrink-0 items-center gap-2 px-2"
43
- }, G = {
44
- key: 1,
45
- class: "flex items-center gap-2"
46
- }, K = {
47
- key: 2,
48
- class: "flex-1 overflow-y-auto px-6 py-4 text-body-medium text-on-surface-variant"
49
- }, q = /*#__PURE__*/ r(/* @__PURE__ */ m({
50
- inheritAttrs: !1,
51
- __name: "MDialog",
52
- props: {
53
- modelValue: { type: Boolean },
54
- title: {},
55
- maxWidth: { default: "max-w-[560px]" },
56
- maxHeight: { default: "max-h-[90vh]" },
57
- persistent: {
58
- type: Boolean,
59
- default: !1
60
- },
61
- fullscreen: {
62
- type: Boolean,
63
- default: !1
64
- },
65
- closeLabel: {},
66
- closable: {
67
- type: Boolean,
68
- default: !0
69
- },
70
- bare: {
71
- type: Boolean,
72
- default: !1
73
- }
74
- },
75
- emits: ["update:modelValue"],
76
- setup(r, { emit: m }) {
77
- let h = r, y = t(), A = (e) => /^-?[\d.]+[a-z%]*$|^(calc|min|max|clamp|var)\(/i.test(e.trim()), j = s(() => [h.maxWidth, h.maxHeight].filter((e) => !A(e))), M = s(() => ({
78
- ...A(h.maxWidth) ? { maxWidth: h.maxWidth } : {},
79
- ...A(h.maxHeight) ? { maxHeight: h.maxHeight } : {}
80
- })), N = m;
81
- function q() {
82
- h.persistent || N("update:modelValue", !1);
83
- }
84
- let J = S(), Y = S(), X = S(!1), Z;
85
- function Q() {
86
- let e = J.value;
87
- e ? X.value = e.scrollHeight - e.scrollTop - e.clientHeight > 1 : X.value = !1;
88
- }
89
- P(() => h.modelValue), n(() => h.modelValue, q);
90
- let $ = `m3-dialog-${E()}`;
91
- return D(() => h.modelValue, async (e) => {
92
- typeof window < "u" && (e ? (await _(), Q(), Z = new ResizeObserver(Q), J.value && Z.observe(J.value), Y.value && Z.observe(Y.value)) : (Z?.disconnect(), Z = void 0));
93
- }, { immediate: !0 }), b(() => {
94
- Z?.disconnect();
95
- }), (t, n) => (x(), c(a, { to: "body" }, [r.fullscreen ? (x(), c(o, {
96
- key: 1,
97
- name: "m3-dialog-fs",
98
- appear: ""
99
- }, {
100
- default: O(() => [r.modelValue ? (x(), u("div", g({ key: 0 }, t.$attrs, {
101
- class: "dialog-fs m3-dialog-fs-surface fixed inset-0 z-50 flex flex-col",
102
- role: "dialog",
103
- "aria-modal": "true",
104
- "aria-labelledby": !r.bare && (t.$slots.title || r.title) ? $ : void 0,
105
- "aria-label": r.bare ? r.title : void 0
106
- }), [r.bare ? (x(), u("div", U, [C(t.$slots, "default", {}, void 0, !0)])) : (x(), u("div", W, [
107
- r.persistent ? l("", !0) : (x(), c(e, {
108
- key: 0,
109
- icon: "close",
110
- label: r.closeLabel ?? T(y).close,
111
- onClick: q
112
- }, null, 8, ["label"])),
113
- d("h2", {
114
- id: $,
115
- class: "flex-1 text-title-large font-medium text-on-surface"
116
- }, [C(t.$slots, "title", {}, () => [f(w(r.title), 1)], !0)]),
117
- t.$slots.actions ? (x(), u("div", G, [C(t.$slots, "actions", {}, void 0, !0)])) : l("", !0)
118
- ])), r.bare ? l("", !0) : (x(), u("div", K, [C(t.$slots, "default", {}, void 0, !0)]))], 16, H)) : l("", !0)]),
119
- _: 3
120
- })) : (x(), c(o, {
121
- key: 0,
122
- name: "m3-dialog",
123
- appear: ""
124
- }, {
125
- default: O(() => [r.modelValue ? (x(), u("div", {
126
- key: 0,
127
- class: "fixed inset-0 z-50 flex items-center justify-center bg-scrim/32 p-4",
128
- onClick: k(q, ["self"])
129
- }, [d("div", g(t.$attrs, {
130
- class: ["dialog-box m3-dialog-surface flex min-w-[280px] w-full flex-col", j.value],
131
- style: M.value,
132
- role: "dialog",
133
- "aria-modal": "true",
134
- "aria-labelledby": !r.bare && (t.$slots.title || r.title) ? $ : void 0,
135
- "aria-label": r.bare ? r.title : void 0
136
- }), [r.bare ? (x(), u("div", I, [C(t.$slots, "default", {}, void 0, !0)])) : (x(), u(i, { key: 1 }, [
137
- d("div", L, [
138
- r.closable && !r.persistent ? (x(), u("div", R, [p(e, {
139
- icon: "close",
140
- label: r.closeLabel ?? T(y).close,
141
- onClick: q
142
- }, null, 8, ["label"])])) : l("", !0),
143
- t.$slots.icon ? (x(), u("div", z, [C(t.$slots, "icon", {}, void 0, !0)])) : l("", !0),
144
- d("h2", {
145
- id: $,
146
- class: v(["text-headline-small text-on-surface", [t.$slots.icon ? "text-center" : "text-left", r.closable && !r.persistent ? t.$slots.icon ? "px-10" : "pr-10" : ""]])
147
- }, [C(t.$slots, "title", {}, () => [f(w(r.title), 1)], !0)], 2)
148
- ]),
149
- d("div", {
150
- ref_key: "contentEl",
151
- ref: J,
152
- class: v(["overflow-y-auto px-6 pt-2 text-body-medium text-on-surface-variant", t.$slots.actions ? "pb-2" : "pb-6"]),
153
- onScroll: Q
154
- }, [d("div", {
155
- ref_key: "contentInnerEl",
156
- ref: Y
157
- }, [C(t.$slots, "default", {}, void 0, !0)], 512)], 34),
158
- X.value && t.$slots.actions ? (x(), u("div", B)) : l("", !0),
159
- t.$slots.actions ? (x(), u("div", V, [C(t.$slots, "actions", {}, void 0, !0)])) : l("", !0)
160
- ], 64))], 16, F)])) : l("", !0)]),
161
- _: 3
162
- }))]));
163
- }
164
- }), [["__scopeId", "data-v-8f788bae"]]);
165
- export { P as n, q as t };
166
-
167
- //# sourceMappingURL=MDialog-1LAk9WAO.js.map