diff --git a/Sources/HTMLKit/Abstraction/Attributes/BasicAttributes.swift b/Sources/HTMLKit/Abstraction/Attributes/BasicAttributes.swift
index 7d5b4e9a..4d47bac5 100644
--- a/Sources/HTMLKit/Abstraction/Attributes/BasicAttributes.swift
+++ b/Sources/HTMLKit/Abstraction/Attributes/BasicAttributes.swift
@@ -1113,16 +1113,19 @@ extension IsMapAttribute where Self: EmptyNode {
}
}
-/// The protocol provides the element with the inputmode handler.
+/// A type that provides the `inputMode` modifier.
@_documentation(visibility: internal)
public protocol InputModeAttribute: Attribute {
-
- /// The function represents the html-attribute 'inputmode'.
+
+ /// Set the virtual keyboard mode for the editable element.
///
- /// ```html
- ///
+ /// ```swift
+ /// Input()
+ /// .inputMode(.numeric)
/// ```
- func inputMode(_ value: String) -> Self
+ ///
+ /// - Parameter value: The mode to set on
+ func inputMode(_ value: Values.Mode) -> Self
}
extension InputModeAttribute where Self: ContentNode {
diff --git a/Sources/HTMLKit/Abstraction/Elements/BasicElements.swift b/Sources/HTMLKit/Abstraction/Elements/BasicElements.swift
index 47b1c9f3..96fa88ff 100644
--- a/Sources/HTMLKit/Abstraction/Elements/BasicElements.swift
+++ b/Sources/HTMLKit/Abstraction/Elements/BasicElements.swift
@@ -124,9 +124,14 @@ extension Html: GlobalAttributes, GlobalEventAttributes {
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Html {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Html {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Html {
return mutate(is: value)
diff --git a/Sources/HTMLKit/Abstraction/Elements/BodyElements.swift b/Sources/HTMLKit/Abstraction/Elements/BodyElements.swift
index 4c954f0b..7c71e0ee 100644
--- a/Sources/HTMLKit/Abstraction/Elements/BodyElements.swift
+++ b/Sources/HTMLKit/Abstraction/Elements/BodyElements.swift
@@ -456,9 +456,14 @@ extension Article: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Article {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Article {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Article {
return mutate(is: value)
@@ -726,9 +731,14 @@ extension Section: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Section {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Section {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Section {
return mutate(is: value)
@@ -996,9 +1006,14 @@ extension Navigation: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribu
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Navigation {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Navigation {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Navigation {
return mutate(is: value)
@@ -1266,10 +1281,15 @@ extension Aside: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes {
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Aside {
return mutate(inputmode: value)
}
+ public func inputMode(_ value: Values.Mode) -> Aside {
+ return mutate(inputmode: value.rawValue)
+ }
+
public func `is`(_ value: String) -> Aside {
return mutate(is: value)
}
@@ -1536,10 +1556,15 @@ extension Heading1: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Heading1 {
return mutate(inputmode: value)
}
+ public func inputMode(_ value: Values.Mode) -> Heading1 {
+ return mutate(inputmode: value.rawValue)
+ }
+
public func `is`(_ value: String) -> Heading1 {
return mutate(is: value)
}
@@ -1813,10 +1838,15 @@ extension Heading2: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Heading2 {
return mutate(inputmode: value)
}
+ public func inputMode(_ value: Values.Mode) -> Heading2 {
+ return mutate(inputmode: value.rawValue)
+ }
+
public func `is`(_ value: String) -> Heading2 {
return mutate(is: value)
}
@@ -2090,9 +2120,14 @@ extension Heading3: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Heading3 {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Heading3 {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Heading3 {
return mutate(is: value)
@@ -2367,9 +2402,14 @@ extension Heading4: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Heading4 {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Heading4 {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Heading4 {
return mutate(is: value)
@@ -2644,9 +2684,14 @@ extension Heading5: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Heading5 {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Heading5 {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Heading5 {
return mutate(is: value)
@@ -2921,9 +2966,14 @@ extension Heading6: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Heading6 {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Heading6 {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Heading6 {
return mutate(is: value)
@@ -3198,10 +3248,15 @@ extension HeadingGroup: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttri
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> HeadingGroup {
return mutate(inputmode: value)
}
+ public func inputMode(_ value: Values.Mode) -> HeadingGroup {
+ return mutate(inputmode: value.rawValue)
+ }
+
public func `is`(_ value: String) -> HeadingGroup {
return mutate(is: value)
}
@@ -3468,9 +3523,14 @@ extension Header: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Header {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Header {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Header {
return mutate(is: value)
@@ -3738,9 +3798,14 @@ extension Footer: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Footer {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Footer {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Footer {
return mutate(is: value)
@@ -4008,9 +4073,14 @@ extension Address: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Address {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Address {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Address {
return mutate(is: value)
@@ -4278,9 +4348,14 @@ extension Paragraph: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribut
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Paragraph {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Paragraph {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Paragraph {
return mutate(is: value)
@@ -4550,9 +4625,14 @@ extension HorizontalRule: GlobalAttributes, GlobalEventAttributes, GlobalAriaAtt
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> HorizontalRule {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> HorizontalRule {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> HorizontalRule {
return mutate(is: value)
@@ -4820,9 +4900,14 @@ extension PreformattedText: GlobalAttributes, GlobalEventAttributes, GlobalAriaA
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> PreformattedText {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> PreformattedText {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> PreformattedText {
return mutate(is: value)
@@ -5090,10 +5175,15 @@ extension Blockquote: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribu
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Blockquote {
return mutate(inputmode: value)
}
+ public func inputMode(_ value: Values.Mode) -> Blockquote {
+ return mutate(inputmode: value.rawValue)
+ }
+
public func `is`(_ value: String) -> Blockquote {
return mutate(is: value)
}
@@ -5371,9 +5461,14 @@ extension OrderedList: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttrib
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> OrderedList {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> OrderedList {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> OrderedList {
return mutate(is: value)
@@ -5653,9 +5748,14 @@ extension UnorderedList: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttr
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> UnorderedList {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> UnorderedList {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> UnorderedList {
return mutate(is: value)
@@ -5923,10 +6023,15 @@ extension Menu: GlobalAttributes {
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Menu {
return mutate(inputmode: value)
}
+ public func inputMode(_ value: Values.Mode) -> Menu {
+ return mutate(inputmode: value.rawValue)
+ }
+
public func `is`(_ value: String) -> Menu {
return mutate(is: value)
}
@@ -6097,9 +6202,14 @@ extension DescriptionList: GlobalAttributes, GlobalEventAttributes, GlobalAriaAt
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> DescriptionList {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> DescriptionList {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> DescriptionList {
return mutate(is: value)
@@ -6366,10 +6476,15 @@ extension Figure: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes
return self
}
-
+
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Figure {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Figure {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Figure {
return mutate(is: value)
@@ -6637,9 +6752,14 @@ extension Anchor: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes,
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Anchor {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Anchor {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Anchor {
return mutate(is: value)
@@ -6950,10 +7070,15 @@ extension Emphasize: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribut
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Emphasize {
return mutate(inputmode: value)
}
+ public func inputMode(_ value: Values.Mode) -> Emphasize {
+ return mutate(inputmode: value.rawValue)
+ }
+
public func `is`(_ value: String) -> Emphasize {
return mutate(is: value)
}
@@ -7220,10 +7345,15 @@ extension Strong: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Strong {
return mutate(inputmode: value)
}
+ public func inputMode(_ value: Values.Mode) -> Strong {
+ return mutate(inputmode: value.rawValue)
+ }
+
public func `is`(_ value: String) -> Strong {
return mutate(is: value)
}
@@ -7490,9 +7620,14 @@ extension Small: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes {
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Small {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Small {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Small {
return mutate(is: value)
@@ -7767,9 +7902,14 @@ extension StrikeThrough: GlobalAttributes, GlobalEventAttributes {
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> StrikeThrough {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> StrikeThrough {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> StrikeThrough {
return mutate(is: value)
@@ -7968,10 +8108,15 @@ extension Main: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes {
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Main {
return mutate(inputmode: value)
}
+ public func inputMode(_ value: Values.Mode) -> Main {
+ return mutate(inputmode: value.rawValue)
+ }
+
public func `is`(_ value: String) -> Main {
return mutate(is: value)
}
@@ -8238,10 +8383,15 @@ extension Search: GlobalAttributes {
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Search {
return mutate(inputmode: value)
}
+ public func inputMode(_ value: Values.Mode) -> Search {
+ return mutate(inputmode: value.rawValue)
+ }
+
public func `is`(_ value: String) -> Search {
return mutate(is: value)
}
@@ -8412,9 +8562,14 @@ extension Division: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Division {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Division {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Division {
return mutate(is: value)
@@ -8682,9 +8837,14 @@ extension Definition: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribu
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Definition {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Definition {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Definition {
return mutate(is: value)
@@ -8951,10 +9111,15 @@ extension Cite: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes {
return self
}
-
+
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Cite {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Cite {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Cite {
return mutate(is: value)
@@ -9222,9 +9387,14 @@ extension ShortQuote: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribu
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> ShortQuote {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> ShortQuote {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> ShortQuote {
return mutate(is: value)
@@ -9496,9 +9666,14 @@ extension Abbreviation: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttri
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Abbreviation {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Abbreviation {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Abbreviation {
return mutate(is: value)
@@ -9765,11 +9940,16 @@ extension Ruby: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes {
return self
}
-
+
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Ruby {
return mutate(inputmode: value)
}
+ public func inputMode(_ value: Values.Mode) -> Ruby {
+ return mutate(inputmode: value.rawValue)
+ }
+
public func `is`(_ value: String) -> Ruby {
return mutate(is: value)
}
@@ -10035,10 +10215,15 @@ extension Data: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, V
return self
}
-
+
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Data {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Data {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Data {
return mutate(is: value)
@@ -10310,9 +10495,14 @@ extension Time: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, D
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Time {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Time {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Time {
return mutate(is: value)
@@ -10584,10 +10774,15 @@ extension Code: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes {
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Code {
return mutate(inputmode: value)
}
+ public func inputMode(_ value: Values.Mode) -> Code {
+ return mutate(inputmode: value.rawValue)
+ }
+
public func `is`(_ value: String) -> Code {
return mutate(is: value)
}
@@ -10854,9 +11049,14 @@ extension Variable: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Variable {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Variable {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Variable {
return mutate(is: value)
@@ -11124,10 +11324,15 @@ extension SampleOutput: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttri
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> SampleOutput {
return mutate(inputmode: value)
}
+ public func inputMode(_ value: Values.Mode) -> SampleOutput {
+ return mutate(inputmode: value.rawValue)
+ }
+
public func `is`(_ value: String) -> SampleOutput {
return mutate(is: value)
}
@@ -11394,9 +11599,14 @@ extension KeyboardInput: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttr
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> KeyboardInput {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> KeyboardInput {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> KeyboardInput {
return mutate(is: value)
@@ -11664,9 +11874,14 @@ extension Subscript: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribut
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Subscript {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Subscript {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Subscript {
return mutate(is: value)
@@ -11933,9 +12148,14 @@ extension Superscript: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttrib
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Superscript {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Superscript {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Superscript {
return mutate(is: value)
@@ -12203,10 +12423,15 @@ extension Italic: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Italic {
return mutate(inputmode: value)
}
+ public func inputMode(_ value: Values.Mode) -> Italic {
+ return mutate(inputmode: value.rawValue)
+ }
+
public func `is`(_ value: String) -> Italic {
return mutate(is: value)
}
@@ -12480,9 +12705,14 @@ extension Bold: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes {
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Bold {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Bold {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Bold {
return mutate(is: value)
@@ -12757,9 +12987,14 @@ extension Underline: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribut
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Underline {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Underline {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Underline {
return mutate(is: value)
@@ -13034,9 +13269,14 @@ extension Mark: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes {
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Mark {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Mark {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Mark {
return mutate(is: value)
@@ -13304,9 +13544,14 @@ extension Bdi: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes {
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Bdi {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Bdi {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Bdi {
return mutate(is: value)
@@ -13569,9 +13814,14 @@ extension Bdo: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes {
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Bdo {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Bdo {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Bdo {
return mutate(is: value)
@@ -13839,9 +14089,14 @@ extension Span: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes {
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Span {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Span {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Span {
return mutate(is: value)
@@ -14104,9 +14359,14 @@ extension LineBreak: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribut
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> LineBreak {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> LineBreak {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> LineBreak {
return mutate(is: value)
@@ -14369,10 +14629,15 @@ extension WordBreak: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribut
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> WordBreak {
return mutate(inputmode: value)
}
+ public func inputMode(_ value: Values.Mode) -> WordBreak {
+ return mutate(inputmode: value.rawValue)
+ }
+
public func `is`(_ value: String) -> WordBreak {
return mutate(is: value)
}
@@ -14639,10 +14904,15 @@ extension InsertedText: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttri
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> InsertedText {
return mutate(inputmode: value)
}
+ public func inputMode(_ value: Values.Mode) -> InsertedText {
+ return mutate(inputmode: value.rawValue)
+ }
+
public func `is`(_ value: String) -> InsertedText {
return mutate(is: value)
}
@@ -14917,9 +15187,14 @@ extension DeletedText: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttrib
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> DeletedText {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> DeletedText {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> DeletedText {
return mutate(is: value)
@@ -15195,9 +15470,14 @@ extension Picture: GlobalAttributes, GlobalEventAttributes {
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Picture {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Picture {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Picture {
return mutate(is: value)
@@ -15384,10 +15664,15 @@ extension Image: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes,
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Image {
return mutate(inputmode: value)
}
+ public func inputMode(_ value: Values.Mode) -> Image {
+ return mutate(inputmode: value.rawValue)
+ }
+
public func `is`(_ value: String) -> Image {
return mutate(is: value)
}
@@ -15698,9 +15983,14 @@ extension InlineFrame: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttrib
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> InlineFrame {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> InlineFrame {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> InlineFrame {
return mutate(is: value)
@@ -15991,9 +16281,14 @@ extension Embed: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes,
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Embed {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Embed {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Embed {
return mutate(is: value)
@@ -16281,9 +16576,14 @@ extension Object: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes,
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Object {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Object {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Object {
return mutate(is: value)
@@ -16575,9 +16875,14 @@ extension Video: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes,
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Video {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Video {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Video {
return mutate(is: value)
@@ -16890,9 +17195,14 @@ extension Audio: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes,
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Audio {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Audio {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Audio {
return mutate(is: value)
@@ -17197,9 +17507,14 @@ extension Map: GlobalAttributes, GlobalEventAttributes, NameAttribute {
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Map {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Map {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Map {
return mutate(is: value)
@@ -17395,9 +17710,14 @@ extension Form: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, A
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Form {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Form {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Form {
return mutate(is: value)
@@ -17693,10 +18013,15 @@ extension DataList: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> DataList {
return mutate(inputmode: value)
}
+ public func inputMode(_ value: Values.Mode) -> DataList {
+ return mutate(inputmode: value.rawValue)
+ }
+
public func `is`(_ value: String) -> DataList {
return mutate(is: value)
}
@@ -17963,9 +18288,14 @@ extension Output: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes,
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Output {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Output {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Output {
return mutate(is: value)
@@ -18245,10 +18575,15 @@ extension Progress: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Progress {
return mutate(inputmode: value)
}
+ public func inputMode(_ value: Values.Mode) -> Progress {
+ return mutate(inputmode: value.rawValue)
+ }
+
public func `is`(_ value: String) -> Progress {
return mutate(is: value)
}
@@ -18523,10 +18858,15 @@ extension Meter: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes,
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Meter {
return mutate(inputmode: value)
}
+ public func inputMode(_ value: Values.Mode) -> Meter {
+ return mutate(inputmode: value.rawValue)
+ }
+
public func `is`(_ value: String) -> Meter {
return mutate(is: value)
}
@@ -18817,10 +19157,15 @@ extension Details: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Details {
return mutate(inputmode: value)
}
+ public func inputMode(_ value: Values.Mode) -> Details {
+ return mutate(inputmode: value.rawValue)
+ }
+
public func `is`(_ value: String) -> Details {
return mutate(is: value)
}
@@ -19091,9 +19436,14 @@ extension Dialog: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes,
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Dialog {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Dialog {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Dialog {
return mutate(is: value)
@@ -19365,9 +19715,14 @@ extension Script: GlobalAttributes, GlobalEventAttributes, AsynchronouslyAttribu
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Script {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Script {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Script {
return mutate(is: value)
@@ -19587,10 +19942,15 @@ extension NoScript: GlobalAttributes, GlobalEventAttributes {
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> NoScript {
return mutate(inputmode: value)
}
+ public func inputMode(_ value: Values.Mode) -> NoScript {
+ return mutate(inputmode: value.rawValue)
+ }
+
public func `is`(_ value: String) -> NoScript {
return mutate(is: value)
}
@@ -19781,9 +20141,14 @@ extension Template: GlobalAttributes, GlobalEventAttributes, ShadowRootModeAttri
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Template {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Template {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Template {
return mutate(is: value)
@@ -19979,10 +20344,15 @@ extension Canvas: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes,
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Canvas {
return mutate(inputmode: value)
}
+ public func inputMode(_ value: Values.Mode) -> Canvas {
+ return mutate(inputmode: value.rawValue)
+ }
+
public func `is`(_ value: String) -> Canvas {
return mutate(is: value)
}
@@ -20257,10 +20627,15 @@ extension Table: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes,
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Table {
return mutate(inputmode: value)
}
+ public func inputMode(_ value: Values.Mode) -> Table {
+ return mutate(inputmode: value.rawValue)
+ }
+
public func `is`(_ value: String) -> Table {
return mutate(is: value)
}
@@ -20643,10 +21018,15 @@ extension Slot: GlobalAttributes, NameAttribute {
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Slot {
return mutate(inputmode: value)
}
+ public func inputMode(_ value: Values.Mode) -> Slot {
+ return mutate(inputmode: value.rawValue)
+ }
+
public func `is`(_ value: String) -> Slot {
return mutate(is: value)
}
diff --git a/Sources/HTMLKit/Abstraction/Elements/DefinitionElements.swift b/Sources/HTMLKit/Abstraction/Elements/DefinitionElements.swift
index 28573fd7..9d68a1f5 100644
--- a/Sources/HTMLKit/Abstraction/Elements/DefinitionElements.swift
+++ b/Sources/HTMLKit/Abstraction/Elements/DefinitionElements.swift
@@ -116,9 +116,14 @@ extension TermName: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> TermName {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> TermName {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> TermName {
return mutate(is: value)
@@ -386,9 +391,14 @@ extension TermDefinition: GlobalAttributes, GlobalEventAttributes, GlobalAriaAtt
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> TermDefinition {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> TermDefinition {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> TermDefinition {
return mutate(is: value)
diff --git a/Sources/HTMLKit/Abstraction/Elements/FigureElements.swift b/Sources/HTMLKit/Abstraction/Elements/FigureElements.swift
index 60c7d440..5dad61e4 100644
--- a/Sources/HTMLKit/Abstraction/Elements/FigureElements.swift
+++ b/Sources/HTMLKit/Abstraction/Elements/FigureElements.swift
@@ -106,9 +106,14 @@ extension FigureCaption: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttr
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> FigureCaption {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> FigureCaption {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> FigureCaption {
return mutate(is: value)
diff --git a/Sources/HTMLKit/Abstraction/Elements/FormElements.swift b/Sources/HTMLKit/Abstraction/Elements/FormElements.swift
index f133dc36..a5caa066 100644
--- a/Sources/HTMLKit/Abstraction/Elements/FormElements.swift
+++ b/Sources/HTMLKit/Abstraction/Elements/FormElements.swift
@@ -91,9 +91,14 @@ extension Input: GlobalAttributes, GlobalEventAttributes, AcceptAttribute, Alter
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Input {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Input {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Input {
return mutate(is: value)
@@ -433,9 +438,14 @@ extension Label: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes,
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Label {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Label {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Label {
return mutate(is: value)
@@ -714,9 +724,14 @@ extension Select: GlobalAttributes, GlobalEventAttributes, AutocompleteAttribute
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Select {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Select {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Select {
return mutate(is: value)
@@ -954,9 +969,14 @@ extension TextArea: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> TextArea {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> TextArea {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> TextArea {
return mutate(is: value)
@@ -1299,9 +1319,14 @@ extension Button: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes,
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Button {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Button {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Button {
return mutate(is: value)
@@ -1617,9 +1642,14 @@ extension Fieldset: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Fieldset {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Fieldset {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Fieldset {
return mutate(is: value)
diff --git a/Sources/HTMLKit/Abstraction/Elements/HeadElements.swift b/Sources/HTMLKit/Abstraction/Elements/HeadElements.swift
index ca1592ba..23801c39 100644
--- a/Sources/HTMLKit/Abstraction/Elements/HeadElements.swift
+++ b/Sources/HTMLKit/Abstraction/Elements/HeadElements.swift
@@ -96,10 +96,15 @@ extension Title: GlobalAttributes, GlobalEventAttributes {
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Title {
return mutate(inputmode: value)
}
+ public func inputMode(_ value: Values.Mode) -> Title {
+ return mutate(inputmode: value.rawValue)
+ }
+
public func `is`(_ value: String) -> Title {
return mutate(is: value)
}
@@ -285,10 +290,15 @@ extension Base: GlobalAttributes, GlobalEventAttributes, ReferenceAttribute, Tar
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Base {
return mutate(inputmode: value)
}
+ public func inputMode(_ value: Values.Mode) -> Base {
+ return mutate(inputmode: value.rawValue)
+ }
+
public func `is`(_ value: String) -> Base {
return mutate(is: value)
}
@@ -482,9 +492,14 @@ extension Meta: GlobalAttributes, GlobalEventAttributes, ContentAttribute, NameA
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Meta {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Meta {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Meta {
return mutate(is: value)
@@ -696,9 +711,14 @@ extension Style: GlobalAttributes, GlobalEventAttributes, TypeAttribute, MediaAt
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Style {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Style {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Style {
return mutate(is: value)
@@ -897,9 +917,14 @@ extension Link: GlobalAttributes, GlobalEventAttributes, ReferenceAttribute, Ref
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Link {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Link {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Link {
return mutate(is: value)
diff --git a/Sources/HTMLKit/Abstraction/Elements/HtmlElements.swift b/Sources/HTMLKit/Abstraction/Elements/HtmlElements.swift
index b2039561..08ac4d30 100644
--- a/Sources/HTMLKit/Abstraction/Elements/HtmlElements.swift
+++ b/Sources/HTMLKit/Abstraction/Elements/HtmlElements.swift
@@ -96,10 +96,15 @@ extension Head: GlobalAttributes, GlobalEventAttributes {
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Head {
return mutate(inputmode: value)
}
+ public func inputMode(_ value: Values.Mode) -> Head {
+ return mutate(inputmode: value.rawValue)
+ }
+
public func `is`(_ value: String) -> Head {
return mutate(is: value)
}
@@ -290,9 +295,14 @@ extension Body: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, W
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Body {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Body {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Body {
return mutate(is: value)
diff --git a/Sources/HTMLKit/Abstraction/Elements/InputElements.swift b/Sources/HTMLKit/Abstraction/Elements/InputElements.swift
index 1fd583e2..0dc157dd 100644
--- a/Sources/HTMLKit/Abstraction/Elements/InputElements.swift
+++ b/Sources/HTMLKit/Abstraction/Elements/InputElements.swift
@@ -106,9 +106,14 @@ extension OptionGroup: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttrib
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> OptionGroup {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> OptionGroup {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> OptionGroup {
return mutate(is: value)
@@ -393,9 +398,14 @@ extension Option: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes,
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Option {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Option {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Option {
return mutate(is: value)
@@ -690,9 +700,14 @@ extension Legend: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Legend {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Legend {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Legend {
return mutate(is: value)
@@ -960,9 +975,14 @@ extension Summary: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Summary {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Summary {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Summary {
return mutate(is: value)
diff --git a/Sources/HTMLKit/Abstraction/Elements/ListElements.swift b/Sources/HTMLKit/Abstraction/Elements/ListElements.swift
index b8450679..9952af3f 100644
--- a/Sources/HTMLKit/Abstraction/Elements/ListElements.swift
+++ b/Sources/HTMLKit/Abstraction/Elements/ListElements.swift
@@ -106,10 +106,15 @@ extension ListItem: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> ListItem {
return mutate(inputmode: value)
}
+ public func inputMode(_ value: Values.Mode) -> ListItem {
+ return mutate(inputmode: value.rawValue)
+ }
+
public func `is`(_ value: String) -> ListItem {
return mutate(is: value)
}
diff --git a/Sources/HTMLKit/Abstraction/Elements/MapElements.swift b/Sources/HTMLKit/Abstraction/Elements/MapElements.swift
index 4f84fe5e..8e460a0c 100644
--- a/Sources/HTMLKit/Abstraction/Elements/MapElements.swift
+++ b/Sources/HTMLKit/Abstraction/Elements/MapElements.swift
@@ -104,10 +104,15 @@ extension Area: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, A
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Area {
return mutate(inputmode: value)
}
+ public func inputMode(_ value: Values.Mode) -> Area {
+ return mutate(inputmode: value.rawValue)
+ }
+
public func `is`(_ value: String) -> Area {
return mutate(is: value)
}
diff --git a/Sources/HTMLKit/Abstraction/Elements/MediaElements.swift b/Sources/HTMLKit/Abstraction/Elements/MediaElements.swift
index 5d03d7ad..fc71b0fa 100644
--- a/Sources/HTMLKit/Abstraction/Elements/MediaElements.swift
+++ b/Sources/HTMLKit/Abstraction/Elements/MediaElements.swift
@@ -91,9 +91,14 @@ extension Source: GlobalAttributes, GlobalEventAttributes, TypeAttribute, Source
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Source {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Source {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Source {
return mutate(is: value)
@@ -312,9 +317,14 @@ extension Track: GlobalAttributes, GlobalEventAttributes, KindAttribute, SourceA
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Track {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Track {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Track {
return mutate(is: value)
diff --git a/Sources/HTMLKit/Abstraction/Elements/ObjectElements.swift b/Sources/HTMLKit/Abstraction/Elements/ObjectElements.swift
index a3ebf3cd..dc6ba702 100644
--- a/Sources/HTMLKit/Abstraction/Elements/ObjectElements.swift
+++ b/Sources/HTMLKit/Abstraction/Elements/ObjectElements.swift
@@ -101,9 +101,14 @@ extension Parameter: GlobalAttributes, GlobalEventAttributes, NameAttribute, Val
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Parameter {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Parameter {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Parameter {
return mutate(is: value)
diff --git a/Sources/HTMLKit/Abstraction/Elements/RubyElements.swift b/Sources/HTMLKit/Abstraction/Elements/RubyElements.swift
index 280d95fc..4fdd69b0 100644
--- a/Sources/HTMLKit/Abstraction/Elements/RubyElements.swift
+++ b/Sources/HTMLKit/Abstraction/Elements/RubyElements.swift
@@ -116,9 +116,14 @@ extension RubyText: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> RubyText {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> RubyText {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> RubyText {
return mutate(is: value)
@@ -386,10 +391,15 @@ extension RubyPronunciation: GlobalAttributes, GlobalEventAttributes, GlobalAria
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> RubyPronunciation {
return mutate(inputmode: value)
}
+ public func inputMode(_ value: Values.Mode) -> RubyPronunciation {
+ return mutate(inputmode: value.rawValue)
+ }
+
public func `is`(_ value: String) -> RubyPronunciation {
return mutate(is: value)
}
diff --git a/Sources/HTMLKit/Abstraction/Elements/TableElements.swift b/Sources/HTMLKit/Abstraction/Elements/TableElements.swift
index 7c10a9b0..0a7a5e94 100644
--- a/Sources/HTMLKit/Abstraction/Elements/TableElements.swift
+++ b/Sources/HTMLKit/Abstraction/Elements/TableElements.swift
@@ -176,9 +176,14 @@ extension Caption: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Caption {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> Caption {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> Caption {
return mutate(is: value)
@@ -446,9 +451,14 @@ extension ColumnGroup: GlobalAttributes, GlobalEventAttributes, SpanAttribute {
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> ColumnGroup {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> ColumnGroup {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> ColumnGroup {
return mutate(is: value)
@@ -644,10 +654,15 @@ extension Column: GlobalAttributes, GlobalEventAttributes, SpanAttribute {
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> Column {
return mutate(inputmode: value)
}
+ public func inputMode(_ value: Values.Mode) -> Column {
+ return mutate(inputmode: value.rawValue)
+ }
+
public func `is`(_ value: String) -> Column {
return mutate(is: value)
}
@@ -842,9 +857,14 @@ extension TableBody: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribut
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> TableBody {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> TableBody {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> TableBody {
return mutate(is: value)
@@ -1120,9 +1140,14 @@ extension TableHead: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribut
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> TableHead {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> TableHead {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> TableHead {
return mutate(is: value)
@@ -1398,9 +1423,14 @@ extension TableFoot: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribut
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> TableFoot {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> TableFoot {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> TableFoot {
return mutate(is: value)
@@ -1668,9 +1698,14 @@ extension TableRow: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> TableRow {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> TableRow {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> TableRow {
return mutate(is: value)
@@ -1946,9 +1981,14 @@ extension DataCell: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> DataCell {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> DataCell {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> DataCell {
return mutate(is: value)
@@ -2228,9 +2268,14 @@ extension HeaderCell: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribu
return self
}
+ @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.")
public func inputMode(_ value: String) -> HeaderCell {
return mutate(inputmode: value)
}
+
+ public func inputMode(_ value: Values.Mode) -> HeaderCell {
+ return mutate(inputmode: value.rawValue)
+ }
public func `is`(_ value: String) -> HeaderCell {
return mutate(is: value)
diff --git a/Sources/HTMLKit/Abstraction/Tokens/ValueTokens.swift b/Sources/HTMLKit/Abstraction/Tokens/ValueTokens.swift
index e0bcbcb5..f9277b0d 100644
--- a/Sources/HTMLKit/Abstraction/Tokens/ValueTokens.swift
+++ b/Sources/HTMLKit/Abstraction/Tokens/ValueTokens.swift
@@ -981,4 +981,37 @@ public enum Values {
/// The cell applies to all remaining cells in the column group.
case columnGroup = "colgroup"
}
+
+ /// A enumeration of potential input modes for the virtual keyboard.
+ ///
+ /// ```swift
+ /// Input()
+ /// .inputMode(.numeric)
+ /// ```
+ public enum Mode: String {
+
+ /// Displays a virtual keyboard for text input in the user's locale.
+ case text
+
+ /// Does not display a virtual keyboard.
+ case none
+
+ /// Displays a keyboard for fractional numeric input.
+ case decimal
+
+ /// Displays a keyboard for email input
+ case email
+
+ /// Displays a keyboard for numeric input.
+ case numeric
+
+ /// Displays a keyboard for search input.
+ case search
+
+ /// Displays a keyboard for telephone number input.
+ case phone = "tel"
+
+ /// Displays a keyboard optimized for URL input.
+ case url
+ }
}
diff --git a/Tests/HTMLKitTests/AttributesTests.swift b/Tests/HTMLKitTests/AttributesTests.swift
index 76871172..af90cd5c 100644
--- a/Tests/HTMLKitTests/AttributesTests.swift
+++ b/Tests/HTMLKitTests/AttributesTests.swift
@@ -82,8 +82,8 @@ final class AttributesTests: XCTestCase {
return self.mutate(id: value)
}
- func inputMode(_ value: String) -> Tag {
- return self.mutate(inputmode: value)
+ func inputMode(_ value: Values.Mode) -> Tag {
+ return mutate(inputmode: value.rawValue)
}
func `is`(_ value: String) -> Tag {
@@ -2751,4 +2751,31 @@ final class AttributesTests: XCTestCase {
"""
)
}
+
+ func testInputModeAttribute() throws {
+
+ let view = TestView {
+ Tag {}.inputMode(.decimal)
+ Tag {}.inputMode(.email)
+ Tag {}.inputMode(.none)
+ Tag {}.inputMode(.numeric)
+ Tag {}.inputMode(.phone)
+ Tag {}.inputMode(.search)
+ Tag {}.inputMode(.text)
+ Tag {}.inputMode(.url)
+ }
+
+ XCTAssertEqual(try renderer.render(view: view),
+ """
+ \
+ \
+ \
+ \
+ \
+ \
+ \
+
+ """
+ )
+ }
}