@maggioli-design-system/mds-input-range 2.5.1 → 2.5.3

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 (34) hide show
  1. package/dist/collection/common/locale.js +10 -8
  2. package/dist/collection/common/number.js +5 -0
  3. package/dist/collection/common/slot.js +10 -1
  4. package/dist/collection/common/unit.js +16 -1
  5. package/dist/collection/components/mds-input-range/test/mds-input-range.stories.js +37 -21
  6. package/dist/collection/dictionary/button.js +20 -1
  7. package/dist/collection/dictionary/icon.js +1 -1
  8. package/dist/collection/dictionary/variant.js +9 -1
  9. package/dist/documentation.json +1 -1
  10. package/dist/stats.json +7 -6
  11. package/dist/types/common/number.d.ts +2 -0
  12. package/dist/types/common/slot.d.ts +2 -1
  13. package/dist/types/common/unit.d.ts +3 -1
  14. package/dist/types/components/mds-input-range/test/mds-input-range.stories.d.ts +39 -8
  15. package/dist/types/dictionary/button.d.ts +4 -1
  16. package/dist/types/dictionary/icon.d.ts +1 -1
  17. package/dist/types/dictionary/variant.d.ts +2 -1
  18. package/dist/types/type/button.d.ts +2 -0
  19. package/dist/types/type/variant.d.ts +1 -0
  20. package/documentation.json +34 -4
  21. package/package.json +3 -3
  22. package/src/common/locale.ts +10 -8
  23. package/src/common/number.ts +8 -0
  24. package/src/common/slot.ts +12 -0
  25. package/src/common/unit.ts +23 -0
  26. package/src/components/mds-input-range/test/mds-input-range.stories.tsx +64 -34
  27. package/src/dictionary/button.ts +25 -0
  28. package/src/dictionary/icon.ts +2 -1
  29. package/src/dictionary/variant.ts +11 -1
  30. package/src/tailwind/components.css +1 -1
  31. package/src/type/button.ts +15 -0
  32. package/src/type/variant.ts +8 -0
  33. package/src/fixtures/icons.json +0 -459
  34. package/src/fixtures/iconsauce.json +0 -306
@@ -18,23 +18,26 @@ export default {
18
18
  },
19
19
  step: {
20
20
  type: { name: 'number' },
21
- description: 'The step attribute is a number that specifies the granularity that the value must adhere to, or the special value any, which is described below',
21
+ description:
22
+ 'The step attribute is a number that specifies the granularity that the value must adhere to, or the special value any, which is described below',
22
23
  },
23
24
  value: {
24
25
  type: { name: 'number' },
25
- description: 'The value attribute contains a number which contains a representation of the selected number',
26
+ description:
27
+ 'The value attribute contains a number which contains a representation of the selected number',
26
28
  },
27
29
  },
28
30
  }
29
31
 
30
- const Template = args =>
31
- <mds-input-range {...args}>
32
- Range label
33
- </mds-input-range>
32
+ const Template = args => (
33
+ <mds-input-range {...args}>Range label</mds-input-range>
34
+ )
34
35
 
35
36
  const TemplateFormatLabel = args => {
36
37
  useEffect(() => {
37
- (document.querySelector('#custom-labeled') as HTMLMdsInputRangeElement).formatValue = formatValue
38
+ (
39
+ document.querySelector('#custom-labeled') as HTMLMdsInputRangeElement
40
+ ).formatValue = formatValue
38
41
  }, [])
39
42
  function formatValue (v: number) {
40
43
  return formatBytes(v)
@@ -51,11 +54,19 @@ const TemplateFormatLabel = args => {
51
54
  return `${value} ${sizes[i]}`
52
55
  }
53
56
 
54
- return <div>
55
- <mds-input-range id="custom-labeled" {...args} step="1048576" min="0" max="1073741824">
56
- File size
57
- </mds-input-range>
58
- </div>
57
+ return (
58
+ <div>
59
+ <mds-input-range
60
+ id="custom-labeled"
61
+ {...args}
62
+ step="1048576"
63
+ min="0"
64
+ max="1073741824"
65
+ >
66
+ File size
67
+ </mds-input-range>
68
+ </div>
69
+ )
59
70
  }
60
71
 
61
72
  const hideHeaderCss = `
@@ -64,42 +75,61 @@ const hideHeaderCss = `
64
75
  }
