@maggioli-design-system/mds-input-tip 1.1.2 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/{index-f87612f6.js → index-442db91d.js} +14 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mds-input-tip.cjs.entry.js +2 -2
- package/dist/cjs/mds-input-tip.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/common/date.js +13 -0
- package/dist/collection/common/locale.js +25 -7
- package/dist/collection/components/mds-input-tip/mds-input-tip.css +1 -228
- package/dist/collection/dictionary/button.js +7 -1
- package/dist/collection/dictionary/variant.js +15 -1
- package/dist/collection/type/variant-file-format.js +0 -34
- package/dist/components/mds-input-tip.js +1 -1
- package/dist/documentation.json +3 -3
- package/dist/esm/{index-a04da9f4.js → index-8fed469d.js} +14 -3
- package/dist/esm/loader.js +2 -2
- package/dist/esm/mds-input-tip.entry.js +2 -2
- package/dist/esm/mds-input-tip.js +3 -3
- package/dist/esm-es5/index-8fed469d.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mds-input-tip.entry.js +1 -1
- package/dist/esm-es5/mds-input-tip.js +1 -1
- package/dist/mds-input-tip/mds-input-tip.esm.js +1 -1
- package/dist/mds-input-tip/mds-input-tip.js +1 -1
- package/dist/mds-input-tip/p-37c61f56.system.js +2 -0
- package/dist/mds-input-tip/p-3e967425.js +2 -0
- package/dist/mds-input-tip/p-4486a5e4.entry.js +1 -0
- package/dist/mds-input-tip/{p-ca408384.system.js → p-c915dfb3.system.js} +1 -1
- package/dist/mds-input-tip/p-fadf816e.system.entry.js +1 -0
- package/dist/stats.json +38 -36
- package/dist/types/common/date.d.ts +4 -0
- package/dist/types/common/file.d.ts +3 -4
- package/dist/types/common/locale.d.ts +5 -2
- package/dist/types/dictionary/button.d.ts +2 -1
- package/dist/types/dictionary/file-extensions.d.ts +2 -1
- package/dist/types/dictionary/variant.d.ts +3 -1
- package/dist/types/stencil-public-runtime.d.ts +6 -0
- package/dist/types/type/autocomplete.d.ts +1 -1
- package/dist/types/type/button.d.ts +1 -1
- package/dist/types/type/date.d.ts +5 -0
- package/dist/types/type/header-bar.d.ts +2 -0
- package/dist/types/type/input.d.ts +3 -0
- package/dist/types/type/variant-file-format.d.ts +4 -4
- package/dist/types/type/variant.d.ts +3 -2
- package/documentation.json +56 -31
- package/package.json +5 -5
- package/src/common/date.ts +21 -0
- package/src/common/file.ts +2 -3
- package/src/common/locale.ts +29 -9
- package/src/common/unit.ts +1 -1
- package/src/components/mds-input-tip/.gitlab-ci.yml +5 -10
- package/src/components/mds-input-tip/mds-input-tip.css +2 -2
- package/src/dictionary/button.ts +8 -0
- package/src/dictionary/file-extensions.ts +3 -1
- package/src/dictionary/variant.ts +18 -0
- package/src/fixtures/icons.json +45 -2
- package/src/fixtures/iconsauce.json +37 -0
- package/src/tailwind/components.css +1 -1
- package/src/type/autocomplete.ts +0 -1
- package/src/type/button.ts +1 -0
- package/src/type/date.ts +10 -0
- package/src/type/header-bar.ts +11 -0
- package/src/type/input.ts +4 -0
- package/src/type/variant-file-format.ts +20 -37
- package/src/type/variant.ts +10 -2
- package/www/build/mds-input-tip.esm.js +1 -1
- package/www/build/mds-input-tip.js +1 -1
- package/www/build/p-37c61f56.system.js +2 -0
- package/www/build/p-3e967425.js +2 -0
- package/www/build/p-4486a5e4.entry.js +1 -0
- package/www/build/{p-ca408384.system.js → p-c915dfb3.system.js} +1 -1
- package/www/build/p-fadf816e.system.entry.js +1 -0
- package/dist/esm-es5/index-a04da9f4.js +0 -1
- package/dist/mds-input-tip/p-14639038.entry.js +0 -1
- package/dist/mds-input-tip/p-58828816.system.js +0 -2
- package/dist/mds-input-tip/p-96bf634c.js +0 -2
- package/dist/mds-input-tip/p-ed74ada1.system.entry.js +0 -1
- package/dist/types/interface/input-value.d.ts +0 -4
- package/dist/types/type/language.d.ts +0 -1
- package/src/interface/input-value.ts +0 -5
- package/src/type/language.ts +0 -4
- package/www/build/p-14639038.entry.js +0 -1
- package/www/build/p-58828816.system.js +0 -2
- package/www/build/p-96bf634c.js +0 -2
- package/www/build/p-ed74ada1.system.entry.js +0 -1
- /package/dist/collection/{interface/input-value.js → type/date.js} +0 -0
- /package/dist/collection/type/{language.js → header-bar.js} +0 -0
@@ -2,3 +2,6 @@ export type InputControlsLayoutType = 'horizontal' | 'vertical';
|
|
2
2
|
export type InputControlsIconType = 'arrow' | 'arithmetic';
|
3
3
|
export type InputValueType = null | number | string | undefined;
|
4
4
|
export type InputTextType = 'date' | 'email' | 'number' | 'password' | 'search' | 'tel' | 'text' | 'textarea' | 'time' | 'url';
|
5
|
+
export interface MdsInputEventDetail {
|
6
|
+
value?: File | string | FormData | null;
|
7
|
+
}
|
@@ -1,11 +1,11 @@
|
|
1
|
+
import { ThemeFullVariantType } from "./variant";
|
2
|
+
type FileFormat = 'archive' | 'attachment' | 'audio' | 'code' | 'data' | 'document' | 'email' | 'executable' | 'image' | 'markup' | 'slide' | 'spreadsheet' | 'text' | 'vector' | 'video';
|
1
3
|
interface FileFormatVariant {
|
2
|
-
color: string;
|
3
4
|
icon: string;
|
4
|
-
|
5
|
-
variant: string;
|
5
|
+
variant: ThemeFullVariantType;
|
6
6
|
}
|
7
7
|
interface FileFormatVariants {
|
8
8
|
[key: string]: FileFormatVariant;
|
9
9
|
}
|
10
10
|
declare const fileFormatsVariant: FileFormatVariants;
|
11
|
-
export { fileFormatsVariant, FileFormatVariant, FileFormatVariants, };
|
11
|
+
export { fileFormatsVariant, FileFormat, FileFormatVariant, FileFormatVariants, };
|
@@ -5,8 +5,9 @@ export type ThemeFullVariantAvatarType = 'amaranth' | 'aqua' | 'blue' | 'error'
|
|
5
5
|
export type ThemeLuminanceVariantType = 'dark' | 'light';
|
6
6
|
export type LabelVariantType = 'amaranth' | 'aqua' | 'blue' | 'green' | 'lime' | 'orange' | 'orchid' | 'sky' | 'violet' | 'yellow';
|
7
7
|
export type ActionVariantType = 'primary' | 'dark' | 'light';
|
8
|
+
export type ChipVariantType = 'primary' | 'secondary' | 'dark' | 'error' | 'info' | 'success' | 'warning';
|
8
9
|
export type StateVariantType = 'disabled' | 'focused' | 'readonly';
|
9
|
-
export type ToneActionVariantType = 'primary' | 'secondary' | '
|
10
|
+
export type ToneActionVariantType = 'primary' | 'secondary' | 'strong' | 'weak' | 'ghost' | 'quiet';
|
10
11
|
export type ToneVariantType = 'strong' | 'weak' | 'ghost' | 'quiet';
|
11
|
-
export type ToneSimpleVariantType = '
|
12
|
+
export type ToneSimpleVariantType = 'quiet' | 'strong' | 'weak';
|
12
13
|
export type ToneMinimalVariantType = 'strong' | 'weak';
|
package/documentation.json
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
{
|
2
|
-
"timestamp": "2024-
|
2
|
+
"timestamp": "2024-11-25T16:00:58",
|
3
3
|
"compiler": {
|
4
4
|
"name": "@stencil/core",
|
5
|
-
"version": "4.
|
6
|
-
"typescriptVersion": "5.5.
|
5
|
+
"version": "4.22.2",
|
6
|
+
"typescriptVersion": "5.5.4"
|
7
7
|
},
|
8
8
|
"components": [
|
9
9
|
{
|
@@ -114,6 +114,11 @@
|
|
114
114
|
"docstring": "",
|
115
115
|
"path": "src/components/mds-accordion-item/meta/event-detail.ts"
|
116
116
|
},
|
117
|
+
"src/components/mds-accordion-timer/meta/event-detail.ts::MdsAccordionTimerEventDetail": {
|
118
|
+
"declaration": "export interface MdsAccordionTimerEventDetail {\n index: number;\n}",
|
119
|
+
"docstring": "",
|
120
|
+
"path": "src/components/mds-accordion-timer/meta/event-detail.ts"
|
121
|
+
},
|
117
122
|
"src/components/mds-accordion-timer-item/meta/event-detail.ts::MdsAccordionTimerItemEventDetail": {
|
118
123
|
"declaration": "export interface MdsAccordionTimerItemEventDetail {\n selected: boolean;\n uuid: number;\n}",
|
119
124
|
"docstring": "",
|
@@ -134,8 +139,8 @@
|
|
134
139
|
"docstring": "",
|
135
140
|
"path": "src/type/variant.ts"
|
136
141
|
},
|
137
|
-
"src/type/variant.ts::
|
138
|
-
"declaration": "export type
|
142
|
+
"src/type/variant.ts::ToneVariantType": {
|
143
|
+
"declaration": "export type ToneVariantType =\n | 'strong' // background strong\n | 'weak' // background weak\n | 'ghost' // bordered\n | 'quiet'",
|
139
144
|
"docstring": "",
|
140
145
|
"path": "src/type/variant.ts"
|
141
146
|
},
|
@@ -159,6 +164,11 @@
|
|
159
164
|
"docstring": "",
|
160
165
|
"path": "src/type/variant.ts"
|
161
166
|
},
|
167
|
+
"src/type/variant.ts::ToneSimpleVariantType": {
|
168
|
+
"declaration": "export type ToneSimpleVariantType =\n | 'quiet'\n | 'strong'\n | 'weak'",
|
169
|
+
"docstring": "",
|
170
|
+
"path": "src/type/variant.ts"
|
171
|
+
},
|
162
172
|
"src/components/mds-benchmark-bar/meta/types.ts::BenchmarkBarTypographyType": {
|
163
173
|
"declaration": "export type BenchmarkBarTypographyType =\n | 'option'\n | 'label'",
|
164
174
|
"docstring": "",
|
@@ -195,15 +205,10 @@
|
|
195
205
|
"path": "src/type/button.ts"
|
196
206
|
},
|
197
207
|
"src/type/button.ts::ButtonVariantType": {
|
198
|
-
"declaration": "export type ButtonVariantType =\n | 'primary'\n | 'dark'\n | 'light'\n | 'error'\n | 'info'\n | 'success'\n | 'warning'",
|
208
|
+
"declaration": "export type ButtonVariantType =\n | 'primary'\n | 'secondary'\n | 'dark'\n | 'light'\n | 'error'\n | 'info'\n | 'success'\n | 'warning'",
|
199
209
|
"docstring": "",
|
200
210
|
"path": "src/type/button.ts"
|
201
211
|
},
|
202
|
-
"src/type/variant.ts::ToneVariantType": {
|
203
|
-
"declaration": "export type ToneVariantType =\n | 'strong' // background strong\n | 'weak' // background weak\n | 'ghost' // bordered\n | 'quiet'",
|
204
|
-
"docstring": "",
|
205
|
-
"path": "src/type/variant.ts"
|
206
|
-
},
|
207
212
|
"src/type/button.ts::ButtonSizeType": {
|
208
213
|
"declaration": "export type ButtonSizeType =\n | 'sm'\n | 'md'\n | 'lg'\n | 'xl'",
|
209
214
|
"docstring": "",
|
@@ -214,6 +219,11 @@
|
|
214
219
|
"docstring": "",
|
215
220
|
"path": "src/type/button.ts"
|
216
221
|
},
|
222
|
+
"src/type/variant.ts::ChipVariantType": {
|
223
|
+
"declaration": "export type ChipVariantType =\n | 'primary'\n | 'secondary'\n | 'dark'\n | 'error'\n | 'info'\n | 'success'\n | 'warning'",
|
224
|
+
"docstring": "",
|
225
|
+
"path": "src/type/variant.ts"
|
226
|
+
},
|
217
227
|
"src/components/mds-chip/meta/interface.ts::MdsChipEvent": {
|
218
228
|
"declaration": "interface MdsChipEvent {\n event: Event\n element: HTMLMdsChipElement\n}",
|
219
229
|
"docstring": "",
|
@@ -255,7 +265,7 @@
|
|
255
265
|
"path": "src/type/text.ts"
|
256
266
|
},
|
257
267
|
"src/components/mds-file-preview/meta/event-detail.ts::MdsFilePreviewEventDetail": {
|
258
|
-
"declaration": "export interface MdsFilePreviewEventDetail {\n extension: string\n filename: string\n target:
|
268
|
+
"declaration": "export interface MdsFilePreviewEventDetail {\n extension: string\n filename: string\n target: HTMLMdsFilePreviewElement\n}",
|
259
269
|
"docstring": "",
|
260
270
|
"path": "src/components/mds-file-preview/meta/event-detail.ts"
|
261
271
|
},
|
@@ -269,10 +279,15 @@
|
|
269
279
|
"docstring": "",
|
270
280
|
"path": "src/components/mds-filter-item/meta/event-detail.ts"
|
271
281
|
},
|
272
|
-
"src/
|
273
|
-
"declaration": "export type
|
282
|
+
"src/type/header-bar.ts::HeaderBarMenuType": {
|
283
|
+
"declaration": "export type HeaderBarMenuType =\n | 'all'\n | 'desktop'\n | 'mobile'\n | 'none'",
|
274
284
|
"docstring": "",
|
275
|
-
"path": "src/
|
285
|
+
"path": "src/type/header-bar.ts"
|
286
|
+
},
|
287
|
+
"src/type/header-bar.ts::HeaderBarNavType": {
|
288
|
+
"declaration": "export type HeaderBarNavType =\n | 'all'\n | 'desktop'\n | 'mobile'\n | 'none'",
|
289
|
+
"docstring": "",
|
290
|
+
"path": "src/type/header-bar.ts"
|
276
291
|
},
|
277
292
|
"src/components/mds-header/meta/event-detail.ts::MdsHeaderEventDetail": {
|
278
293
|
"declaration": "export interface MdsHeaderEventDetail {\n bar: HTMLMdsHeaderBarElement\n}",
|
@@ -310,7 +325,7 @@
|
|
310
325
|
"path": "src/components/mds-img/meta/event-detail.ts"
|
311
326
|
},
|
312
327
|
"src/type/autocomplete.ts::AutocompleteType": {
|
313
|
-
"declaration": "export type AutocompleteType =\n | 'additional-name'\n | 'address'\n | 'address-level1'\n | 'address-level2'\n | 'address-level3'\n | 'address-level4'\n | 'address-line1'\n | 'address-line2'\n | 'address-line3'\n | 'bday'\n | 'bday-day'\n | 'bday-month'\n | 'bday-year'\n | 'cc-additional-name'\n | 'cc-csc'\n | 'cc-exp'\n | 'cc-exp-month'\n | 'cc-exp-year'\n | 'cc-family-name'\n | 'cc-
|
328
|
+
"declaration": "export type AutocompleteType =\n | 'additional-name'\n | 'address'\n | 'address-level1'\n | 'address-level2'\n | 'address-level3'\n | 'address-level4'\n | 'address-line1'\n | 'address-line2'\n | 'address-line3'\n | 'bday'\n | 'bday-day'\n | 'bday-month'\n | 'bday-year'\n | 'cc-additional-name'\n | 'cc-csc'\n | 'cc-exp'\n | 'cc-exp-month'\n | 'cc-exp-year'\n | 'cc-family-name'\n | 'cc-given-name'\n | 'cc-name'\n | 'cc-number'\n | 'cc-type'\n | 'country'\n | 'country-name'\n | 'current-password'\n | 'email'\n | 'family-name'\n | 'given-name'\n | 'honorific-prefix'\n | 'honorific-suffix'\n | 'impp'\n | 'language'\n | 'name'\n | 'new-password'\n | 'nickname'\n | 'off'\n | 'on'\n | 'one-time-code'\n | 'organization'\n | 'organization-title'\n | 'photo'\n | 'postal-code'\n | 'sex'\n | 'street-address'\n | 'tel'\n | 'tel-area-code'\n | 'tel-country-code'\n | 'tel-extension'\n | 'tel-local'\n | 'tel-national'\n | 'transaction-amount'\n | 'transaction-currency'\n | 'url'\n | 'username'",
|
314
329
|
"docstring": "",
|
315
330
|
"path": "src/type/autocomplete.ts"
|
316
331
|
},
|
@@ -339,10 +354,10 @@
|
|
339
354
|
"docstring": "",
|
340
355
|
"path": "src/type/typography.ts"
|
341
356
|
},
|
342
|
-
"src/
|
343
|
-
"declaration": "export interface MdsInputEventDetail {\n value?: string\n}",
|
357
|
+
"src/type/input.ts::MdsInputEventDetail": {
|
358
|
+
"declaration": "export interface MdsInputEventDetail {\n value?: File | string | FormData | null\n}",
|
344
359
|
"docstring": "",
|
345
|
-
"path": "src/
|
360
|
+
"path": "src/type/input.ts"
|
346
361
|
},
|
347
362
|
"src/components/mds-input-field/meta/types.ts::InputFieldType": {
|
348
363
|
"declaration": "export type InputFieldType =\n | 'date'\n | 'email'\n | 'number'\n | 'password'\n | 'search'\n | 'tel'\n | 'text'\n | 'textarea'\n | 'time'\n | 'url'\n | 'cc'\n | 'cf'\n | 'isbn'\n | 'piva'",
|
@@ -359,11 +374,6 @@
|
|
359
374
|
"docstring": "",
|
360
375
|
"path": "src/components/mds-input-field/meta/validators.ts"
|
361
376
|
},
|
362
|
-
"src/interface/input-value.ts::InputValue": {
|
363
|
-
"declaration": "export interface InputValue {\n value: InputValueType\n}",
|
364
|
-
"docstring": "",
|
365
|
-
"path": "src/interface/input-value.ts"
|
366
|
-
},
|
367
377
|
"src/components/mds-input-switch/meta/types.ts::InputSwitchSizeType": {
|
368
378
|
"declaration": "export type InputSwitchSizeType =\n | 'sm'\n | 'md'\n | 'lg'",
|
369
379
|
"docstring": "",
|
@@ -410,7 +420,12 @@
|
|
410
420
|
"path": "src/type/typography.ts"
|
411
421
|
},
|
412
422
|
"src/components/mds-modal/meta/types.ts::ModalPositionType": {
|
413
|
-
"declaration": "export type ModalPositionType =\n | 'bottom'\n | 'center'\n | 'left'\n | 'right'\n | 'top'",
|
423
|
+
"declaration": "export type ModalPositionType =\n | 'bottom'\n | 'bottom-left'\n | 'bottom-right'\n | 'center'\n | 'left'\n | 'right'\n | 'top'\n | 'top-left'\n | 'top-right'",
|
424
|
+
"docstring": "",
|
425
|
+
"path": "src/components/mds-modal/meta/types.ts"
|
426
|
+
},
|
427
|
+
"src/components/mds-modal/meta/types.ts::ModalAnimationStateType": {
|
428
|
+
"declaration": "export type ModalAnimationStateType =\n | 'intro'\n | 'none'\n | 'outro'",
|
414
429
|
"docstring": "",
|
415
430
|
"path": "src/components/mds-modal/meta/types.ts"
|
416
431
|
},
|
@@ -449,13 +464,8 @@
|
|
449
464
|
"docstring": "",
|
450
465
|
"path": "src/components/mds-pref-contrast/meta/types.ts"
|
451
466
|
},
|
452
|
-
"src/type/language.ts::LanguageType": {
|
453
|
-
"declaration": "export type LanguageType =\n | 'auto'\n | `${Lowercase<string>}${Lowercase<string>}`\n | `${Lowercase<string>}${Lowercase<string>}${Lowercase<string>}`",
|
454
|
-
"docstring": "",
|
455
|
-
"path": "src/type/language.ts"
|
456
|
-
},
|
457
467
|
"src/event-detail/language.ts::MdsPrefLanguageEventDetail": {
|
458
|
-
"declaration": "export interface MdsPrefLanguageEventDetail {\n language?:
|
468
|
+
"declaration": "export interface MdsPrefLanguageEventDetail {\n /* A string representing the language version as defined in {@link https://datatracker.ietf.org/doc/html/rfc5646 RFC 5646: Tags for Identifying Languages (also known as BCP 47)}.\n *\n * `Examples of valid language codes include \"en\", \"en-US\", \"fr\", \"fr-FR\", \"es-ES\", etc.`\n */\n language?: string\n}",
|
459
469
|
"docstring": "",
|
460
470
|
"path": "src/event-detail/language.ts"
|
461
471
|
},
|
@@ -479,6 +489,16 @@
|
|
479
489
|
"docstring": "",
|
480
490
|
"path": "src/components/mds-progress/meta/types.ts"
|
481
491
|
},
|
492
|
+
"src/type/date.ts::ISO8601Date": {
|
493
|
+
"declaration": "type ISO8601Date = ISO8601DateFormat<string, 'ISO8601Date'>",
|
494
|
+
"docstring": "",
|
495
|
+
"path": "src/type/date.ts"
|
496
|
+
},
|
497
|
+
"src/components/mds-push-notification/meta/types.ts::NotificationDateFormatType": {
|
498
|
+
"declaration": "string",
|
499
|
+
"docstring": "",
|
500
|
+
"path": "src/components/mds-push-notification/meta/types.ts"
|
501
|
+
},
|
482
502
|
"src/components/mds-push-notification/meta/types.ts::NotificationPreviewType": {
|
483
503
|
"declaration": "export type NotificationPreviewType =\n | 'avatar'\n | 'image'",
|
484
504
|
"docstring": "",
|
@@ -519,6 +539,11 @@
|
|
519
539
|
"docstring": "",
|
520
540
|
"path": "src/components/mds-tab-item/meta/event-detail.ts"
|
521
541
|
},
|
542
|
+
"src/components/mds-table-header-cell/meta/types.ts::SortDirectionType": {
|
543
|
+
"declaration": "export type SortDirectionType =\n | 'asc'\n | 'desc'\n | 'none'",
|
544
|
+
"docstring": "",
|
545
|
+
"path": "src/components/mds-table-header-cell/meta/types.ts"
|
546
|
+
},
|
522
547
|
"src/components/mds-text/meta/types.ts::TextAnimationType": {
|
523
548
|
"declaration": "export type TextAnimationType =\n | 'none'\n | 'yugop'",
|
524
549
|
"docstring": "",
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@maggioli-design-system/mds-input-tip",
|
3
|
-
"version": "1.1
|
4
|
-
"description": "mds-input-tip is a web-component from Magma Design System, built with StencilJS, TypeScript, Storybook. It's based on the web-component standard and it's designed to be agnostic from the
|
3
|
+
"version": "1.2.1",
|
4
|
+
"description": "mds-input-tip is a web-component from Magma Design System, built with StencilJS, TypeScript, Storybook. It's based on the web-component standard and it's designed to be agnostic from the JavaScript framework you are using.",
|
5
5
|
"main": "dist/index.cjs.js",
|
6
6
|
"module": "dist/index.js",
|
7
7
|
"es2015": "dist/esm/index.mjs",
|
@@ -24,9 +24,9 @@
|
|
24
24
|
"test": "stencil test --spec --e2e"
|
25
25
|
},
|
26
26
|
"dependencies": {
|
27
|
-
"@maggioli-design-system/mds-input-tip-item": "1.1
|
28
|
-
"@maggioli-design-system/styles": "15.
|
29
|
-
"@stencil/core": "4.
|
27
|
+
"@maggioli-design-system/mds-input-tip-item": "1.2.1",
|
28
|
+
"@maggioli-design-system/styles": "15.5.0",
|
29
|
+
"@stencil/core": "4.22.2"
|
30
30
|
},
|
31
31
|
"license": "MIT",
|
32
32
|
"author": {
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import { ISO8601Date } from '@type/date'
|
2
|
+
|
3
|
+
// ISO 8601 date regex allowing optional components (month, day, time)
|
4
|
+
const ISO8601RegexString = '^\\d{4}(-\\d{2})?(-\\d{2})?(T\\d{2}(:\\d{2})?(:\\d{2})?(\\.\\d{3})?)?([+-]\\d{2}:\\d{2}|Z)?$'
|
5
|
+
|
6
|
+
const isISO8601Date = (dateString: string): boolean => {
|
7
|
+
const ISO8601Regex = new RegExp(ISO8601RegexString)
|
8
|
+
return ISO8601Regex.test(dateString)
|
9
|
+
}
|
10
|
+
|
11
|
+
const sanitizeISO8601Date = (dateString: string): ISO8601Date => {
|
12
|
+
if (isISO8601Date(dateString)) {
|
13
|
+
return dateString as ISO8601Date
|
14
|
+
}
|
15
|
+
return new Date(dateString).toISOString() as ISO8601Date
|
16
|
+
}
|
17
|
+
|
18
|
+
export {
|
19
|
+
sanitizeISO8601Date,
|
20
|
+
isISO8601Date,
|
21
|
+
}
|
package/src/common/file.ts
CHANGED
@@ -1,11 +1,10 @@
|
|
1
1
|
import { fileExtensionsDictionary, ExtensionInfo } from '@dictionary/file-extensions'
|
2
2
|
import { fileFormatsVariant } from '@type/variant-file-format'
|
3
|
+
import { ThemeFullVariantType } from '@type/variant'
|
3
4
|
|
4
5
|
interface FileFormatsVariants {
|
5
|
-
color: string
|
6
6
|
icon: string
|
7
|
-
|
8
|
-
variant: string
|
7
|
+
variant: ThemeFullVariantType
|
9
8
|
}
|
10
9
|
|
11
10
|
const sanitizeFilename = (filename: string, error: string = 'Attribute "filename" is undefined.') => {
|
package/src/common/locale.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import
|
1
|
+
import { render } from 'mustache'
|
2
2
|
|
3
3
|
type LocaleConfig = {
|
4
4
|
el?: Record<string, string | string[]>
|
@@ -12,30 +12,51 @@ export class Locale {
|
|
12
12
|
language: string
|
13
13
|
config: LocaleConfig
|
14
14
|
closestElement:HTMLElement
|
15
|
+
element: HTMLElement
|
15
16
|
|
16
|
-
constructor (configData
|
17
|
+
constructor (configData?: LocaleConfig) {
|
18
|
+
if (configData) {
|
19
|
+
this.set(configData)
|
20
|
+
}
|
21
|
+
}
|
22
|
+
|
23
|
+
set = (configData: LocaleConfig): void => {
|
17
24
|
this.config = configData
|
18
25
|
}
|
19
26
|
|
20
|
-
lang = (
|
21
|
-
this.
|
27
|
+
lang = (el: HTMLElement): string => {
|
28
|
+
this.element = el
|
29
|
+
this.closestElement = this.element.closest('[lang]') as HTMLElement
|
22
30
|
|
23
|
-
|
24
31
|
if (this.closestElement) {
|
25
32
|
if (this.closestElement.lang) {
|
26
33
|
this.language = this.closestElement.lang
|
27
|
-
return
|
34
|
+
return this.language
|
28
35
|
}
|
29
36
|
}
|
30
37
|
|
31
38
|
this.language = this.rollbackLanguage
|
39
|
+
return this.language
|
40
|
+
}
|
41
|
+
|
42
|
+
update = (doc?: Document | ShadowRoot): void => {
|
43
|
+
const context = doc ?? this.element.shadowRoot
|
44
|
+
context && context.querySelectorAll('*').forEach(el => {
|
45
|
+
if (el.tagName.toLowerCase().startsWith('mds-')) {
|
46
|
+
// eslint-disable-next-line no-restricted-syntax
|
47
|
+
if (el && 'updateLang' in el) {
|
48
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
49
|
+
(el as any).updateLang()
|
50
|
+
}
|
51
|
+
}
|
52
|
+
})
|
32
53
|
}
|
33
54
|
|
34
55
|
private pluralize = (tag: string | string[], context: Record<string, string | number>): string => {
|
35
56
|
|
36
57
|
const languagePhrase: string | string[] = this.config[this.language] ? this.config[this.language][tag] : this.config[this.rollbackLanguage][tag]
|
37
58
|
const phrases: string[] = []
|
38
|
-
|
59
|
+
|
39
60
|
if (Array.isArray(languagePhrase)) {
|
40
61
|
phrases.push(languagePhrase[0])
|
41
62
|
phrases.push(languagePhrase[1])
|
@@ -57,8 +78,7 @@ export class Locale {
|
|
57
78
|
}
|
58
79
|
}
|
59
80
|
|
60
|
-
|
61
|
-
return template(context)
|
81
|
+
return render(translatePhrase, context)
|
62
82
|
}
|
63
83
|
|
64
84
|
get = (tag: string | string[], context?: Record<string, string | number>): string => {
|
package/src/common/unit.ts
CHANGED
@@ -2,24 +2,19 @@
|
|
2
2
|
variables:
|
3
3
|
COMPONENT: mds-input-tip
|
4
4
|
|
5
|
-
# ISOLATE
|
6
|
-
input-tip-isolate:
|
7
|
-
extends: [.base-isolate, .base-input-tip]
|
8
|
-
dependencies: [base-stencil-build]
|
9
|
-
|
10
5
|
# TEST
|
11
6
|
input-tip-publish-test:
|
12
7
|
extends: [.base-stencil-publish-test, .base-input-tip]
|
13
|
-
dependencies: [base-stencil-build,
|
8
|
+
dependencies: [base-stencil-build, base-isolate]
|
14
9
|
|
15
10
|
# PUBLISH
|
16
11
|
input-tip-publish:
|
17
12
|
extends: [.base-stencil-publish, .base-input-tip]
|
18
|
-
dependencies: [base-stencil-build,
|
19
|
-
needs: [base-stencil-build,
|
13
|
+
dependencies: [base-stencil-build, base-isolate]
|
14
|
+
needs: [base-stencil-build, base-isolate, input-tip-publish-test]
|
20
15
|
|
21
16
|
# INSTALL TEST
|
22
17
|
input-tip-install-test:
|
23
18
|
extends: [.base-stencil-install-test, .base-input-tip]
|
24
|
-
dependencies: [base-stencil-build,
|
25
|
-
needs: [base-stencil-build,
|
19
|
+
dependencies: [base-stencil-build, base-isolate]
|
20
|
+
needs: [base-stencil-build, base-isolate, input-tip-publish]
|
@@ -9,14 +9,14 @@
|
|
9
9
|
ease-out-expo
|
10
10
|
gap-100
|
11
11
|
left-100
|
12
|
-
right-100
|
13
|
-
transition-cosmetic;
|
12
|
+
right-100;
|
14
13
|
|
15
14
|
display: flex;
|
16
15
|
justify-content: flex-end;
|
17
16
|
pointer-events: none;
|
18
17
|
position: absolute;
|
19
18
|
transform: var(--mds-input-tip-active-translate);
|
19
|
+
transition-property: transform;
|
20
20
|
}
|
21
21
|
|
22
22
|
:host(:empty) {
|
package/src/dictionary/button.ts
CHANGED
@@ -4,6 +4,7 @@ const buttonVariantDictionary = [
|
|
4
4
|
'info',
|
5
5
|
'light',
|
6
6
|
'primary',
|
7
|
+
'secondary',
|
7
8
|
'success',
|
8
9
|
'warning',
|
9
10
|
]
|
@@ -32,10 +33,17 @@ const buttonIconPositionDictionary = [
|
|
32
33
|
'right',
|
33
34
|
]
|
34
35
|
|
36
|
+
const buttonTypeDictionary = [
|
37
|
+
'button',
|
38
|
+
'submit',
|
39
|
+
'reset',
|
40
|
+
]
|
41
|
+
|
35
42
|
export {
|
36
43
|
buttonIconPositionDictionary,
|
37
44
|
buttonSizeDictionary,
|
38
45
|
buttonTargetDictionary,
|
39
46
|
buttonToneVariantDictionary,
|
47
|
+
buttonTypeDictionary,
|
40
48
|
buttonVariantDictionary,
|
41
49
|
}
|
@@ -77,6 +77,16 @@ const toneVariantDictionary = [
|
|
77
77
|
'quiet',
|
78
78
|
]
|
79
79
|
|
80
|
+
const themeVariantChipDictionary = [
|
81
|
+
'primary',
|
82
|
+
'secondary',
|
83
|
+
'dark',
|
84
|
+
'error',
|
85
|
+
'info',
|
86
|
+
'success',
|
87
|
+
'warning',
|
88
|
+
]
|
89
|
+
|
80
90
|
const toneActionVariantDictionary = [
|
81
91
|
'primary',
|
82
92
|
'secondary',
|
@@ -92,6 +102,12 @@ const toneSimpleVariantDictionary = [
|
|
92
102
|
'quiet',
|
93
103
|
]
|
94
104
|
|
105
|
+
const toneSmartVariantDictionary = [
|
106
|
+
'strong',
|
107
|
+
'weak',
|
108
|
+
'ghost',
|
109
|
+
]
|
110
|
+
|
95
111
|
const toneMinimalVariantDictionary = [
|
96
112
|
'strong',
|
97
113
|
'weak',
|
@@ -104,8 +120,10 @@ export {
|
|
104
120
|
themeLuminanceVariantDictionary,
|
105
121
|
themeStatusVariantDictionary,
|
106
122
|
themeVariantDictionary,
|
123
|
+
themeVariantChipDictionary,
|
107
124
|
toneActionVariantDictionary,
|
108
125
|
toneMinimalVariantDictionary,
|
109
126
|
toneSimpleVariantDictionary,
|
127
|
+
toneSmartVariantDictionary,
|
110
128
|
toneVariantDictionary,
|
111
129
|
}
|