desy-html 5.2.2 → 5.3.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/docs/index.html CHANGED
@@ -38,6 +38,12 @@
38
38
 
39
39
  <h2>Changelog (English)</h2>
40
40
  <p>What's new in the latest version of desy-html</p>
41
+ <h3>v.5.3.0</h3>
42
+ <ul class="text-sm">
43
+ <li>Added missing params in input-group for inputs.</li>
44
+ <li>Docs improvements.</li>
45
+ <li>Minor validation fixes.</li>
46
+ </ul>
41
47
  <h3>v.5.2.2</h3>
42
48
  <ul class="text-sm">
43
49
  <li>Minor fixes.</li>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "desy-html",
3
- "version": "5.2.2",
3
+ "version": "5.3.0",
4
4
  "description": "desy-html contains the code you need to start building a user interface for Gobierno de Aragón government webapps.",
5
5
  "author": {
6
6
  "name": "Desy (SDA Servicios Digitales de Aragón)",
@@ -7,7 +7,8 @@
7
7
  "name": "file-upload-1",
8
8
  "label": {
9
9
  "text": "Sube un archivo"
10
- }
10
+ },
11
+ "classes": "overflow-x-auto max-w-64 lg:max-w-none"
11
12
  }
12
13
  },
13
14
  {
@@ -20,7 +21,8 @@
20
21
  },
21
22
  "hint": {
22
23
  "text": "Tu foto puede estar en tus Imágenes, Fotos, Descargas o el Escritorio. O en una aplicación como Fotos."
23
- }
24
+ },
25
+ "classes": "overflow-x-auto max-w-64 lg:max-w-none"
24
26
  }
25
27
  },
26
28
  {
@@ -36,7 +38,8 @@
36
38
  },
37
39
  "errorMessage": {
38
40
  "text": "Error: Error message goes here"
39
- }
41
+ },
42
+ "classes": "overflow-x-auto max-w-64 lg:max-w-none"
40
43
  }
41
44
  },
42
45
  {
@@ -49,7 +52,8 @@
49
52
  },
50
53
  "attributes": {
51
54
  "accept": ".jpg, .jpeg, .png"
52
- }
55
+ },
56
+ "classes": "overflow-x-auto max-w-64 lg:max-w-none"
53
57
  }
54
58
  },
55
59
  {
@@ -60,7 +64,8 @@
60
64
  "label": {
61
65
  "text": "Sube un archivo",
62
66
  "isPageHeading": true
63
- }
67
+ },
68
+ "classes": "overflow-x-auto max-w-64 lg:max-w-none"
64
69
  }
65
70
  },
66
71
  {
@@ -71,6 +76,7 @@
71
76
  "label": {
72
77
  "text": "Sube un archivo"
73
78
  },
79
+ "classes": "overflow-x-auto max-w-64 lg:max-w-none",
74
80
  "formGroup": {
75
81
  "classes": "p-base bg-warning-light"
76
82
  }
@@ -45,6 +45,7 @@
45
45
  formGroup: item.formGroup,
46
46
  classes: "mb-0 " + (item.classes if item.classes),
47
47
  name: (params.namePrefix + "-" + item.name) if params.namePrefix else item.name,
48
+ disabled: item.disabled,
48
49
  attributes: item.attributes,
49
50
  items: item.selectItems
50
51
  }) | indent(6) | trim }}
@@ -72,6 +73,7 @@
72
73
  autocomplete: item.autocomplete,
73
74
  pattern: item.pattern,
74
75
  placeholder: item.placeholder,
76
+ disabled: item.disabled,
75
77
  attributes: item.attributes
76
78
  }) | indent(6) | trim }}
77
79
  {% endif %}
@@ -24,6 +24,10 @@ params:
24
24
  type: string
25
25
  require: false
26
26
  description: Optional value for [inputmode](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode).