65
76
  `
66
77
 
67
- const HideHeaderTemplate = args =>
78
+ const HideHeaderTemplate = args => (
68
79
  <div>
69
80
  <style>{hideHeaderCss}</style>
70
- <mds-input-range {...args}>
71
- This shouldn't be visible
72
- </mds-input-range>
81
+ <mds-input-range {...args}>This shouldn't be visible</mds-input-range>
73
82
  </div>
83
+ )
74
84
 
85
+ export const Default = {
86
+ render: Template,
87
+ }
75
88
 
76
- export const Default = Template.bind({})
89
+ export const Disabled = {
90
+ render: Template,
77
91
 
78
- export const Disabled = Template.bind({})
79
- Disabled.args = {
80
- disabled: true,
92
+ args: {
93
+ disabled: true,
94
+ },
81
95
  }
82
96
 
83
- export const Min = Template.bind({})
84
- Min.args = {
85
- min: -100,
97
+ export const Min = {
98
+ render: Template,
99
+
100
+ args: {
101
+ min: -100,
102
+ },
86
103
  }
87
104
 
88
- export const Max = Template.bind({})
89
- Max.args = {
90
- max: 200,
105
+ export const Max = {
106
+ render: Template,
107
+
108
+ args: {
109
+ max: 200,
110
+ },
91
111
  }
92
112
 
93
- export const Step = Template.bind({})
94
- Step.args = {
95
- step: 10,
113
+ export const Step = {
114
+ render: Template,
115
+
116
+ args: {
117
+ step: 10,
118
+ },
96
119
  }
97
120
 
98
- export const Value = Template.bind({})
99
- Value.args = {
100
- value: 90,
121
+ export const Value = {
122
+ render: Template,
123
+
124
+ args: {
125
+ value: 90,
126
+ },
101
127
  }
102
128
 
103
- export const FormatLabel = TemplateFormatLabel.bind({})
129
+ export const FormatLabel = {
130
+ render: TemplateFormatLabel,
131
+ }
104
132
 
105
- export const HideHeader = HideHeaderTemplate.bind({})
133
+ export const HideHeader = {
134
+ render: HideHeaderTemplate,
135
+ }
@@ -12,6 +12,18 @@ const buttonVariantDictionary = [
12
12
  'warning',
13
13
  ]
14
14
 
15
+ const buttonDropdownVariantDictionary = [
16
+ 'ai',
17
+ 'dark',
18
+ 'error',
19
+ 'info',
20
+ 'light',
21
+ 'primary',
22
+ 'secondary',
23
+ 'success',
24
+ 'warning',
25
+ ]
26
+
15
27
  const buttonToneVariantDictionary = [
16
28
  'strong',
17
29
  'weak',
@@ -19,6 +31,11 @@ const buttonToneVariantDictionary = [
19
31
  'quiet',
20
32
  ]
21
33
 
34
+ const buttonToneMinimalVariantDictionary = [
35
+ 'strong',
36
+ 'weak',
37
+ ]
38
+
22
39
  const buttonTargetDictionary = [
23
40
  'blank',
24
41
  'self',
@@ -31,6 +48,11 @@ const buttonSizeDictionary = [
31
48
  'xl',
32
49
  ]
33
50
 
51
+ const tabSizeDictionary = [
52
+ 'sm',
53
+ 'md',
54
+ ]
55
+
34
56
  const buttonIconPositionDictionary = [
35
57
  'left',
36
58
  'right',
@@ -43,10 +65,13 @@ const buttonTypeDictionary = [
43
65
  ]
44
66
 
45
67
  export {
68
+ buttonDropdownVariantDictionary,
46
69
  buttonIconPositionDictionary,
47
70
  buttonSizeDictionary,
48
71
  buttonTargetDictionary,
72
+ buttonToneMinimalVariantDictionary,
49
73
  buttonToneVariantDictionary,
50
74
  buttonTypeDictionary,
51
75
  buttonVariantDictionary,
76
+ tabSizeDictionary,
52
77
  }
@@ -1,5 +1,6 @@
1
1
  import jsonIconsDictionary from '../fixtures/icons.json'
2
- import jsonMggIconsDictionary from '../fixtures/iconsauce.json'
2
+ import jsonMggIconsDictionary from '@maggioli-design-system/svg-icons/dist/iconsauce.json'
3
+
3
4
  const iconsDictionary = jsonIconsDictionary
4
5
  const mggIconsDictionary = jsonMggIconsDictionary
5
6
  const svgIconsDictionary = [
@@ -21,6 +21,15 @@ const themeStatusVariantDictionary = [
21
21
  'warning',
22
22
  ]
23
23
 
24
+ const themeInputVariantDictionary = [
25
+ 'ai',
26
+ 'error',
27
+ 'info',
28
+ 'primary',
29
+ 'success',
30
+ 'warning',
31
+ ]
32
+
24
33
  const themeFullVariantDictionary = [
25
34
  'amaranth',
26
35
  'aqua',
@@ -128,11 +137,12 @@ const toneMinimalVariantDictionary = [
128
137
  export {
129
138
  themeFullVariantAvatarDictionary,
130
139
  themeFullVariantDictionary,
140
+ themeInputVariantDictionary,
131
141
  themeLabelVariantDictionary,
132
142
  themeLuminanceVariantDictionary,
133
143
  themeStatusVariantDictionary,
134
- themeVariantDictionary,
135
144
  themeVariantChipDictionary,
145
+ themeVariantDictionary,
136
146
  toneActionVariantDictionary,
137
147
  toneMinimalVariantDictionary,
138
148
  toneSimpleVariantDictionary,
@@ -21,7 +21,7 @@
21
21
  pointer-events: none;
22
22
  position: absolute;
23
23
  transition-behavior: allow-discrete;
24
- transition-property: display opacity;
24
+ transition-property: display, opacity;
25
25
  }
26
26
 
27
27
  .contrast-area-50 {
@@ -14,6 +14,10 @@ export type ButtonSizeType =
14
14
  | 'lg'
15
15
  | 'xl'
16
16
 
17
+ export type TabSizeType =
18
+ | 'sm'
19
+ | 'md'
20
+
17
21
  export type ButtonIconPositionType =
18
22
  | 'left'
19
23
  | 'right'
@@ -30,3 +34,14 @@ export type ButtonVariantType =
30
34
  | 'secondary'
31
35
  | 'success'
32
36
  | 'warning'
37
+
38
+ export type ButtonDropdownVariantType =
39
+ | 'ai'
40
+ | 'dark'
41
+ | 'error'
42
+ | 'info'
43
+ | 'light'
44
+ | 'primary'
45
+ | 'secondary'
46
+ | 'success'
47
+ | 'warning'
@@ -4,6 +4,14 @@ export type ThemeStatusVariantType =
4
4
  | 'success'
5
5
  | 'warning'
6
6
 
7
+ export type ThemeInputVariantType =
8
+ | 'primary'
9
+ | 'ai'
10
+ | 'error'
11
+ | 'info'
12
+ | 'success'
13
+ | 'warning'
14
+
7
15
  export type ThemeVariantType =
8
16
  | 'ai'
9
17
  | 'dark'