diff --git a/Sources/HTMLKit/Abstraction/Attributes/BasicAttributes.swift b/Sources/HTMLKit/Abstraction/Attributes/BasicAttributes.swift index 8a7b2c83..49097f45 100644 --- a/Sources/HTMLKit/Abstraction/Attributes/BasicAttributes.swift +++ b/Sources/HTMLKit/Abstraction/Attributes/BasicAttributes.swift @@ -680,7 +680,7 @@ extension ContentAttribute where Self: EmptyNode { } } -/// A type that provides the `isEditable` modifier. +/// A type that provides the `editable` modifier. @_documentation(visibility: internal) public protocol EditAttribute: Attribute { @@ -690,13 +690,13 @@ public protocol EditAttribute: Attribute { /// Blockquote { /// "Lorem ipsum..." /// } - /// .isEditable(false) + /// .editable(false) /// ``` /// - /// - Parameter condition: Whether the element should be editable. + /// - Parameter value: Whether the element should be editable. /// /// - Returns: The element - func isEditable(_ condition: Bool) -> Self + func editable(_ value: Bool) -> Self } extension EditAttribute where Self: ContentNode { @@ -1028,7 +1028,7 @@ extension DownloadAttribute where Self: EmptyNode { } } -/// A type that provides the `isDraggable` modifier. +/// A type that provides the `draggable` modifier. @_documentation(visibility: internal) public protocol DragAttribute: Attribute { @@ -1038,13 +1038,13 @@ public protocol DragAttribute: Attribute { /// Division { /// ... /// } - /// .isDraggable(false) + /// .draggable(false) /// ``` /// - /// - Parameter condition: Whether the element should be draggable. + /// - Parameter value: Whether the element should be draggable. /// /// - Returns: The element - func isDraggable(_ condition: Bool) -> Self + func draggable(_ value: Bool) -> Self } extension DragAttribute where Self: ContentNode { @@ -3298,7 +3298,7 @@ extension SpanAttribute where Self: EmptyNode { } } -/// A type that provides the `hasSpellCheck` modifier. +/// A type that provides the `spellcheck` modifier. @_documentation(visibility: internal) public protocol SpellCheckAttribute: Attribute { @@ -3306,13 +3306,13 @@ public protocol SpellCheckAttribute: Attribute { /// /// ```swift /// Input() - /// .hasSpellCheck(false) + /// .spellcheck(false) /// ``` /// - /// - Parameter condition: Whether to spellcheck the content. + /// - Parameter value: Whether to spellcheck the content. /// /// - Returns: The element - func hasSpellCheck(_ condition: Bool) -> Self + func spellcheck(_ value: Bool) -> Self } extension SpellCheckAttribute where Self: ContentNode { @@ -3708,13 +3708,13 @@ public protocol TranslateAttribute: Attribute { /// Paragraph { /// "Lorem ipsum..." /// } - /// .translate(.no) + /// .translate(true) /// ``` /// /// - Parameter value: Whether to exclude the content from translation. /// /// - Returns: The element - func translate(_ value: Values.Decision) -> Self + func translate(_ value: Bool) -> Self } extension TranslateAttribute where Self: ContentNode { diff --git a/Sources/HTMLKit/Abstraction/Elements/BasicElements.swift b/Sources/HTMLKit/Abstraction/Elements/BasicElements.swift index b0835389..c3761e45 100644 --- a/Sources/HTMLKit/Abstraction/Elements/BasicElements.swift +++ b/Sources/HTMLKit/Abstraction/Elements/BasicElements.swift @@ -124,17 +124,27 @@ extension Html: GlobalAttributes, GlobalEventAttributes { return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Html { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Html { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Html { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Html { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Html { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Html { return mutate(enterkeyhint: value.rawValue) @@ -149,7 +159,7 @@ extension Html: GlobalAttributes, GlobalEventAttributes { return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Html { return mutate(inputmode: value) } @@ -210,9 +220,14 @@ extension Html: GlobalAttributes, GlobalEventAttributes { return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Html { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Html { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Html { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -235,10 +250,20 @@ extension Html: GlobalAttributes, GlobalEventAttributes { return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Html { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Html { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Html { if condition { diff --git a/Sources/HTMLKit/Abstraction/Elements/BodyElements.swift b/Sources/HTMLKit/Abstraction/Elements/BodyElements.swift index eca74f0d..1cf61d77 100644 --- a/Sources/HTMLKit/Abstraction/Elements/BodyElements.swift +++ b/Sources/HTMLKit/Abstraction/Elements/BodyElements.swift @@ -216,17 +216,27 @@ extension Article: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Article { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Article { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Article { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Article { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Article { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Article { return mutate(enterkeyhint: value.rawValue) @@ -241,7 +251,7 @@ extension Article: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Article { return mutate(inputmode: value) } @@ -302,9 +312,14 @@ extension Article: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Article { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Article { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Article { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -327,10 +342,20 @@ extension Article: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Article { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Article { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Article { if condition { @@ -516,17 +541,27 @@ extension Section: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Section { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Section { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Section { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Section { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Section { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Section { return mutate(enterkeyhint: value.rawValue) @@ -541,7 +576,7 @@ extension Section: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Section { return mutate(inputmode: value) } @@ -602,9 +637,14 @@ extension Section: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Section { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Section { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Section { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -627,10 +667,20 @@ extension Section: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Section { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Section { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Section { if condition { @@ -818,17 +868,27 @@ extension Navigation: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribu return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Navigation { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Navigation { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Navigation { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Navigation { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Navigation { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Navigation { return mutate(enterkeyhint: value.rawValue) @@ -843,7 +903,7 @@ extension Navigation: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribu return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Navigation { return mutate(inputmode: value) } @@ -904,9 +964,14 @@ extension Navigation: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribu return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Navigation { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Navigation { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Navigation { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -929,10 +994,20 @@ extension Navigation: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribu return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Navigation { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Navigation { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Navigation { if condition { @@ -1116,17 +1191,27 @@ extension Aside: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes { return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Aside { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Aside { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Aside { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Aside { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Aside { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Aside { return mutate(enterkeyhint: value.rawValue) @@ -1141,7 +1226,7 @@ extension Aside: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes { return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Aside { return mutate(inputmode: value) } @@ -1202,9 +1287,14 @@ extension Aside: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes { return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Aside { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Aside { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Aside { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -1227,10 +1317,20 @@ extension Aside: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes { return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Aside { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Aside { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Aside { if condition { @@ -1411,18 +1511,28 @@ extension Heading1: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Heading1 { return mutate(contenteditable: value) } + public func editable(_ value: Bool = true) -> Heading1 { + return mutate(contenteditable: value) + } + public func direction(_ value: Values.Direction) -> Heading1 { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Heading1 { return mutate(draggable: value) } + public func draggable(_ value: Bool = true) -> Heading1 { + return mutate(draggable: value) + } + public func enterKeyHint(_ value: Values.Hint) -> Heading1 { return mutate(enterkeyhint: value.rawValue) } @@ -1436,7 +1546,7 @@ extension Heading1: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Heading1 { return mutate(inputmode: value) } @@ -1497,10 +1607,15 @@ extension Heading1: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Heading1 { return mutate(spellcheck: value) } + public func spellcheck(_ value: Bool = true) -> Heading1 { + return mutate(spellcheck: value) + } + public func style(_ value: String) -> Heading1 { return mutate(style: TaintedString(value, as: .css(.attribute))) } @@ -1522,10 +1637,20 @@ extension Heading1: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Heading1 { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Heading1 { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Heading1 { if condition { @@ -1713,18 +1838,28 @@ extension Heading2: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Heading2 { return mutate(contenteditable: value) } + public func editable(_ value: Bool = true) -> Heading2 { + return mutate(contenteditable: value) + } + public func direction(_ value: Values.Direction) -> Heading2 { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Heading2 { return mutate(draggable: value) } + public func draggable(_ value: Bool = true) -> Heading2 { + return mutate(draggable: value) + } + public func enterKeyHint(_ value: Values.Hint) -> Heading2 { return mutate(enterkeyhint: value.rawValue) } @@ -1738,7 +1873,7 @@ extension Heading2: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Heading2 { return mutate(inputmode: value) } @@ -1799,10 +1934,15 @@ extension Heading2: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Heading2 { return mutate(spellcheck: value) } + public func spellcheck(_ value: Bool = true) -> Heading2 { + return mutate(spellcheck: value) + } + public func style(_ value: String) -> Heading2 { return mutate(style: TaintedString(value, as: .css(.attribute))) } @@ -1824,10 +1964,20 @@ extension Heading2: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Heading2 { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Heading2 { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Heading2 { if condition { @@ -2015,17 +2165,27 @@ extension Heading3: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Heading3 { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Heading3 { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Heading3 { return mutate(dir: value.rawValue) } - + + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Heading3 { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Heading3 { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Heading3 { return mutate(enterkeyhint: value.rawValue) @@ -2040,7 +2200,7 @@ extension Heading3: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Heading3 { return mutate(inputmode: value) } @@ -2101,9 +2261,14 @@ extension Heading3: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Heading3 { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Heading3 { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Heading3 { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -2126,10 +2291,20 @@ extension Heading3: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Heading3 { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Heading3 { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Heading3 { if condition { @@ -2317,17 +2492,27 @@ extension Heading4: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Heading4 { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Heading4 { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Heading4 { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Heading4 { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Heading4 { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Heading4 { return mutate(enterkeyhint: value.rawValue) @@ -2342,7 +2527,7 @@ extension Heading4: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Heading4 { return mutate(inputmode: value) } @@ -2403,9 +2588,14 @@ extension Heading4: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Heading4 { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Heading4 { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Heading4 { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -2428,10 +2618,20 @@ extension Heading4: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Heading4 { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Heading4 { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Heading4 { if condition { @@ -2619,17 +2819,27 @@ extension Heading5: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Heading5 { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Heading5 { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Heading5 { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Heading5 { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Heading5 { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Heading5 { return mutate(enterkeyhint: value.rawValue) @@ -2644,7 +2854,7 @@ extension Heading5: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Heading5 { return mutate(inputmode: value) } @@ -2705,9 +2915,14 @@ extension Heading5: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Heading5 { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Heading5 { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Heading5 { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -2730,10 +2945,20 @@ extension Heading5: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Heading5 { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Heading5 { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Heading5 { if condition { @@ -2921,17 +3146,27 @@ extension Heading6: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Heading6 { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Heading6 { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Heading6 { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Heading6 { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Heading6 { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Heading6 { return mutate(enterkeyhint: value.rawValue) @@ -2946,7 +3181,7 @@ extension Heading6: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Heading6 { return mutate(inputmode: value) } @@ -3007,9 +3242,14 @@ extension Heading6: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Heading6 { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Heading6 { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Heading6 { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -3032,10 +3272,20 @@ extension Heading6: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Heading6 { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Heading6 { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Heading6 { if condition { @@ -3228,17 +3478,27 @@ extension HeadingGroup: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttri return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> HeadingGroup { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> HeadingGroup { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> HeadingGroup { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> HeadingGroup { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> HeadingGroup { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> HeadingGroup { return mutate(enterkeyhint: value.rawValue) @@ -3253,7 +3513,7 @@ extension HeadingGroup: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttri return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> HeadingGroup { return mutate(inputmode: value) } @@ -3314,9 +3574,14 @@ extension HeadingGroup: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttri return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> HeadingGroup { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> HeadingGroup { + return mutate(spellcheck: value) + } public func style(_ value: String) -> HeadingGroup { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -3339,10 +3604,20 @@ extension HeadingGroup: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttri return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> HeadingGroup { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> HeadingGroup { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> HeadingGroup { if condition { @@ -3524,17 +3799,27 @@ extension Header: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Header { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Header { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Header { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Header { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Header { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Header { return mutate(enterkeyhint: value.rawValue) @@ -3549,7 +3834,7 @@ extension Header: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Header { return mutate(inputmode: value) } @@ -3610,9 +3895,14 @@ extension Header: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Header { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Header { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Header { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -3635,10 +3925,20 @@ extension Header: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Header { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Header { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Header { if condition { @@ -3818,17 +4118,27 @@ extension Footer: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Footer { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Footer { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Footer { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Footer { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Footer { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Footer { return mutate(enterkeyhint: value.rawValue) @@ -3843,7 +4153,7 @@ extension Footer: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Footer { return mutate(inputmode: value) } @@ -3904,9 +4214,14 @@ extension Footer: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Footer { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Footer { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Footer { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -3929,10 +4244,20 @@ extension Footer: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Footer { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Footer { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Footer { if condition { @@ -4119,17 +4444,27 @@ extension Address: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Address { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Address { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Address { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Address { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Address { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Address { return mutate(enterkeyhint: value.rawValue) @@ -4144,7 +4479,7 @@ extension Address: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Address { return mutate(inputmode: value) } @@ -4205,9 +4540,14 @@ extension Address: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Address { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Address { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Address { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -4230,10 +4570,20 @@ extension Address: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Address { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Address { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Address { if condition { @@ -4414,17 +4764,27 @@ extension Paragraph: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribut return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Paragraph { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Paragraph { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Paragraph { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Paragraph { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Paragraph { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Paragraph { return mutate(enterkeyhint: value.rawValue) @@ -4439,7 +4799,7 @@ extension Paragraph: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribut return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Paragraph { return mutate(inputmode: value) } @@ -4499,10 +4859,15 @@ extension Paragraph: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribut public func role(_ value: Values.Role) -> Paragraph { return mutate(role: value.rawValue) } - + + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Paragraph { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Paragraph { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Paragraph { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -4525,10 +4890,20 @@ extension Paragraph: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribut return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Paragraph { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Paragraph { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Paragraph { if condition { @@ -4713,17 +5088,27 @@ extension HorizontalRule: GlobalAttributes, GlobalEventAttributes, GlobalAriaAtt return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> HorizontalRule { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> HorizontalRule { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> HorizontalRule { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> HorizontalRule { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> HorizontalRule { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> HorizontalRule { return mutate(enterkeyhint: value.rawValue) @@ -4738,7 +5123,7 @@ extension HorizontalRule: GlobalAttributes, GlobalEventAttributes, GlobalAriaAtt return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> HorizontalRule { return mutate(inputmode: value) } @@ -4799,9 +5184,14 @@ extension HorizontalRule: GlobalAttributes, GlobalEventAttributes, GlobalAriaAtt return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> HorizontalRule { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> HorizontalRule { + return mutate(spellcheck: value) + } public func style(_ value: String) -> HorizontalRule { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -4824,10 +5214,20 @@ extension HorizontalRule: GlobalAttributes, GlobalEventAttributes, GlobalAriaAtt return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> HorizontalRule { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> HorizontalRule { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> HorizontalRule { if condition { @@ -5014,17 +5414,27 @@ extension PreformattedText: GlobalAttributes, GlobalEventAttributes, GlobalAriaA return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> PreformattedText { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> PreformattedText { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> PreformattedText { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> PreformattedText { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> PreformattedText { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> PreformattedText { return mutate(enterkeyhint: value.rawValue) @@ -5039,7 +5449,7 @@ extension PreformattedText: GlobalAttributes, GlobalEventAttributes, GlobalAriaA return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> PreformattedText { return mutate(inputmode: value) } @@ -5100,9 +5510,14 @@ extension PreformattedText: GlobalAttributes, GlobalEventAttributes, GlobalAriaA return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> PreformattedText { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> PreformattedText { + return mutate(spellcheck: value) + } public func style(_ value: String) -> PreformattedText { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -5125,10 +5540,20 @@ extension PreformattedText: GlobalAttributes, GlobalEventAttributes, GlobalAriaA return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> PreformattedText { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> PreformattedText { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> PreformattedText { if condition { @@ -5309,17 +5734,27 @@ extension Blockquote: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribu return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Blockquote { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Blockquote { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Blockquote { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Blockquote { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Blockquote { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Blockquote { return mutate(enterkeyhint: value.rawValue) @@ -5334,7 +5769,7 @@ extension Blockquote: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribu return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Blockquote { return mutate(inputmode: value) } @@ -5395,9 +5830,14 @@ extension Blockquote: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribu return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Blockquote { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Blockquote { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Blockquote { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -5420,10 +5860,20 @@ extension Blockquote: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribu return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Blockquote { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Blockquote { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Blockquote { if condition { @@ -5620,17 +6070,27 @@ extension OrderedList: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttrib return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> OrderedList { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> OrderedList { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> OrderedList { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> OrderedList { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> OrderedList { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> OrderedList { return mutate(enterkeyhint: value.rawValue) @@ -5645,7 +6105,7 @@ extension OrderedList: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttrib return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> OrderedList { return mutate(inputmode: value) } @@ -5706,9 +6166,14 @@ extension OrderedList: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttrib return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> OrderedList { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> OrderedList { + return mutate(spellcheck: value) + } public func style(_ value: String) -> OrderedList { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -5731,10 +6196,20 @@ extension OrderedList: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttrib return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> OrderedList { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> OrderedList { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> OrderedList { if condition { @@ -5932,17 +6407,27 @@ extension UnorderedList: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttr return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> UnorderedList { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> UnorderedList { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> UnorderedList { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> UnorderedList { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> UnorderedList { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> UnorderedList { return mutate(enterkeyhint: value.rawValue) @@ -5957,7 +6442,7 @@ extension UnorderedList: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttr return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> UnorderedList { return mutate(inputmode: value) } @@ -6018,9 +6503,14 @@ extension UnorderedList: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttr return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> UnorderedList { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> UnorderedList { + return mutate(spellcheck: value) + } public func style(_ value: String) -> UnorderedList { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -6043,10 +6533,20 @@ extension UnorderedList: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttr return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> UnorderedList { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> UnorderedList { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> UnorderedList { if condition { @@ -6238,18 +6738,28 @@ extension Menu: GlobalAttributes { return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Menu { return mutate(contenteditable: value) } + public func editable(_ value: Bool = true) -> Menu { + return mutate(contenteditable: value) + } + public func direction(_ value: Values.Direction) -> Menu { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Menu { return mutate(draggable: value) } + public func draggable(_ value: Bool = true) -> Menu { + return mutate(draggable: value) + } + public func enterKeyHint(_ value: Values.Hint) -> Menu { return mutate(enterkeyhint: value.rawValue) } @@ -6263,7 +6773,7 @@ extension Menu: GlobalAttributes { return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Menu { return mutate(inputmode: value) } @@ -6324,10 +6834,15 @@ extension Menu: GlobalAttributes { return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Menu { return mutate(spellcheck: value) } + public func spellcheck(_ value: Bool = true) -> Menu { + return mutate(spellcheck: value) + } + public func style(_ value: String) -> Menu { return mutate(style: TaintedString(value, as: .css(.attribute))) } @@ -6349,10 +6864,20 @@ extension Menu: GlobalAttributes { return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Menu { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Menu { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Menu { if condition { @@ -6443,18 +6968,28 @@ extension DescriptionList: GlobalAttributes, GlobalEventAttributes, GlobalAriaAt public func `class`(_ value: String) -> DescriptionList { return mutate(class: value) } - + + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> DescriptionList { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> DescriptionList { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> DescriptionList { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> DescriptionList { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> DescriptionList { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> DescriptionList { return mutate(enterkeyhint: value.rawValue) @@ -6469,7 +7004,7 @@ extension DescriptionList: GlobalAttributes, GlobalEventAttributes, GlobalAriaAt return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> DescriptionList { return mutate(inputmode: value) } @@ -6530,9 +7065,14 @@ extension DescriptionList: GlobalAttributes, GlobalEventAttributes, GlobalAriaAt return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> DescriptionList { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> DescriptionList { + return mutate(spellcheck: value) + } public func style(_ value: String) -> DescriptionList { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -6555,10 +7095,20 @@ extension DescriptionList: GlobalAttributes, GlobalEventAttributes, GlobalAriaAt return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> DescriptionList { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> DescriptionList { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> DescriptionList { if condition { @@ -6744,17 +7294,27 @@ extension Figure: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Figure { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Figure { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Figure { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Figure { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Figure { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Figure { return mutate(enterkeyhint: value.rawValue) @@ -6769,7 +7329,7 @@ extension Figure: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Figure { return mutate(inputmode: value) } @@ -6830,9 +7390,14 @@ extension Figure: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Figure { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Figure { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Figure { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -6855,10 +7420,20 @@ extension Figure: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Figure { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Figure { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Figure { if condition { @@ -7041,17 +7616,27 @@ extension Anchor: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Anchor { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Anchor { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Anchor { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Anchor { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Anchor { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Anchor { return mutate(enterkeyhint: value.rawValue) @@ -7066,7 +7651,7 @@ extension Anchor: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Anchor { return mutate(inputmode: value) } @@ -7127,9 +7712,14 @@ extension Anchor: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Anchor { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Anchor { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Anchor { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -7152,10 +7742,20 @@ extension Anchor: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Anchor { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Anchor { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Anchor { if condition { @@ -7391,17 +7991,27 @@ extension Emphasize: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribut return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Emphasize { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Emphasize { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Emphasize { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Emphasize { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Emphasize { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Emphasize { return mutate(enterkeyhint: value.rawValue) @@ -7416,7 +8026,7 @@ extension Emphasize: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribut return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Emphasize { return mutate(inputmode: value) } @@ -7477,9 +8087,14 @@ extension Emphasize: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribut return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Emphasize { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Emphasize { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Emphasize { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -7502,10 +8117,20 @@ extension Emphasize: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribut return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Emphasize { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Emphasize { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Emphasize { if condition { @@ -7688,17 +8313,27 @@ extension Strong: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Strong { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Strong { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Strong { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Strong { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Strong { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Strong { return mutate(enterkeyhint: value.rawValue) @@ -7713,7 +8348,7 @@ extension Strong: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Strong { return mutate(inputmode: value) } @@ -7774,9 +8409,14 @@ extension Strong: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Strong { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Strong { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Strong { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -7799,10 +8439,20 @@ extension Strong: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Strong { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Strong { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Strong { if condition { @@ -7985,14 +8635,24 @@ extension Small: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes { return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Small { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Small { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Small { return mutate(dir: value.rawValue) } + + public func draggable(_ value: Bool = true) -> Small { + return mutate(draggable: value) + } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Small { return mutate(draggable: value) } @@ -8010,7 +8670,7 @@ extension Small: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes { return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Small { return mutate(inputmode: value) } @@ -8071,9 +8731,14 @@ extension Small: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes { return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Small { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Small { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Small { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -8096,10 +8761,20 @@ extension Small: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes { return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Small { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Small { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Small { if condition { @@ -8289,17 +8964,27 @@ extension StrikeThrough: GlobalAttributes, GlobalEventAttributes { return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> StrikeThrough { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> StrikeThrough { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> StrikeThrough { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> StrikeThrough { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> StrikeThrough { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> StrikeThrough { return mutate(enterkeyhint: value.rawValue) @@ -8314,7 +8999,7 @@ extension StrikeThrough: GlobalAttributes, GlobalEventAttributes { return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> StrikeThrough { return mutate(inputmode: value) } @@ -8375,9 +9060,14 @@ extension StrikeThrough: GlobalAttributes, GlobalEventAttributes { return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> StrikeThrough { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> StrikeThrough { + return mutate(spellcheck: value) + } public func style(_ value: String) -> StrikeThrough { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -8400,10 +9090,20 @@ extension StrikeThrough: GlobalAttributes, GlobalEventAttributes { return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> StrikeThrough { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> StrikeThrough { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> StrikeThrough { if condition { @@ -8525,17 +9225,27 @@ extension Main: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes { return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Main { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Main { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Main { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Main { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Main { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Main { return mutate(enterkeyhint: value.rawValue) @@ -8550,7 +9260,7 @@ extension Main: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes { return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Main { return mutate(inputmode: value) } @@ -8611,9 +9321,14 @@ extension Main: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes { return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Main { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Main { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Main { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -8636,10 +9351,20 @@ extension Main: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes { return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Main { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Main { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Main { if condition { @@ -8827,18 +9552,28 @@ extension Search: GlobalAttributes { return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Search { return mutate(contenteditable: value) } + public func editable(_ value: Bool = true) -> Search { + return mutate(contenteditable: value) + } + public func direction(_ value: Values.Direction) -> Search { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Search { return mutate(draggable: value) } + public func draggable(_ value: Bool = true) -> Search { + return mutate(draggable: value) + } + public func enterKeyHint(_ value: Values.Hint) -> Search { return mutate(enterkeyhint: value.rawValue) } @@ -8852,7 +9587,7 @@ extension Search: GlobalAttributes { return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Search { return mutate(inputmode: value) } @@ -8913,10 +9648,15 @@ extension Search: GlobalAttributes { return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Search { return mutate(spellcheck: value) } + public func spellcheck(_ value: Bool = true) -> Search { + return mutate(spellcheck: value) + } + public func style(_ value: String) -> Search { return mutate(style: TaintedString(value, as: .css(.attribute))) } @@ -8938,10 +9678,20 @@ extension Search: GlobalAttributes { return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Search { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Search { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Search { if condition { @@ -9026,17 +9776,27 @@ extension Division: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Division { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Division { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Division { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Division { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Division { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Division { return mutate(enterkeyhint: value.rawValue) @@ -9051,7 +9811,7 @@ extension Division: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Division { return mutate(inputmode: value) } @@ -9112,9 +9872,14 @@ extension Division: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Division { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Division { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Division { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -9137,10 +9902,20 @@ extension Division: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Division { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Division { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Division { if condition { @@ -9326,17 +10101,27 @@ extension Definition: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribu return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Definition { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Definition { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Definition { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Definition { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Definition { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Definition { return mutate(enterkeyhint: value.rawValue) @@ -9351,7 +10136,7 @@ extension Definition: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribu return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Definition { return mutate(inputmode: value) } @@ -9412,9 +10197,14 @@ extension Definition: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribu return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Definition { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Definition { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Definition { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -9437,10 +10227,20 @@ extension Definition: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribu return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Definition { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Definition { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Definition { if condition { @@ -9624,17 +10424,27 @@ extension Cite: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes { return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Cite { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Cite { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Cite { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Cite { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Cite { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Cite { return mutate(enterkeyhint: value.rawValue) @@ -9649,7 +10459,7 @@ extension Cite: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes { return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Cite { return mutate(inputmode: value) } @@ -9710,9 +10520,14 @@ extension Cite: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes { return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Cite { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Cite { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Cite { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -9735,10 +10550,20 @@ extension Cite: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes { return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Cite { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Cite { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Cite { if condition { @@ -9921,17 +10746,27 @@ extension ShortQuote: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribu return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> ShortQuote { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> ShortQuote { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> ShortQuote { return mutate(dir: value.rawValue) } - + + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> ShortQuote { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> ShortQuote { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> ShortQuote { return mutate(enterkeyhint: value.rawValue) @@ -9946,7 +10781,7 @@ extension ShortQuote: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribu return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> ShortQuote { return mutate(inputmode: value) } @@ -10007,9 +10842,14 @@ extension ShortQuote: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribu return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> ShortQuote { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> ShortQuote { + return mutate(spellcheck: value) + } public func style(_ value: String) -> ShortQuote { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -10032,10 +10872,20 @@ extension ShortQuote: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribu return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> ShortQuote { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> ShortQuote { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> ShortQuote { if condition { @@ -10223,17 +11073,27 @@ extension Abbreviation: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttri return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Abbreviation { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Abbreviation { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Abbreviation { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Abbreviation { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Abbreviation { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Abbreviation { return mutate(enterkeyhint: value.rawValue) @@ -10248,7 +11108,7 @@ extension Abbreviation: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttri return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Abbreviation { return mutate(inputmode: value) } @@ -10309,9 +11169,14 @@ extension Abbreviation: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttri return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Abbreviation { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Abbreviation { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Abbreviation { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -10334,10 +11199,20 @@ extension Abbreviation: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttri return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Abbreviation { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Abbreviation { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Abbreviation { if condition { @@ -10521,18 +11396,28 @@ extension Ruby: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes { return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Ruby { return mutate(contenteditable: value) } + public func editable(_ value: Bool = true) -> Ruby { + return mutate(contenteditable: value) + } + public func direction(_ value: Values.Direction) -> Ruby { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Ruby { return mutate(draggable: value) } + public func draggable(_ value: Bool = true) -> Ruby { + return mutate(draggable: value) + } + public func enterKeyHint(_ value: Values.Hint) -> Ruby { return mutate(enterkeyhint: value.rawValue) } @@ -10546,7 +11431,7 @@ extension Ruby: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes { return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Ruby { return mutate(inputmode: value) } @@ -10607,10 +11492,15 @@ extension Ruby: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes { return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Ruby { return mutate(spellcheck: value) } + public func spellcheck(_ value: Bool = true) -> Ruby { + return mutate(spellcheck: value) + } + public func style(_ value: String) -> Ruby { return mutate(style: TaintedString(value, as: .css(.attribute))) } @@ -10632,10 +11522,20 @@ extension Ruby: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes { return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Ruby { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Ruby { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Ruby { if condition { @@ -10821,17 +11721,27 @@ extension Data: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, V return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Data { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Data { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Data { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Data { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Data { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Data { return mutate(enterkeyhint: value.rawValue) @@ -10846,7 +11756,7 @@ 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.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Data { return mutate(inputmode: value) } @@ -10907,9 +11817,14 @@ extension Data: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, V return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Data { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Data { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Data { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -10932,10 +11847,20 @@ extension Data: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, V return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Data { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Data { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Data { if condition { @@ -11133,17 +12058,27 @@ extension Time: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, D return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Time { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Time { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Time { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Time { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Time { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Time { return mutate(enterkeyhint: value.rawValue) @@ -11158,7 +12093,7 @@ 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.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Time { return mutate(inputmode: value) } @@ -11218,10 +12153,15 @@ extension Time: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, D public func role(_ value: Values.Role) -> Time { return mutate(role: value.rawValue) } - + + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Time { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Time { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Time { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -11244,10 +12184,20 @@ extension Time: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, D return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Time { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Time { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Time { if condition { @@ -11436,17 +12386,27 @@ extension Code: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes { return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Code { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Code { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Code { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Code { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Code { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Code { return mutate(enterkeyhint: value.rawValue) @@ -11461,7 +12421,7 @@ extension Code: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes { return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Code { return mutate(inputmode: value) } @@ -11522,9 +12482,14 @@ extension Code: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes { return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Code { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Code { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Code { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -11547,10 +12512,20 @@ extension Code: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes { return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Code { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Code { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Code { if condition { @@ -11735,17 +12710,27 @@ extension Variable: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Variable { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Variable { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Variable { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Variable { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Variable { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Variable { return mutate(enterkeyhint: value.rawValue) @@ -11760,7 +12745,7 @@ extension Variable: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Variable { return mutate(inputmode: value) } @@ -11821,9 +12806,14 @@ extension Variable: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Variable { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Variable { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Variable { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -11846,10 +12836,20 @@ extension Variable: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Variable { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Variable { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Variable { if condition { @@ -12030,17 +13030,27 @@ extension SampleOutput: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttri return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> SampleOutput { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> SampleOutput { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> SampleOutput { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> SampleOutput { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> SampleOutput { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> SampleOutput { return mutate(enterkeyhint: value.rawValue) @@ -12055,7 +13065,7 @@ extension SampleOutput: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttri return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> SampleOutput { return mutate(inputmode: value) } @@ -12116,9 +13126,14 @@ extension SampleOutput: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttri return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> SampleOutput { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> SampleOutput { + return mutate(spellcheck: value) + } public func style(_ value: String) -> SampleOutput { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -12141,10 +13156,20 @@ extension SampleOutput: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttri return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> SampleOutput { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> SampleOutput { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> SampleOutput { if condition { @@ -12329,17 +13354,27 @@ extension KeyboardInput: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttr return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> KeyboardInput { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> KeyboardInput { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> KeyboardInput { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> KeyboardInput { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> KeyboardInput { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> KeyboardInput { return mutate(enterkeyhint: value.rawValue) @@ -12354,7 +13389,7 @@ extension KeyboardInput: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttr return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> KeyboardInput { return mutate(inputmode: value) } @@ -12415,9 +13450,14 @@ extension KeyboardInput: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttr return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> KeyboardInput { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> KeyboardInput { + return mutate(spellcheck: value) + } public func style(_ value: String) -> KeyboardInput { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -12440,10 +13480,20 @@ extension KeyboardInput: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttr return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> KeyboardInput { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> KeyboardInput { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> KeyboardInput { if condition { @@ -12628,17 +13678,27 @@ extension Subscript: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribut return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Subscript { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Subscript { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Subscript { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Subscript { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Subscript { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Subscript { return mutate(enterkeyhint: value.rawValue) @@ -12653,7 +13713,7 @@ extension Subscript: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribut return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Subscript { return mutate(inputmode: value) } @@ -12713,9 +13773,14 @@ extension Subscript: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribut return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Subscript { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Subscript { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Subscript { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -12738,10 +13803,20 @@ extension Subscript: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribut return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Subscript { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Subscript { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Subscript { if condition { @@ -12926,17 +14001,27 @@ extension Superscript: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttrib return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Superscript { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Superscript { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Superscript { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Superscript { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Superscript { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Superscript { return mutate(enterkeyhint: value.rawValue) @@ -12951,7 +14036,7 @@ extension Superscript: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttrib return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Superscript { return mutate(inputmode: value) } @@ -13012,9 +14097,14 @@ extension Superscript: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttrib return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Superscript { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Superscript { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Superscript { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -13037,10 +14127,20 @@ extension Superscript: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttrib return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Superscript { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Superscript { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Superscript { if condition { @@ -13225,17 +14325,27 @@ extension Italic: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Italic { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Italic { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Italic { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Italic { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Italic { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Italic { return mutate(enterkeyhint: value.rawValue) @@ -13250,7 +14360,7 @@ extension Italic: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Italic { return mutate(inputmode: value) } @@ -13311,9 +14421,14 @@ extension Italic: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Italic { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Italic { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Italic { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -13336,10 +14451,20 @@ extension Italic: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Italic { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Italic { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Italic { if condition { @@ -13531,17 +14656,27 @@ extension Bold: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes { return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Bold { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Bold { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Bold { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Bold { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Bold { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Bold { return mutate(enterkeyhint: value.rawValue) @@ -13556,7 +14691,7 @@ extension Bold: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes { return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Bold { return mutate(inputmode: value) } @@ -13617,9 +14752,14 @@ extension Bold: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes { return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Bold { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Bold { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Bold { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -13642,10 +14782,20 @@ extension Bold: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes { return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Bold { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Bold { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Bold { if condition { @@ -13837,17 +14987,27 @@ extension Underline: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribut return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Underline { return mutate(contenteditable: value) } + public func editable(_ value: Bool = true) -> Underline { + return mutate(contenteditable: value) + } + public func direction(_ value: Values.Direction) -> Underline { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Underline { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Underline { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Underline { return mutate(enterkeyhint: value.rawValue) @@ -13862,7 +15022,7 @@ extension Underline: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribut return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Underline { return mutate(inputmode: value) } @@ -13923,9 +15083,14 @@ extension Underline: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribut return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Underline { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Underline { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Underline { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -13948,10 +15113,20 @@ extension Underline: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribut return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Underline { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Underline { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Underline { if condition { @@ -14143,17 +15318,27 @@ extension Mark: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes { return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Mark { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Mark { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Mark { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Mark { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Mark { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Mark { return mutate(enterkeyhint: value.rawValue) @@ -14168,7 +15353,7 @@ extension Mark: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes { return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Mark { return mutate(inputmode: value) } @@ -14229,9 +15414,14 @@ extension Mark: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes { return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Mark { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Mark { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Mark { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -14254,10 +15444,20 @@ extension Mark: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes { return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Mark { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Mark { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Mark { if condition { @@ -14442,17 +15642,27 @@ extension Bdi: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes { return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Bdi { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Bdi { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Bdi { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Bdi { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Bdi { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Bdi { return mutate(enterkeyhint: value.rawValue) @@ -14467,7 +15677,7 @@ extension Bdi: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes { return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Bdi { return mutate(inputmode: value) } @@ -14528,9 +15738,14 @@ extension Bdi: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes { return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Bdi { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Bdi { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Bdi { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -14553,10 +15768,20 @@ extension Bdi: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes { return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Bdi { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Bdi { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Bdi { if condition { @@ -14735,17 +15960,27 @@ extension Bdo: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes { return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Bdo { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Bdo { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Bdo { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Bdo { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Bdo { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Bdo { return mutate(enterkeyhint: value.rawValue) @@ -14760,7 +15995,7 @@ extension Bdo: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes { return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Bdo { return mutate(inputmode: value) } @@ -14821,9 +16056,14 @@ extension Bdo: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes { return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Bdo { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Bdo { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Bdo { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -14846,10 +16086,20 @@ extension Bdo: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes { return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Bdo { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Bdo { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Bdo { if condition { @@ -15030,17 +16280,27 @@ extension Span: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes { return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Span { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Span { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Span { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Span { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Span { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Span { return mutate(enterkeyhint: value.rawValue) @@ -15055,7 +16315,7 @@ extension Span: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes { return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Span { return mutate(inputmode: value) } @@ -15116,9 +16376,14 @@ extension Span: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes { return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Span { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Span { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Span { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -15141,10 +16406,20 @@ extension Span: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes { return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Span { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Span { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Span { if condition { @@ -15316,17 +16591,27 @@ extension LineBreak: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribut return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> LineBreak { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> LineBreak { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> LineBreak { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> LineBreak { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> LineBreak { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> LineBreak { return mutate(enterkeyhint: value.rawValue) @@ -15341,7 +16626,7 @@ extension LineBreak: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribut return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> LineBreak { return mutate(inputmode: value) } @@ -15402,9 +16687,14 @@ extension LineBreak: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribut return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> LineBreak { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> LineBreak { + return mutate(spellcheck: value) + } public func style(_ value: String) -> LineBreak { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -15427,10 +16717,20 @@ extension LineBreak: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribut return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> LineBreak { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> LineBreak { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> LineBreak { if condition { @@ -15606,17 +16906,27 @@ extension WordBreak: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribut return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> WordBreak { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> WordBreak { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> WordBreak { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> WordBreak { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> WordBreak { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> WordBreak { return mutate(enterkeyhint: value.rawValue) @@ -15631,7 +16941,7 @@ extension WordBreak: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribut return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> WordBreak { return mutate(inputmode: value) } @@ -15692,9 +17002,14 @@ extension WordBreak: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribut return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> WordBreak { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> WordBreak { + return mutate(spellcheck: value) + } public func style(_ value: String) -> WordBreak { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -15717,10 +17032,20 @@ extension WordBreak: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribut return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> WordBreak { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> WordBreak { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> WordBreak { if condition { @@ -15901,17 +17226,27 @@ extension InsertedText: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttri return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> InsertedText { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> InsertedText { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> InsertedText { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> InsertedText { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> InsertedText { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> InsertedText { return mutate(enterkeyhint: value.rawValue) @@ -15926,7 +17261,7 @@ extension InsertedText: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttri return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> InsertedText { return mutate(inputmode: value) } @@ -15987,9 +17322,14 @@ extension InsertedText: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttri return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> InsertedText { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> InsertedText { + return mutate(spellcheck: value) + } public func style(_ value: String) -> InsertedText { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -16012,10 +17352,20 @@ extension InsertedText: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttri return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> InsertedText { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> InsertedText { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> InsertedText { if condition { @@ -16204,17 +17554,27 @@ extension DeletedText: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttrib return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> DeletedText { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> DeletedText { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> DeletedText { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> DeletedText { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> DeletedText { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> DeletedText { return mutate(enterkeyhint: value.rawValue) @@ -16229,7 +17589,7 @@ extension DeletedText: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttrib return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> DeletedText { return mutate(inputmode: value) } @@ -16290,9 +17650,14 @@ extension DeletedText: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttrib return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> DeletedText { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> DeletedText { + return mutate(spellcheck: value) + } public func style(_ value: String) -> DeletedText { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -16315,10 +17680,20 @@ extension DeletedText: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttrib return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> DeletedText { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> DeletedText { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> DeletedText { if condition { @@ -16512,17 +17887,27 @@ extension Picture: GlobalAttributes, GlobalEventAttributes { return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Picture { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Picture { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Picture { return mutate(dir: value.rawValue) } - + + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Picture { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Picture { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Picture { return mutate(enterkeyhint: value.rawValue) @@ -16537,7 +17922,7 @@ extension Picture: GlobalAttributes, GlobalEventAttributes { return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Picture { return mutate(inputmode: value) } @@ -16598,9 +17983,14 @@ extension Picture: GlobalAttributes, GlobalEventAttributes { return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Picture { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Picture { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Picture { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -16623,10 +18013,20 @@ extension Picture: GlobalAttributes, GlobalEventAttributes { return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Picture { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Picture { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Picture { if condition { @@ -16729,17 +18129,27 @@ extension Image: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return mutate(crossorigin: value.rawValue) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Image { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Image { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Image { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Image { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Image { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Image { return mutate(enterkeyhint: value.rawValue) @@ -16754,7 +18164,7 @@ extension Image: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Image { return mutate(inputmode: value) } @@ -16819,9 +18229,14 @@ extension Image: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Image { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Image { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Image { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -16844,10 +18259,20 @@ extension Image: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Image { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Image { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Image { if condition { @@ -17099,17 +18524,27 @@ extension InlineFrame: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttrib return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> InlineFrame { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> InlineFrame { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> InlineFrame { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> InlineFrame { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> InlineFrame { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> InlineFrame { return mutate(enterkeyhint: value.rawValue) @@ -17124,7 +18559,7 @@ extension InlineFrame: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttrib return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> InlineFrame { return mutate(inputmode: value) } @@ -17185,9 +18620,14 @@ extension InlineFrame: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttrib return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> InlineFrame { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> InlineFrame { + return mutate(spellcheck: value) + } public func style(_ value: String) -> InlineFrame { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -17210,10 +18650,20 @@ extension InlineFrame: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttrib return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> InlineFrame { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> InlineFrame { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> InlineFrame { if condition { @@ -17431,17 +18881,27 @@ extension Embed: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Embed { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Embed { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Embed { return mutate(dir: value.rawValue) } - + + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Embed { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Embed { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Embed { return mutate(enterkeyhint: value.rawValue) @@ -17456,7 +18916,7 @@ extension Embed: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Embed { return mutate(inputmode: value) } @@ -17517,9 +18977,14 @@ extension Embed: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Embed { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Embed { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Embed { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -17542,10 +19007,20 @@ extension Embed: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Embed { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Embed { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Embed { if condition { @@ -17747,17 +19222,27 @@ extension Object: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Object { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Object { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Object { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Object { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Object { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Object { return mutate(enterkeyhint: value.rawValue) @@ -17772,7 +19257,7 @@ extension Object: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Object { return mutate(inputmode: value) } @@ -17833,9 +19318,14 @@ extension Object: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Object { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Object { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Object { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -17858,10 +19348,20 @@ extension Object: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Object { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Object { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Object { if condition { @@ -18068,17 +19568,27 @@ extension Video: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Video { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Video { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Video { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Video { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Video { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Video { return mutate(enterkeyhint: value.rawValue) @@ -18093,7 +19603,7 @@ extension Video: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Video { return mutate(inputmode: value) } @@ -18154,9 +19664,14 @@ extension Video: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Video { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Video { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Video { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -18179,10 +19694,20 @@ extension Video: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Video { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Video { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Video { if condition { @@ -18428,17 +19953,27 @@ extension Audio: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return mutate(crossorigin: value.rawValue) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Audio { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Audio { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Audio { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Audio { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Audio { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Audio { return mutate(enterkeyhint: value.rawValue) @@ -18453,7 +19988,7 @@ extension Audio: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Audio { return mutate(inputmode: value) } @@ -18514,9 +20049,14 @@ extension Audio: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Audio { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Audio { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Audio { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -18539,10 +20079,20 @@ extension Audio: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Audio { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Audio { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Audio { if condition { @@ -18769,17 +20319,27 @@ extension Map: GlobalAttributes, GlobalEventAttributes, NameAttribute { return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Map { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Map { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Map { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Map { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Map { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Map { return mutate(enterkeyhint: value.rawValue) @@ -18794,7 +20354,7 @@ extension Map: GlobalAttributes, GlobalEventAttributes, NameAttribute { return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Map { return mutate(inputmode: value) } @@ -18855,9 +20415,14 @@ extension Map: GlobalAttributes, GlobalEventAttributes, NameAttribute { return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Map { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Map { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Map { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -18880,10 +20445,20 @@ extension Map: GlobalAttributes, GlobalEventAttributes, NameAttribute { return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Map { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Map { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Map { if condition { @@ -18998,17 +20573,27 @@ extension Form: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, A return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Form { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Form { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Form { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Form { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Form { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Form { return mutate(enterkeyhint: value.rawValue) @@ -19023,7 +20608,7 @@ 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.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Form { return mutate(inputmode: value) } @@ -19084,9 +20669,14 @@ extension Form: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, A return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Form { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Form { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Form { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -19109,10 +20699,20 @@ extension Form: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, A return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Form { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Form { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Form { if condition { @@ -19126,7 +20726,7 @@ extension Form: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, A return mutate(action: value) } - @available(*, deprecated, message: "The autocomplete attribute is actually a enum attribute. You should use autocomplete(_:) instead.") + @available(*, unavailable, message: "Use the autocomplete(_:) modifier instead.") public func hasCompletion(_ value: Bool) -> Form { if value { @@ -19342,17 +20942,27 @@ extension DataList: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> DataList { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> DataList { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> DataList { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> DataList { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> DataList { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> DataList { return mutate(enterkeyhint: value.rawValue) @@ -19367,7 +20977,7 @@ extension DataList: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> DataList { return mutate(inputmode: value) } @@ -19428,9 +21038,14 @@ extension DataList: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> DataList { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> DataList { + return mutate(spellcheck: value) + } public func style(_ value: String) -> DataList { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -19453,10 +21068,20 @@ extension DataList: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> DataList { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> DataList { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> DataList { if condition { @@ -19639,17 +21264,27 @@ extension Output: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Output { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Output { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Output { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Output { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Output { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Output { return mutate(enterkeyhint: value.rawValue) @@ -19664,7 +21299,7 @@ extension Output: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Output { return mutate(inputmode: value) } @@ -19725,9 +21360,14 @@ extension Output: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Output { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Output { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Output { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -19750,10 +21390,20 @@ extension Output: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Output { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Output { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Output { if condition { @@ -19948,17 +21598,27 @@ extension Progress: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Progress { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Progress { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Progress { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Progress { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Progress { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Progress { return mutate(enterkeyhint: value.rawValue) @@ -19973,7 +21633,7 @@ extension Progress: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Progress { return mutate(inputmode: value) } @@ -20034,9 +21694,14 @@ extension Progress: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Progress { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Progress { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Progress { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -20059,10 +21724,20 @@ extension Progress: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Progress { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Progress { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Progress { if condition { @@ -20264,17 +21939,27 @@ extension Meter: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Meter { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Meter { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Meter { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Meter { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Meter { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Meter { return mutate(enterkeyhint: value.rawValue) @@ -20289,7 +21974,7 @@ extension Meter: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Meter { return mutate(inputmode: value) } @@ -20349,10 +22034,15 @@ extension Meter: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, public func role(_ value: Values.Role) -> Meter { return mutate(role: value.rawValue) } - + + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Meter { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Meter { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Meter { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -20375,10 +22065,20 @@ extension Meter: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Meter { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Meter { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Meter { if condition { @@ -20597,17 +22297,27 @@ extension Details: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Details { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Details { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Details { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Details { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Details { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Details { return mutate(enterkeyhint: value.rawValue) @@ -20622,7 +22332,7 @@ extension Details: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Details { return mutate(inputmode: value) } @@ -20683,9 +22393,14 @@ extension Details: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Details { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Details { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Details { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -20708,8 +22423,18 @@ extension Details: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Details { return mutate(translate: value.rawValue) + } + + public func translate(_ value: Bool = true) -> Details { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") } public func inert(_ condition: Bool = true) -> Details { @@ -20905,17 +22630,27 @@ extension Dialog: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Dialog { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Dialog { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Dialog { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Dialog { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Dialog { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Dialog { return mutate(enterkeyhint: value.rawValue) @@ -20930,7 +22665,7 @@ extension Dialog: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Dialog { return mutate(inputmode: value) } @@ -20991,9 +22726,14 @@ extension Dialog: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Dialog { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Dialog { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Dialog { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -21016,10 +22756,20 @@ extension Dialog: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Dialog { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Dialog { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Dialog { if condition { @@ -21208,10 +22958,15 @@ extension Script: GlobalAttributes, GlobalEventAttributes, AsynchronouslyAttribu return mutate(crossorigin: value.rawValue) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Script { return mutate(contenteditable: value) } + public func editable(_ value: Bool = true) -> Script { + return mutate(contenteditable: value) + } + public func `defer`() -> Script { return mutate(defer: "defer") } @@ -21220,9 +22975,14 @@ extension Script: GlobalAttributes, GlobalEventAttributes, AsynchronouslyAttribu return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Script { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Script { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Script { return mutate(enterkeyhint: value.rawValue) @@ -21237,7 +22997,7 @@ extension Script: GlobalAttributes, GlobalEventAttributes, AsynchronouslyAttribu return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Script { return mutate(inputmode: value) } @@ -21306,9 +23066,14 @@ extension Script: GlobalAttributes, GlobalEventAttributes, AsynchronouslyAttribu return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Script { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Script { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Script { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -21331,10 +23096,20 @@ extension Script: GlobalAttributes, GlobalEventAttributes, AsynchronouslyAttribu return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Script { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Script { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Script { if condition { @@ -21469,17 +23244,27 @@ extension NoScript: GlobalAttributes, GlobalEventAttributes { return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> NoScript { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> NoScript { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> NoScript { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> NoScript { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> NoScript { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> NoScript { return mutate(enterkeyhint: value.rawValue) @@ -21494,7 +23279,7 @@ extension NoScript: GlobalAttributes, GlobalEventAttributes { return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> NoScript { return mutate(inputmode: value) } @@ -21555,9 +23340,14 @@ extension NoScript: GlobalAttributes, GlobalEventAttributes { return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> NoScript { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> NoScript { + return mutate(spellcheck: value) + } public func style(_ value: String) -> NoScript { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -21580,10 +23370,20 @@ extension NoScript: GlobalAttributes, GlobalEventAttributes { return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> NoScript { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> NoScript { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> NoScript { if condition { @@ -21695,17 +23495,27 @@ extension Template: GlobalAttributes, GlobalEventAttributes, ShadowRootModeAttri return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Template { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Template { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Template { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Template { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Template { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Template { return mutate(enterkeyhint: value.rawValue) @@ -21720,7 +23530,7 @@ extension Template: GlobalAttributes, GlobalEventAttributes, ShadowRootModeAttri return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Template { return mutate(inputmode: value) } @@ -21781,9 +23591,14 @@ extension Template: GlobalAttributes, GlobalEventAttributes, ShadowRootModeAttri return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Template { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Template { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Template { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -21806,10 +23621,20 @@ extension Template: GlobalAttributes, GlobalEventAttributes, ShadowRootModeAttri return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Template { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Template { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Template { if condition { @@ -21914,17 +23739,27 @@ extension Canvas: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Canvas { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Canvas { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Canvas { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Canvas { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Canvas { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Canvas { return mutate(enterkeyhint: value.rawValue) @@ -21939,7 +23774,7 @@ extension Canvas: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Canvas { return mutate(inputmode: value) } @@ -22000,9 +23835,14 @@ extension Canvas: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Canvas { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Canvas { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Canvas { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -22025,10 +23865,20 @@ extension Canvas: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Canvas { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Canvas { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Canvas { if condition { @@ -22224,17 +24074,27 @@ extension Table: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Table { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Table { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Table { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Table { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Table { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Table { return mutate(enterkeyhint: value.rawValue) @@ -22249,7 +24109,7 @@ extension Table: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Table { return mutate(inputmode: value) } @@ -22310,9 +24170,14 @@ extension Table: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Table { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Table { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Table { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -22335,10 +24200,20 @@ extension Table: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Table { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Table { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Table { if condition { @@ -22667,18 +24542,28 @@ extension Slot: GlobalAttributes, NameAttribute { return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Slot { return mutate(contenteditable: value) } + public func editable(_ value: Bool = true) -> Slot { + return mutate(contenteditable: value) + } + public func direction(_ value: Values.Direction) -> Slot { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Slot { return mutate(draggable: value) } + public func draggable(_ value: Bool = true) -> Slot { + return mutate(draggable: value) + } + public func enterKeyHint(_ value: Values.Hint) -> Slot { return mutate(enterkeyhint: value.rawValue) } @@ -22692,7 +24577,7 @@ extension Slot: GlobalAttributes, NameAttribute { return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Slot { return mutate(inputmode: value) } @@ -22753,10 +24638,15 @@ extension Slot: GlobalAttributes, NameAttribute { return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Slot { return mutate(spellcheck: value) } + public func spellcheck(_ value: Bool = true) -> Slot { + return mutate(spellcheck: value) + } + public func style(_ value: String) -> Slot { return mutate(style: TaintedString(value, as: .css(.attribute))) } @@ -22778,10 +24668,20 @@ extension Slot: GlobalAttributes, NameAttribute { return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Slot { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Slot { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Slot { if condition { diff --git a/Sources/HTMLKit/Abstraction/Elements/DefinitionElements.swift b/Sources/HTMLKit/Abstraction/Elements/DefinitionElements.swift index 13c9b4bd..5bfeaab2 100644 --- a/Sources/HTMLKit/Abstraction/Elements/DefinitionElements.swift +++ b/Sources/HTMLKit/Abstraction/Elements/DefinitionElements.swift @@ -80,17 +80,27 @@ extension TermName: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> TermName { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> TermName { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> TermName { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> TermName { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> TermName { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> TermName { return mutate(enterkeyhint: value.rawValue) @@ -105,7 +115,7 @@ extension TermName: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> TermName { return mutate(inputmode: value) } @@ -166,9 +176,14 @@ extension TermName: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> TermName { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> TermName { + return mutate(spellcheck: value) + } public func style(_ value: String) -> TermName { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -191,10 +206,20 @@ extension TermName: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> TermName { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> TermName { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> TermName { if condition { @@ -380,17 +405,27 @@ extension TermDefinition: GlobalAttributes, GlobalEventAttributes, GlobalAriaAtt return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> TermDefinition { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> TermDefinition { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> TermDefinition { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> TermDefinition { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> TermDefinition { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> TermDefinition { return mutate(enterkeyhint: value.rawValue) @@ -405,7 +440,7 @@ extension TermDefinition: GlobalAttributes, GlobalEventAttributes, GlobalAriaAtt return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> TermDefinition { return mutate(inputmode: value) } @@ -466,9 +501,14 @@ extension TermDefinition: GlobalAttributes, GlobalEventAttributes, GlobalAriaAtt return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> TermDefinition { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> TermDefinition { + return mutate(spellcheck: value) + } public func style(_ value: String) -> TermDefinition { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -491,10 +531,20 @@ extension TermDefinition: GlobalAttributes, GlobalEventAttributes, GlobalAriaAtt return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> TermDefinition { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> TermDefinition { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> TermDefinition { if condition { diff --git a/Sources/HTMLKit/Abstraction/Elements/FigureElements.swift b/Sources/HTMLKit/Abstraction/Elements/FigureElements.swift index 309d6163..41490124 100644 --- a/Sources/HTMLKit/Abstraction/Elements/FigureElements.swift +++ b/Sources/HTMLKit/Abstraction/Elements/FigureElements.swift @@ -76,17 +76,27 @@ extension FigureCaption: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttr return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> FigureCaption { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> FigureCaption { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> FigureCaption { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> FigureCaption { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> FigureCaption { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> FigureCaption { return mutate(enterkeyhint: value.rawValue) @@ -101,7 +111,7 @@ extension FigureCaption: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttr return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> FigureCaption { return mutate(inputmode: value) } @@ -162,9 +172,14 @@ extension FigureCaption: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttr return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> FigureCaption { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> FigureCaption { + return mutate(spellcheck: value) + } public func style(_ value: String) -> FigureCaption { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -187,10 +202,20 @@ extension FigureCaption: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttr return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> FigureCaption { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> FigureCaption { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> FigureCaption { if condition { diff --git a/Sources/HTMLKit/Abstraction/Elements/FormElements.swift b/Sources/HTMLKit/Abstraction/Elements/FormElements.swift index 3e88f3f8..253a8618 100644 --- a/Sources/HTMLKit/Abstraction/Elements/FormElements.swift +++ b/Sources/HTMLKit/Abstraction/Elements/FormElements.swift @@ -64,17 +64,27 @@ extension Input: GlobalAttributes, GlobalEventAttributes, AcceptAttribute, Alter return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Input { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Input { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Input { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Input { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Input { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Input { return mutate(enterkeyhint: value.rawValue) @@ -89,7 +99,7 @@ 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.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Input { return mutate(inputmode: value) } @@ -150,9 +160,14 @@ extension Input: GlobalAttributes, GlobalEventAttributes, AcceptAttribute, Alter return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Input { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Input { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Input { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -175,10 +190,20 @@ extension Input: GlobalAttributes, GlobalEventAttributes, AcceptAttribute, Alter return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Input { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Input { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Input { if condition { @@ -217,7 +242,7 @@ extension Input: GlobalAttributes, GlobalEventAttributes, AcceptAttribute, Alter return mutate(alternate: value) } - @available(*, deprecated, message: "The autocomplete attribute is actually a enum attribute. You should use autocomplete(_:) instead.") + @available(*, unavailable, message: "Use the autocomplete(_:) modifier instead.") public func hasCompletion(_ value: Bool) -> Input { if value { @@ -476,17 +501,27 @@ extension Label: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Label { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Label { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Label { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Label { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Label { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Label { return mutate(enterkeyhint: value.rawValue) @@ -501,7 +536,7 @@ extension Label: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Label { return mutate(inputmode: value) } @@ -562,9 +597,14 @@ extension Label: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Label { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Label { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Label { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -587,10 +627,20 @@ extension Label: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Label { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Label { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Label { if condition { @@ -791,17 +841,27 @@ extension Select: GlobalAttributes, GlobalEventAttributes, AutocompleteAttribute return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Select { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Select { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Select { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Select { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Select { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Select { return mutate(enterkeyhint: value.rawValue) @@ -816,7 +876,7 @@ extension Select: GlobalAttributes, GlobalEventAttributes, AutocompleteAttribute return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Select { return mutate(inputmode: value) } @@ -877,9 +937,14 @@ extension Select: GlobalAttributes, GlobalEventAttributes, AutocompleteAttribute return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Select { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Select { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Select { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -902,10 +967,20 @@ extension Select: GlobalAttributes, GlobalEventAttributes, AutocompleteAttribute return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Select { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Select { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Select { if condition { @@ -915,7 +990,7 @@ extension Select: GlobalAttributes, GlobalEventAttributes, AutocompleteAttribute return self } - @available(*, deprecated, message: "The autocomplete attribute is actually a enum attribute. You should use autocomplete(_:) instead.") + @available(*, unavailable, message: "Use the autocomplete(_:) modifier instead.") public func hasCompletion(_ value: Bool) -> Select { if value { @@ -1064,17 +1139,27 @@ extension TextArea: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> TextArea { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> TextArea { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> TextArea { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> TextArea { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> TextArea { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> TextArea { return mutate(enterkeyhint: value.rawValue) @@ -1089,7 +1174,7 @@ extension TextArea: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> TextArea { return mutate(inputmode: value) } @@ -1150,9 +1235,14 @@ extension TextArea: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> TextArea { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> TextArea { + return mutate(spellcheck: value) + } public func style(_ value: String) -> TextArea { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -1175,10 +1265,20 @@ extension TextArea: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> TextArea { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> TextArea { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> TextArea { if condition { @@ -1188,7 +1288,7 @@ extension TextArea: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return self } - @available(*, deprecated, message: "The autocomplete attribute is actually a enum attribute. You should use autocomplete(_:) instead.") + @available(*, unavailable, message: "Use the autocomplete(_:) modifier instead.") public func hasCompletion(_ value: Bool) -> TextArea { if value { @@ -1450,17 +1550,27 @@ extension Button: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Button { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Button { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Button { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Button { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Button { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Button { return mutate(enterkeyhint: value.rawValue) @@ -1475,7 +1585,7 @@ extension Button: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Button { return mutate(inputmode: value) } @@ -1536,9 +1646,14 @@ extension Button: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Button { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Button { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Button { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -1561,10 +1676,20 @@ extension Button: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Button { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Button { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Button { if condition { @@ -1808,17 +1933,27 @@ extension Fieldset: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Fieldset { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Fieldset { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Fieldset { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Fieldset { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Fieldset { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Fieldset { return mutate(enterkeyhint: value.rawValue) @@ -1833,7 +1968,7 @@ extension Fieldset: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Fieldset { return mutate(inputmode: value) } @@ -1894,9 +2029,14 @@ extension Fieldset: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Fieldset { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Fieldset { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Fieldset { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -1919,10 +2059,20 @@ extension Fieldset: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Fieldset { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Fieldset { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Fieldset { if condition { diff --git a/Sources/HTMLKit/Abstraction/Elements/HeadElements.swift b/Sources/HTMLKit/Abstraction/Elements/HeadElements.swift index 8be51e31..ca125800 100644 --- a/Sources/HTMLKit/Abstraction/Elements/HeadElements.swift +++ b/Sources/HTMLKit/Abstraction/Elements/HeadElements.swift @@ -69,18 +69,28 @@ extension Title: GlobalAttributes, GlobalEventAttributes { return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Title { return mutate(contenteditable: value) } + public func editable(_ value: Bool = true) -> Title { + return mutate(contenteditable: value) + } + public func direction(_ value: Values.Direction) -> Title { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Title { return mutate(draggable: value) } + public func draggable(_ value: Bool = true) -> Title { + return mutate(draggable: value) + } + public func enterKeyHint(_ value: Values.Hint) -> Title { return mutate(enterkeyhint: value.rawValue) } @@ -94,7 +104,7 @@ extension Title: GlobalAttributes, GlobalEventAttributes { return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Title { return mutate(inputmode: value) } @@ -155,10 +165,15 @@ extension Title: GlobalAttributes, GlobalEventAttributes { return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Title { return mutate(spellcheck: value) } + public func spellcheck(_ value: Bool = true) -> Title { + return mutate(spellcheck: value) + } + public func style(_ value: String) -> Title { return mutate(style: TaintedString(value, as: .css(.attribute))) } @@ -180,10 +195,20 @@ extension Title: GlobalAttributes, GlobalEventAttributes { return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Title { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Title { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Title { if condition { @@ -290,18 +315,28 @@ extension Base: GlobalAttributes, GlobalEventAttributes, ReferenceAttribute, Tar return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Base { return mutate(contenteditable: value) } + public func editable(_ value: Bool = true) -> Base { + return mutate(contenteditable: value) + } + public func direction(_ value: Values.Direction) -> Base { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Base { return mutate(draggable: value) } + public func draggable(_ value: Bool = true) -> Base { + return mutate(draggable: value) + } + public func enterKeyHint(_ value: Values.Hint) -> Base { return mutate(enterkeyhint: value.rawValue) } @@ -315,7 +350,7 @@ 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.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Base { return mutate(inputmode: value) } @@ -376,10 +411,15 @@ extension Base: GlobalAttributes, GlobalEventAttributes, ReferenceAttribute, Tar return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Base { return mutate(spellcheck: value) } + public func spellcheck(_ value: Bool = true) -> Base { + return mutate(spellcheck: value) + } + public func style(_ value: String) -> Base { return mutate(style: TaintedString(value, as: .css(.attribute))) } @@ -401,10 +441,20 @@ extension Base: GlobalAttributes, GlobalEventAttributes, ReferenceAttribute, Tar return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Base { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Base { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Base { if condition { @@ -511,17 +561,27 @@ extension Meta: GlobalAttributes, GlobalEventAttributes, ContentAttribute, NameA return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Meta { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Meta { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Meta { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Meta { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Meta { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Meta { return mutate(enterkeyhint: value.rawValue) @@ -536,7 +596,7 @@ 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.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Meta { return mutate(inputmode: value) } @@ -597,9 +657,14 @@ extension Meta: GlobalAttributes, GlobalEventAttributes, ContentAttribute, NameA return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Meta { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Meta { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Meta { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -622,10 +687,20 @@ extension Meta: GlobalAttributes, GlobalEventAttributes, ContentAttribute, NameA return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Meta { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Meta { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Meta { if condition { @@ -767,17 +842,27 @@ extension Style: GlobalAttributes, GlobalEventAttributes, TypeAttribute, MediaAt return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Style { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Style { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Style { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Style { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Style { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Style { return mutate(enterkeyhint: value.rawValue) @@ -792,7 +877,7 @@ 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.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Style { return mutate(inputmode: value) } @@ -853,9 +938,14 @@ extension Style: GlobalAttributes, GlobalEventAttributes, TypeAttribute, MediaAt return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Style { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Style { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Style { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -878,10 +968,20 @@ extension Style: GlobalAttributes, GlobalEventAttributes, TypeAttribute, MediaAt return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Style { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Style { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Style { if condition { @@ -1007,17 +1107,27 @@ extension Link: GlobalAttributes, GlobalEventAttributes, ReferenceAttribute, Ref return mutate(crossorigin: value.rawValue) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Link { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Link { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Link { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Link { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Link { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Link { return mutate(enterkeyhint: value.rawValue) @@ -1032,7 +1142,7 @@ 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.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Link { return mutate(inputmode: value) } @@ -1101,9 +1211,14 @@ extension Link: GlobalAttributes, GlobalEventAttributes, ReferenceAttribute, Ref return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Link { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Link { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Link { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -1126,10 +1241,20 @@ extension Link: GlobalAttributes, GlobalEventAttributes, ReferenceAttribute, Ref return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Link { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Link { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Link { if condition { diff --git a/Sources/HTMLKit/Abstraction/Elements/HtmlElements.swift b/Sources/HTMLKit/Abstraction/Elements/HtmlElements.swift index ca0ec2d3..563f12be 100644 --- a/Sources/HTMLKit/Abstraction/Elements/HtmlElements.swift +++ b/Sources/HTMLKit/Abstraction/Elements/HtmlElements.swift @@ -67,18 +67,28 @@ extension Head: GlobalAttributes, GlobalEventAttributes { return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Head { return mutate(contenteditable: value) } + public func editable(_ value: Bool = true) -> Head { + return mutate(contenteditable: value) + } + public func direction(_ value: Values.Direction) -> Head { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Head { return mutate(draggable: value) } + public func draggable(_ value: Bool = true) -> Head { + return mutate(draggable: value) + } + public func enterKeyHint(_ value: Values.Hint) -> Head { return mutate(enterkeyhint: value.rawValue) } @@ -92,7 +102,7 @@ extension Head: GlobalAttributes, GlobalEventAttributes { return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Head { return mutate(inputmode: value) } @@ -153,10 +163,15 @@ extension Head: GlobalAttributes, GlobalEventAttributes { return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Head { return mutate(spellcheck: value) } + public func spellcheck(_ value: Bool = true) -> Head { + return mutate(spellcheck: value) + } + public func style(_ value: String) -> Head { return mutate(style: TaintedString(value, as: .css(.attribute))) } @@ -178,10 +193,20 @@ extension Head: GlobalAttributes, GlobalEventAttributes { return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Head { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Head { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Head { if condition { @@ -291,17 +316,27 @@ extension Body: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, W return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Body { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Body { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Body { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Body { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Body { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Body { return mutate(enterkeyhint: value.rawValue) @@ -316,7 +351,7 @@ 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.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Body { return mutate(inputmode: value) } @@ -377,9 +412,14 @@ extension Body: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, W return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Body { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Body { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Body { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -402,9 +442,19 @@ extension Body: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, W return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Body { return mutate(translate: value.rawValue) } + + public func translate(_ value: Bool = true) -> Body { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } public func inert(_ condition: Bool = true) -> Body { diff --git a/Sources/HTMLKit/Abstraction/Elements/InputElements.swift b/Sources/HTMLKit/Abstraction/Elements/InputElements.swift index b6bd7cb7..50143f12 100644 --- a/Sources/HTMLKit/Abstraction/Elements/InputElements.swift +++ b/Sources/HTMLKit/Abstraction/Elements/InputElements.swift @@ -82,17 +82,27 @@ extension OptionGroup: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttrib return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> OptionGroup { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> OptionGroup { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> OptionGroup { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> OptionGroup { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> OptionGroup { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> OptionGroup { return mutate(enterkeyhint: value.rawValue) @@ -107,7 +117,7 @@ extension OptionGroup: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttrib return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> OptionGroup { return mutate(inputmode: value) } @@ -168,9 +178,14 @@ extension OptionGroup: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttrib return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> OptionGroup { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> OptionGroup { + return mutate(spellcheck: value) + } public func style(_ value: String) -> OptionGroup { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -193,10 +208,20 @@ extension OptionGroup: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttrib return mutate(title: LocalizedString(key: localizedKey, table: tableName)) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> OptionGroup { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> OptionGroup { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> OptionGroup { if condition { @@ -393,17 +418,27 @@ extension Option: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Option { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Option { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Option { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Option { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Option { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Option { return mutate(enterkeyhint: value.rawValue) @@ -418,7 +453,7 @@ extension Option: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Option { return mutate(inputmode: value) } @@ -479,9 +514,14 @@ extension Option: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Option { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Option { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Option { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -504,10 +544,20 @@ extension Option: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Option { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Option { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Option { if condition { @@ -738,17 +788,27 @@ extension Legend: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Legend { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Legend { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Legend { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Legend { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Legend { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Legend { return mutate(enterkeyhint: value.rawValue) @@ -763,7 +823,7 @@ extension Legend: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Legend { return mutate(inputmode: value) } @@ -824,9 +884,14 @@ extension Legend: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Legend { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Legend { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Legend { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -849,10 +914,20 @@ extension Legend: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Legend { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Legend { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Legend { if condition { @@ -1038,17 +1113,27 @@ extension Summary: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Summary { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Summary { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Summary { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Summary { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Summary { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Summary { return mutate(enterkeyhint: value.rawValue) @@ -1063,7 +1148,7 @@ extension Summary: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Summary { return mutate(inputmode: value) } @@ -1124,9 +1209,14 @@ extension Summary: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Summary { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Summary { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Summary { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -1149,10 +1239,20 @@ extension Summary: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Summary { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Summary { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Summary { if condition { diff --git a/Sources/HTMLKit/Abstraction/Elements/ListElements.swift b/Sources/HTMLKit/Abstraction/Elements/ListElements.swift index e049198c..3798a920 100644 --- a/Sources/HTMLKit/Abstraction/Elements/ListElements.swift +++ b/Sources/HTMLKit/Abstraction/Elements/ListElements.swift @@ -76,17 +76,27 @@ extension ListItem: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> ListItem { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> ListItem { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> ListItem { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> ListItem { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> ListItem { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> ListItem { return mutate(enterkeyhint: value.rawValue) @@ -101,7 +111,7 @@ extension ListItem: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> ListItem { return mutate(inputmode: value) } @@ -162,9 +172,14 @@ extension ListItem: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> ListItem { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> ListItem { + return mutate(spellcheck: value) + } public func style(_ value: String) -> ListItem { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -187,10 +202,20 @@ extension ListItem: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> ListItem { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> ListItem { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> ListItem { if condition { diff --git a/Sources/HTMLKit/Abstraction/Elements/MapElements.swift b/Sources/HTMLKit/Abstraction/Elements/MapElements.swift index 824f2386..7a6cf5db 100644 --- a/Sources/HTMLKit/Abstraction/Elements/MapElements.swift +++ b/Sources/HTMLKit/Abstraction/Elements/MapElements.swift @@ -71,17 +71,27 @@ extension Area: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, A return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Area { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Area { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Area { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Area { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Area { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Area { return mutate(enterkeyhint: value.rawValue) @@ -96,7 +106,7 @@ 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.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Area { return mutate(inputmode: value) } @@ -157,9 +167,14 @@ extension Area: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, A return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Area { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Area { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Area { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -182,10 +197,20 @@ extension Area: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, A return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Area { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Area { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Area { if condition { diff --git a/Sources/HTMLKit/Abstraction/Elements/MediaElements.swift b/Sources/HTMLKit/Abstraction/Elements/MediaElements.swift index 99b0b7db..c4a1395f 100644 --- a/Sources/HTMLKit/Abstraction/Elements/MediaElements.swift +++ b/Sources/HTMLKit/Abstraction/Elements/MediaElements.swift @@ -63,17 +63,27 @@ extension Source: GlobalAttributes, GlobalEventAttributes, TypeAttribute, Source return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Source { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Source { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Source { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Source { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Source { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Source { return mutate(enterkeyhint: value.rawValue) @@ -88,7 +98,7 @@ 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.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Source { return mutate(inputmode: value) } @@ -149,9 +159,14 @@ extension Source: GlobalAttributes, GlobalEventAttributes, TypeAttribute, Source return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Source { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Source { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Source { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -174,10 +189,20 @@ extension Source: GlobalAttributes, GlobalEventAttributes, TypeAttribute, Source return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Source { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Source { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Source { if condition { @@ -334,17 +359,27 @@ extension Track: GlobalAttributes, GlobalEventAttributes, KindAttribute, SourceA return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Track { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Track { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Track { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Track { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Track { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Track { return mutate(enterkeyhint: value.rawValue) @@ -359,7 +394,7 @@ 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.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Track { return mutate(inputmode: value) } @@ -420,9 +455,14 @@ extension Track: GlobalAttributes, GlobalEventAttributes, KindAttribute, SourceA return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Track { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Track { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Track { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -445,10 +485,20 @@ extension Track: GlobalAttributes, GlobalEventAttributes, KindAttribute, SourceA return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Track { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Track { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Track { if condition { diff --git a/Sources/HTMLKit/Abstraction/Elements/ObjectElements.swift b/Sources/HTMLKit/Abstraction/Elements/ObjectElements.swift index 466fd41a..4628328e 100644 --- a/Sources/HTMLKit/Abstraction/Elements/ObjectElements.swift +++ b/Sources/HTMLKit/Abstraction/Elements/ObjectElements.swift @@ -67,17 +67,27 @@ extension Parameter: GlobalAttributes, GlobalEventAttributes, NameAttribute, Val return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Parameter { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Parameter { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Parameter { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Parameter { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Parameter { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Parameter { return mutate(enterkeyhint: value.rawValue) @@ -92,7 +102,7 @@ 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.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Parameter { return mutate(inputmode: value) } @@ -153,9 +163,14 @@ extension Parameter: GlobalAttributes, GlobalEventAttributes, NameAttribute, Val return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Parameter { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Parameter { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Parameter { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -178,10 +193,20 @@ extension Parameter: GlobalAttributes, GlobalEventAttributes, NameAttribute, Val return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Parameter { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Parameter { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Parameter { if condition { diff --git a/Sources/HTMLKit/Abstraction/Elements/RubyElements.swift b/Sources/HTMLKit/Abstraction/Elements/RubyElements.swift index 2e9f73bc..26370d05 100644 --- a/Sources/HTMLKit/Abstraction/Elements/RubyElements.swift +++ b/Sources/HTMLKit/Abstraction/Elements/RubyElements.swift @@ -78,17 +78,27 @@ extension RubyText: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> RubyText { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> RubyText { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> RubyText { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> RubyText { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> RubyText { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> RubyText { return mutate(enterkeyhint: value.rawValue) @@ -103,7 +113,7 @@ extension RubyText: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> RubyText { return mutate(inputmode: value) } @@ -164,9 +174,14 @@ extension RubyText: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> RubyText { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> RubyText { + return mutate(spellcheck: value) + } public func style(_ value: String) -> RubyText { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -189,10 +204,20 @@ extension RubyText: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> RubyText { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> RubyText { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> RubyText { if condition { @@ -382,17 +407,27 @@ extension RubyPronunciation: GlobalAttributes, GlobalEventAttributes, GlobalAria return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> RubyPronunciation { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> RubyPronunciation { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> RubyPronunciation { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> RubyPronunciation { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> RubyPronunciation { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> RubyPronunciation { return mutate(enterkeyhint: value.rawValue) @@ -407,7 +442,7 @@ extension RubyPronunciation: GlobalAttributes, GlobalEventAttributes, GlobalAria return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> RubyPronunciation { return mutate(inputmode: value) } @@ -468,9 +503,15 @@ extension RubyPronunciation: GlobalAttributes, GlobalEventAttributes, GlobalAria return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> RubyPronunciation { return mutate(spellcheck: value) } + + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") + public func spellcheck(_ value: Bool = true) -> RubyPronunciation { + return mutate(spellcheck: value) + } public func style(_ value: String) -> RubyPronunciation { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -493,10 +534,20 @@ extension RubyPronunciation: GlobalAttributes, GlobalEventAttributes, GlobalAria return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> RubyPronunciation { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> RubyPronunciation { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> RubyPronunciation { if condition { diff --git a/Sources/HTMLKit/Abstraction/Elements/TableElements.swift b/Sources/HTMLKit/Abstraction/Elements/TableElements.swift index 3d6dbd38..927ac4ea 100644 --- a/Sources/HTMLKit/Abstraction/Elements/TableElements.swift +++ b/Sources/HTMLKit/Abstraction/Elements/TableElements.swift @@ -101,17 +101,27 @@ extension Caption: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Caption { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Caption { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Caption { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Caption { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Caption { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Caption { return mutate(enterkeyhint: value.rawValue) @@ -126,7 +136,7 @@ extension Caption: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Caption { return mutate(inputmode: value) } @@ -187,9 +197,14 @@ extension Caption: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Caption { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Caption { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Caption { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -212,10 +227,20 @@ extension Caption: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Caption { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Caption { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Caption { if condition { @@ -399,18 +424,28 @@ extension ColumnGroup: GlobalAttributes, GlobalEventAttributes, SpanAttribute { public func `class`(_ value: String) -> ColumnGroup { return mutate(class: value) } - + + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> ColumnGroup { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> ColumnGroup { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> ColumnGroup { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> ColumnGroup { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> ColumnGroup { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> ColumnGroup { return mutate(enterkeyhint: value.rawValue) @@ -425,7 +460,7 @@ extension ColumnGroup: GlobalAttributes, GlobalEventAttributes, SpanAttribute { return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> ColumnGroup { return mutate(inputmode: value) } @@ -486,9 +521,14 @@ extension ColumnGroup: GlobalAttributes, GlobalEventAttributes, SpanAttribute { return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> ColumnGroup { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> ColumnGroup { + return mutate(spellcheck: value) + } public func style(_ value: String) -> ColumnGroup { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -511,10 +551,20 @@ extension ColumnGroup: GlobalAttributes, GlobalEventAttributes, SpanAttribute { return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> ColumnGroup { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> ColumnGroup { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> ColumnGroup { if condition { @@ -624,17 +674,27 @@ extension Column: GlobalAttributes, GlobalEventAttributes, SpanAttribute { return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> Column { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> Column { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> Column { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> Column { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> Column { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> Column { return mutate(enterkeyhint: value.rawValue) @@ -649,7 +709,7 @@ extension Column: GlobalAttributes, GlobalEventAttributes, SpanAttribute { return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> Column { return mutate(inputmode: value) } @@ -710,9 +770,14 @@ extension Column: GlobalAttributes, GlobalEventAttributes, SpanAttribute { return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> Column { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> Column { + return mutate(spellcheck: value) + } public func style(_ value: String) -> Column { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -735,10 +800,20 @@ extension Column: GlobalAttributes, GlobalEventAttributes, SpanAttribute { return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> Column { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> Column { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> Column { if condition { @@ -852,17 +927,27 @@ extension TableBody: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribut return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> TableBody { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> TableBody { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> TableBody { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> TableBody { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> TableBody { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> TableBody { return mutate(enterkeyhint: value.rawValue) @@ -877,7 +962,7 @@ extension TableBody: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribut return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> TableBody { return mutate(inputmode: value) } @@ -938,9 +1023,14 @@ extension TableBody: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribut return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> TableBody { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> TableBody { + return mutate(spellcheck: value) + } public func style(_ value: String) -> TableBody { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -963,10 +1053,20 @@ extension TableBody: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribut return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> TableBody { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> TableBody { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> TableBody { if condition { @@ -1168,17 +1268,27 @@ extension TableHead: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribut return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> TableHead { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> TableHead { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> TableHead { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> TableHead { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> TableHead { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> TableHead { return mutate(enterkeyhint: value.rawValue) @@ -1193,7 +1303,7 @@ extension TableHead: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribut return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> TableHead { return mutate(inputmode: value) } @@ -1254,9 +1364,14 @@ extension TableHead: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribut return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> TableHead { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> TableHead { + return mutate(spellcheck: value) + } public func style(_ value: String) -> TableHead { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -1279,10 +1394,20 @@ extension TableHead: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribut return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> TableHead { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> TableHead { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> TableHead { if condition { @@ -1484,17 +1609,27 @@ extension TableFoot: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribut return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> TableFoot { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> TableFoot { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> TableFoot { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> TableFoot { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> TableFoot { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> TableFoot { return mutate(enterkeyhint: value.rawValue) @@ -1509,7 +1644,7 @@ extension TableFoot: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribut return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> TableFoot { return mutate(inputmode: value) } @@ -1569,10 +1704,15 @@ extension TableFoot: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribut public func role(_ value: Values.Role) -> TableFoot { return mutate(role: value.rawValue) } - + + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> TableFoot { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> TableFoot { + return mutate(spellcheck: value) + } public func style(_ value: String) -> TableFoot { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -1595,10 +1735,20 @@ extension TableFoot: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribut return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> TableFoot { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> TableFoot { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> TableFoot { if condition { @@ -1786,17 +1936,27 @@ extension TableRow: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> TableRow { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> TableRow { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> TableRow { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> TableRow { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> TableRow { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> TableRow { return mutate(enterkeyhint: value.rawValue) @@ -1811,7 +1971,7 @@ extension TableRow: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> TableRow { return mutate(inputmode: value) } @@ -1872,9 +2032,14 @@ extension TableRow: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> TableRow { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> TableRow { + return mutate(spellcheck: value) + } public func style(_ value: String) -> TableRow { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -1897,10 +2062,20 @@ extension TableRow: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> TableRow { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> TableRow { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> TableRow { if condition { @@ -2093,17 +2268,27 @@ extension DataCell: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> DataCell { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> DataCell { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> DataCell { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> DataCell { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> DataCell { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> DataCell { return mutate(enterkeyhint: value.rawValue) @@ -2118,7 +2303,7 @@ extension DataCell: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> DataCell { return mutate(inputmode: value) } @@ -2179,9 +2364,14 @@ extension DataCell: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> DataCell { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> DataCell { + return mutate(spellcheck: value) + } public func style(_ value: String) -> DataCell { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -2204,10 +2394,20 @@ extension DataCell: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> DataCell { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> DataCell { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> DataCell { if condition { @@ -2404,17 +2604,27 @@ extension HeaderCell: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribu return mutate(class: value) } + @available(*, deprecated, message: "Use the editable(_:) modifier instead.") public func isEditable(_ value: Bool) -> HeaderCell { return mutate(contenteditable: value) } + + public func editable(_ value: Bool = true) -> HeaderCell { + return mutate(contenteditable: value) + } public func direction(_ value: Values.Direction) -> HeaderCell { return mutate(dir: value.rawValue) } + @available(*, deprecated, message: "Use the draggable(_:) modifier instead.") public func isDraggable(_ value: Bool) -> HeaderCell { return mutate(draggable: value) } + + public func draggable(_ value: Bool = true) -> HeaderCell { + return mutate(draggable: value) + } public func enterKeyHint(_ value: Values.Hint) -> HeaderCell { return mutate(enterkeyhint: value.rawValue) @@ -2429,7 +2639,7 @@ extension HeaderCell: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribu return self } - @available(*, deprecated, message: "The inputmode attribute is actually an enumerated attribute. Use the inputMode(_: Mode) modifier instead.") + @available(*, unavailable, message: "Use the inputMode(_:) modifier instead.") public func inputMode(_ value: String) -> HeaderCell { return mutate(inputmode: value) } @@ -2490,9 +2700,14 @@ extension HeaderCell: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribu return mutate(role: value.rawValue) } + @available(*, deprecated, message: "Use the spellcheck(_:) modifier instead.") public func hasSpellCheck(_ value: Bool) -> HeaderCell { return mutate(spellcheck: value) } + + public func spellcheck(_ value: Bool = true) -> HeaderCell { + return mutate(spellcheck: value) + } public func style(_ value: String) -> HeaderCell { return mutate(style: TaintedString(value, as: .css(.attribute))) @@ -2515,10 +2730,20 @@ extension HeaderCell: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribu return mutate(title: value) } + @available(*, deprecated, message: "Use the translate(_:) modifier instead.") public func translate(_ value: Values.Decision) -> HeaderCell { return mutate(translate: value.rawValue) } + public func translate(_ value: Bool = true) -> HeaderCell { + + if value { + return mutate(translate: "yes") + } + + return mutate(translate: "no") + } + public func inert(_ condition: Bool = true) -> HeaderCell { if condition { @@ -2540,7 +2765,7 @@ extension HeaderCell: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribu return mutate(headers: value) } - @available(*, deprecated, message: "The scope attribute is actually an enumerated attribute. Use the scope(_: Scope) modifier instead.") + @available(*, unavailable, message: "Use the scope(_:) modifier instead.") public func scope(_ value: String) -> HeaderCell { return mutate(scope: value) } diff --git a/Tests/HTMLKitTests/AttributesTests.swift b/Tests/HTMLKitTests/AttributesTests.swift index 2036c5a5..19814d4e 100644 --- a/Tests/HTMLKitTests/AttributesTests.swift +++ b/Tests/HTMLKitTests/AttributesTests.swift @@ -57,12 +57,12 @@ final class AttributesTests: XCTestCase { func direction(_ value: Values.Direction) -> Tag { return self.mutate(dir: value.rawValue) } - - func isDraggable(_ value: Bool) -> Tag { + + func draggable(_ value: Bool = true) -> Tag { return self.mutate(draggable: value) } - func isEditable(_ value: Bool) -> Tag { + func editable(_ value: Bool = true) -> Tag { return self.mutate(contenteditable: value) } @@ -131,7 +131,7 @@ final class AttributesTests: XCTestCase { return self.mutate(role: value.rawValue) } - func hasSpellCheck(_ value: Bool) -> Tag { + func spellcheck(_ value: Bool = true) -> Tag { return self.mutate(spellcheck: value) } @@ -156,8 +156,13 @@ final class AttributesTests: XCTestCase { return self.mutate(title: value) } - func translate(_ value: Values.Decision) -> Tag { - return self.mutate(translate: value.rawValue) + func translate(_ value: Bool = true) -> Tag { + + if value { + return self.mutate(translate: "yes") + } + + return self.mutate(translate: "no") } func accept(_ specifiers: [String]) -> Tag { @@ -971,11 +976,15 @@ final class AttributesTests: XCTestCase { func testDraggableAttribute() throws { let view = TestView { - Tag {}.isDraggable(true) + Tag {}.draggable() + Tag {}.draggable(false) + Tag {}.draggable(true) } XCTAssertEqual(try renderer.render(view: view), """ + \ + \ """ ) @@ -984,11 +993,15 @@ final class AttributesTests: XCTestCase { func testEditableAttribute() throws { let view = TestView { - Tag {}.isEditable(true) + Tag {}.editable() + Tag {}.editable(false) + Tag {}.editable(true) } XCTAssertEqual(try renderer.render(view: view), """ + \ + \ """ ) @@ -1082,11 +1095,15 @@ final class AttributesTests: XCTestCase { func testHasSpellCheckAttribute() throws { let view = TestView { - Tag {}.hasSpellCheck(true) + Tag {}.spellcheck() + Tag {}.spellcheck(false) + Tag {}.spellcheck(true) } XCTAssertEqual(try renderer.render(view: view), """ + \ + \ """ ) @@ -1134,11 +1151,15 @@ final class AttributesTests: XCTestCase { func testTranslateAttribute() throws { let view = TestView { - Tag {}.translate(.yes) + Tag {}.translate() + Tag {}.translate(false) + Tag {}.translate(true) } XCTAssertEqual(try renderer.render(view: view), """ + \ + \ """ )