27
+ - name: value
28
+ type: string
29
+ required: false
30
+ description: If provided, it will be used as the initial value of the input.
27
31
  - name: name
28
32
  type: string
29
33
  required: true
@@ -42,18 +46,22 @@ params:
42
46
  type: string
43
47
  required: false
44
48
  description: Classes to add to the form group.
45
- - name: value
46
- type: string
47
- required: false
48
- description: If provided, it will be used as the initial value of the input.
49
49
  - name: autocomplete
50
50
  type: string
51
51
  required: false
52
- description: Attribute to [identify input purpose](https://www.w3.org/WAI/WCAG21/Understanding/identify-input-purpose.html), for instance "bday-day". See [autofill](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill) for full list of attributes that can be used.
52
+ description: Attribute to [identify input purpose](https://www.w3.org/WAI/WCAG21/Understanding/identify-input-purpose.html), for instance "postal-code" or "username". See [autofill](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill) for full list of attributes that can be used.
53
53
  - name: pattern
54
54
  type: string
55
55
  required: false
56
56
  description: Attribute to [provide a regular expression pattern](https://www.w3.org/TR/html51/sec-forms.html#the-pattern-attribute), used to match allowed character combinations for the input value.
57
+ - name: placeholder
58
+ type: string
59
+ required: false
60
+ description: Placeholder text
61
+ - name: disabled
62
+ type: boolean
63
+ required: false
64
+ description: If true, input will be disabled.
57
65
  - name: classes
58
66
  type: string
59
67
  required: false
@@ -614,175 +614,6 @@
614
614
  ]
615
615
  }
616
616
  },
617
- {
618
- "name": "With one disabled parent item",
619
- "data": {
620
- "id": "with-disabled",
621
- "idPrefix": "disabled-example",
622
- "ariaLabel":"Menubar description",
623
- "items": [
624
- {
625
- "text": "Menuitem",
626
- "ariaLabel": "Menuitem",
627
- "id": "menuitems-disabled-example-item-1-2",
628
- "disabled": true,
629
- "sub": {
630
- "items": [
631
- {
632
- "role": "menuitem",
633
- "text": "Subitem 1"
634
- },
635
- {
636
- "role": "menuitem",
637
- "text": "Subitem 2"
638
- },
639
- {
640
- "role": "menuitem",
641
- "text": "Subitem 3"
642
- }
643
- ],
644
- "attributes": {
645
- "aria-labelledby": "menuitems-disabled-example-item-1-2"
646
- }
647
- },
648
- "classes": "mb-base mr-base"
649
- },
650
- {
651
- "text": "Menuitemcheckbox",
652
- "ariaLabel": "Menuitemcheckbox",
653
- "id": "menuitems-disabled-example-item-2-2",
654
- "classes": "mb-base mr-base",
655
- "sub": {
656
- "items": [
657
- {
658
- "role": "menuitemcheckbox",
659
- "text": "Subitem 1"
660
- },
661
- {
662
- "role": "menuitemcheckbox",
663
- "text": "Subitem 2",
664
- "checked": true
665
- },
666
- {
667
- "role": "menuitemcheckbox",
668
- "text": "Subitem 3"
669
- }
670
- ],
671
- "attributes": {
672
- "aria-labelledby": "menuitems-disabled-example-item-2-2"
673
- }
674
- }
675
- },
676
- {
677
- "text": "Menuitemradio",
678
- "ariaLabel": "Menuitemradio",
679
- "id": "menuitems-disabled-example-item-3-2",
680
- "sub": {
681
- "items": [
682
- {
683
- "role": "group",
684
- "text": "Group",
685
- "items": [
686
- {
687
- "role": "menuitemradio",
688
- "text": "Radio 1"
689
- },
690
- {
691
- "role": "menuitemradio",
692
- "text": "Radio 2",
693
- "checked": true
694
- },
695
- {
696
- "role": "menuitemradio",
697
- "text": "Radio 3"
698
- }
699
- ]
700
- }
701
- ],
702
- "attributes": {
703
- "aria-labelledby": "menuitems-disabled-example-item-3-2"
704
- }
705
- },
706
- "classes": "mb-base mr-base"
707
- },
708
- {
709
- "text": "Mixed items",
710
- "ariaLabel": "Mixeditems",
711
- "id": "menuitems-disabled-example-item-4-2",
712
- "sub": {
713
- "items": [
714
- {
715
- "role": "group",
716
- "ariaLabel": "Tamaño de letra",
717
- "items": [
718
- {
719
- "role": "menuitem",
720
- "text": "Tamaño mayor"
721
- },
722
- {
723
- "role": "menuitem",
724
- "text": "Tamaño menor"
725
- }
726
- ]
727
- },
728
- {
729
- "role": "separator"
730
- },
731
- {
732
- "role": "group",
733
- "ariaLabel": "Estilo de letra",
734
- "items": [
735
- {
736
- "role": "menuitemcheckbox",
737
- "text": "Negritas"
738
- },
739
- {
740
- "role": "menuitemcheckbox",
741
- "text": "Itálicas"
742
- }
743
- ]
744
- },
745
- {
746
- "role": "separator"
747
- },
748
- {
749
- "role": "group",
750
- "ariaLabel": "Estilo de texto",
751
- "items": [
752
- {
753
- "role": "menuitemradio",
754
- "text": "Ninguno"
755
- },
756
- {
757
- "role": "menuitemradio",
758
- "text": "Tachado"
759
- },
760
- {
761
- "role": "menuitemradio",
762
- "text": "Subrayado"
763
- }
764
- ]
765
- }
766
- ],
767
- "attributes": {
768
- "aria-labelledby": "menuitems-disabled-example-item-4-2"
769
- }
770
- },
771
- "classes": "mb-base mr-base"
772
- },
773
- {
774
- "text": "Menuitem solo",
775
- "ariaLabel": "Menuitem solo",
776
- "id": "menuitems-disabled-example-item-6-2",
777
- "classes": "c-menubar__button--transparent mb-base mr-base",
778
- "href": "#"
779
- }
780
- ],
781
- "attributes": {
782
- "aria-label": "Menubar description of use"
783
- }
784
- }
785
- },
786
617
  {
787
618
  "name": "Small",
788
619
  "description": "Using modifier classes in items.",
@@ -28,7 +28,7 @@
28
28
  {% set subId = "sub-" + id %}
29
29
  <li class="relative" role="none">
30
30
  {% if item.sub %}
31
- <a href="#" role="menuitem" aria-haspopup="true" aria-expanded="false" class="c-menubar__button {%- if item.classes %} {{ item.classes }}{% endif %} {%- if item.disabled %} c-menubar__button--disabled{% endif %} {%- if item.active %} c-menubar__button--primary{% endif %}" {%- if item.title %} title="{{ item.title }}"{% endif %} {% if item.disabled %} disabled="disabled" aria-disabled="true" tabindex="-1"{% endif %} " id="{{ id }}"
31
+ <a href="#" role="menuitem" aria-haspopup="true" aria-expanded="false" class="c-menubar__button {%- if item.classes %} {{ item.classes }}{% endif %} {%- if item.disabled %} c-menubar__button--disabled{% endif %} {%- if item.active %} c-menubar__button--primary{% endif %}" {%- if item.title %} title="{{ item.title }}"{% endif %} {% if item.disabled %} aria-disabled="true" tabindex="-1"{% endif %} id="{{ id }}"
32
32
  {%- if item.sub.html %} data-aria-controls="{{ subId }}"{% endif %}
33
33
  {%- for attribute, value in item.attributes %} {{ attribute }}="{{ value }}"{% endfor -%}>
34
34
  <span class="inline-flex self-center max-w-xs align-middle truncate">{{ item.html | safe if item.html else item.text }}</span>