diff --git a/Sources/HTMLKit/Abstraction/Attributes/BasicAttributes.swift b/Sources/HTMLKit/Abstraction/Attributes/BasicAttributes.swift index 8a7b2c83..d9928a91 100644 --- a/Sources/HTMLKit/Abstraction/Attributes/BasicAttributes.swift +++ b/Sources/HTMLKit/Abstraction/Attributes/BasicAttributes.swift @@ -3,7 +3,7 @@ import OrderedCollections /// The alias combines the global attributes of the basic attributes. @_documentation(visibility: internal) -public typealias GlobalAttributes = AccessKeyAttribute & AutocapitalizeAttribute & AutofocusAttribute & ClassAttribute & EditAttribute & DirectionAttribute & DragAttribute & EnterKeyHintAttribute & HiddenAttribute & InputModeAttribute & IsAttribute & ItemAttribute & ItemIdAttribute & ItemPropertyAttribute & ItemReferenceAttribute & ItemScopeAttribute & ItemTypeAttribute & IdentifierAttribute & LanguageAttribute & NonceAttribute & RoleAttribute & SpellCheckAttribute & StyleAttribute & TabulatorAttribute & TitleAttribute & TranslateAttribute & InertAttribute & PopoverAttribute +public typealias GlobalAttributes = AccessKeyAttribute & AutocapitalizeAttribute & AutofocusAttribute & ClassAttribute & EditAttribute & DirectionAttribute & DragAttribute & EnterKeyAttribute & HiddenAttribute & InputModeAttribute & IsAttribute & ItemAttribute & ItemIdAttribute & ItemPropertyAttribute & ItemReferenceAttribute & ItemScopeAttribute & ItemTypeAttribute & IdentifierAttribute & LanguageAttribute & NonceAttribute & RoleAttribute & SpellCheckAttribute & StyleAttribute & TabulatorAttribute & TitleAttribute & TranslateAttribute & InertAttribute & PopoverAttribute /// A type that provides the `accessKey` modifier. @_documentation(visibility: internal) @@ -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 { @@ -1093,32 +1093,32 @@ extension EncodingAttribute where Self: EmptyNode { } } -/// A type that provides the `enterKeyHint` modifier. +/// A type that provides the `enterKey` modifier. @_documentation(visibility: internal) -public protocol EnterKeyHintAttribute: Attribute { +public protocol EnterKeyAttribute: Attribute { /// Change the enter key for the virtual keyboards. /// /// ```swift /// Input() /// .type(.text) - /// .enterKeyHint(.search) + /// .enterKey(.search) /// ``` /// /// - Parameter value: The enter key to apply. /// /// - Returns: The element - func enterKeyHint(_ value: Values.Hint) -> Self + func enterKey(_ value: Values.Hint) -> Self } -extension EnterKeyHintAttribute where Self: ContentNode { +extension EnterKeyAttribute where Self: ContentNode { internal func mutate(enterkeyhint value: String) -> Self { return self.mutate(key: "enterkeyhint", value: value) } } -extension EnterKeyHintAttribute where Self: EmptyNode { +extension EnterKeyAttribute where Self: EmptyNode { internal func mutate(enterkeyhint value: String) -> Self { return self.mutate(key: "enterkeyhint", value: value) @@ -1245,7 +1245,7 @@ public protocol EquivalentAttribute: Attribute { func equivalent(_ value: Values.Equivalent) -> Self } -extension HeaderAttribute where Self: ContentNode { +extension EquivalentAttribute where Self: ContentNode { internal func mutate(httpequiv value: String) -> Self { return self.mutate(key: "http-equiv", value: value) @@ -1261,7 +1261,7 @@ extension EquivalentAttribute where Self: EmptyNode { /// A type that provides the `headers` modifier. @_documentation(visibility: internal) -public protocol HeaderAttribute: Attribute { +public protocol HeadersAttribute: Attribute { /// Specify the header cells for an element. /// @@ -1269,23 +1269,37 @@ public protocol HeaderAttribute: Attribute { /// DataCell { /// "Lorem ipsum..." /// } - /// .headers("ids") + /// .headers(["id", "id"]) /// ``` /// /// - Parameter ids: The identifiers of the cells to associate with. /// /// - Returns: The element - func headers(_ ids: String) -> Self + func headers(_ ids: [String]) -> Self + + /// Specify the header cells for an element. + /// + /// ```swift + /// DataCell { + /// "Lorem ipsum..." + /// } + /// .headers("id", "id") + /// ``` + /// + /// - Parameter ids: The identifiers of the cells to associate with. + /// + /// - Returns: The element + func headers(_ ids: String...) -> Self } -extension HeaderAttribute where Self: ContentNode { +extension HeadersAttribute where Self: ContentNode { internal func mutate(headers value: String) -> Self { return self.mutate(key: "headers", value: value) } } -extension HeaderAttribute where Self: EmptyNode { +extension HeadersAttribute where Self: EmptyNode { internal func mutate(headers value: String) -> Self { return self.mutate(key: "headers", value: value) @@ -1933,6 +1947,35 @@ public protocol LabelAttribute: Attribute { /// /// - Returns: The element func label(_ value: String) -> Self + + /// Specify a label for the element. + /// + /// ```swift + /// Track() + /// .source("...vtt") + /// .kind(.chapters) + /// .label("lorem") + /// ``` + /// + /// - Parameter localizedKey: The string key to be translated. + /// - Parameter tableName: The translation table to look in. + /// + /// - Returns: The element + func label(_ localizedKey: LocalizedStringKey, tableName: String?) -> Self + + /// Specify a label for the element without localization. + /// + /// ```swift + /// Track() + /// .source("...vtt") + /// .kind(.chapters) + /// .label(verbatim: "lorem") + /// ``` + /// + /// - Parameter value: The text to use as a label. + /// + /// - Returns: The element + func label(verbatim value: String) -> Self } extension LabelAttribute where Self: ContentNode { @@ -1940,6 +1983,10 @@ extension LabelAttribute where Self: ContentNode { internal func mutate(label value: String) -> Self { return self.mutate(key: "label", value: value) } + + internal func mutate(label value: LocalizedString) -> Self { + return self.mutate(key: "label", value: value) + } } extension LabelAttribute where Self: EmptyNode { @@ -1947,6 +1994,10 @@ extension LabelAttribute where Self: EmptyNode { internal func mutate(label value: String) -> Self { return self.mutate(key: "label", value: value) } + + internal func mutate(label value: LocalizedString) -> Self { + return self.mutate(key: "label", value: value) + } } /// A type that provides the `language` modifier. @@ -2452,7 +2503,7 @@ extension NoValidateAttribute where Self: EmptyNode { } } -/// A type that provides the `isOpen` modifier. +/// A type that provides the `open` modifier. @_documentation(visibility: internal) public protocol OpenAttribute: Attribute { @@ -2467,25 +2518,25 @@ public protocol OpenAttribute: Attribute { /// "Lorem ipsum..." /// } /// } - /// .isOpen(true) + /// .open(true) /// ``` /// /// - Parameter condition: Whether the details should be open. /// /// - Returns: The element - func isOpen(_ condition: Bool) -> Self + func open(_ condition: Bool) -> Self } extension OpenAttribute where Self: ContentNode { - internal func mutate(open value: Bool) -> Self { + internal func mutate(open value: String) -> Self { return self.mutate(key: "open", value: value) } } extension OpenAttribute where Self: EmptyNode { - internal func mutate(open value: Bool) -> Self { + internal func mutate(open value: String) -> Self { return self.mutate(key: "open", value: value) } } @@ -3136,17 +3187,28 @@ extension ScopeAttribute where Self: EmptyNode { @_documentation(visibility: internal) public protocol ShapeAttribute: Attribute { + /// Define the entire area as shape. + /// + /// ```swift + /// Area() + /// .shape() + /// ``` + /// + /// - Returns: The element + func shape() -> Self + /// Define the shape for an area. /// /// ```swift /// Area() - /// .shape(.circle) + /// .shape(.rect, coordinates: "0, 0, 200, 100") /// ``` /// /// - Parameter value: The shape used to interpret the coordinates. + /// - Parameter coordinates: The coordinates on which to base the shape. /// /// - Returns: The element - func shape(_ value: Values.Shape) -> Self + func shape(_ value: Values.Shape, coordinates: String) -> Self } extension ShapeAttribute where Self: ContentNode { @@ -3298,7 +3360,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 +3368,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 +3770,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 { @@ -3776,8 +3838,7 @@ public protocol UseMapAttribute: Attribute { /// .useMap("...") /// Map { /// Area() - /// .shape(.circle) - /// .coordinates(...) + /// .shape(.circle, coordinates: "...") /// } /// .name("...") /// ``` @@ -4278,13 +4339,14 @@ public protocol PopoverTargetAttribute: Attribute { /// Button { /// "Lorem ipsum" /// } - /// .popoverTarget("id") + /// .popoverTarget("id", action: .hide) /// ``` /// /// - Parameter id: The identifier of the target to bind the popover to. + /// - Parameter action: The action to perform when triggered. /// /// - Returns: The element - func popoverTarget(_ id: String) -> Self + func popoverTarget(_ id: String, action: Values.Popover.Action?) -> Self } extension PopoverTargetAttribute where Self: ContentNode { @@ -4292,6 +4354,15 @@ extension PopoverTargetAttribute where Self: ContentNode { internal func mutate(popovertarget value: String) -> Self { return self.mutate(key: "popovertarget", value: value) } + + internal func mutate(popovertargetaction value: String?) -> Self { + + if let value = value { + return self.mutate(key: "popovertargetaction", value: value) + } + + return self + } } extension PopoverTargetAttribute where Self: EmptyNode { @@ -4299,6 +4370,15 @@ extension PopoverTargetAttribute where Self: EmptyNode { internal func mutate(popovertarget value: String) -> Self { return self.mutate(key: "popovertarget", value: value) } + + internal func mutate(popovertargetaction value: String?) -> Self { + + if let value = value { + return self.mutate(key: "popovertargetaction", value: value) + } + + return self + } } /// A type that provides the `popoverAction` modifier diff --git a/Sources/HTMLKit/Abstraction/Attributes/VectorAttributes.swift b/Sources/HTMLKit/Abstraction/Attributes/VectorAttributes.swift index 68661a90..902ed1d5 100644 --- a/Sources/HTMLKit/Abstraction/Attributes/VectorAttributes.swift +++ b/Sources/HTMLKit/Abstraction/Attributes/VectorAttributes.swift @@ -40,14 +40,15 @@ public protocol FillAttribute: Attribute { /// Vector { /// Circle { /// } - /// .fill("black") + /// .fill("black", opacity: 0.5) /// } /// ``` /// /// - Parameter color: The color to fill shape with. + /// - Parameter opacity: The opacity to apply. /// /// - Returns: The element - func fill(_ color: String) -> Self + func fill(_ color: String, opacity: Double?) -> Self } extension FillAttribute where Self: ContentNode { @@ -55,6 +56,15 @@ extension FillAttribute where Self: ContentNode { internal func mutate(fill value: String) -> Self { return self.mutate(key: "fill", value: value) } + + internal func mutate(fillopacity value: Double?) -> Self { + + if let value = value { + return self.mutate(key: "fill-opacity", value: value) + } + + return self + } } /// A type that provides the `fillOpacity` modifier. @@ -94,14 +104,18 @@ public protocol StrokeAttribute: Attribute { /// Vector { /// Circle { /// } - /// .stroke("#000000") + /// .stroke("#000000", width: 1, opacity: 0.5, cap: .square, join: .bevel) /// } /// ``` /// /// - Parameter color: The color to fill the stroke with. + /// - Parameter width: The thickness to apply to the stroke. + /// - Parameter opacity: The level to apply to the stroke. + /// - Parameter cap: The shape to end the stroke. + /// - Parameter join: The shape when two lines meet. /// - /// - Returns: The element - func stroke(_ color: String) -> Self + /// - Returns: The element + func stroke(_ color: String, width: Int?, opacity: Double?, cap: Values.Linecap?, join: Values.Linejoin?) -> Self } extension StrokeAttribute where Self: ContentNode { @@ -109,6 +123,42 @@ extension StrokeAttribute where Self: ContentNode { internal func mutate(stroke value: String) -> Self { return self.mutate(key: "stroke", value: value) } + + internal func mutate(strokewidth value: Int?) -> Self { + + if let value = value { + return self.mutate(key: "stroke-width", value: value) + } + + return self + } + + internal func mutate(strokeopacity value: Double?) -> Self { + + if let value = value { + return self.mutate(key: "stroke-opacity", value: value) + } + + return self + } + + internal func mutate(strokelinecap value: String?) -> Self { + + if let value = value { + return self.mutate(key: "stroke-linecap", value: value) + } + + return self + } + + internal func mutate(strokelinejoin value: String?) -> Self { + + if let value = value { + return self.mutate(key: "stroke-linejoin", value: value) + } + + return self + } } /// A type that provides the `strokeWidth` modifier. diff --git a/Sources/HTMLKit/Abstraction/Elements/BasicElements.swift b/Sources/HTMLKit/Abstraction/Elements/BasicElements.swift index b0835389..c2dcdb12 100644 --- a/Sources/HTMLKit/Abstraction/Elements/BasicElements.swift +++ b/Sources/HTMLKit/Abstraction/Elements/BasicElements.swift @@ -124,22 +124,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Html { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Html { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Html { if condition { @@ -149,7 +164,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 +225,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 +255,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..08d38cdb 100644 --- a/Sources/HTMLKit/Abstraction/Elements/BodyElements.swift +++ b/Sources/HTMLKit/Abstraction/Elements/BodyElements.swift @@ -216,22 +216,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Article { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Article { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Article { if condition { @@ -241,7 +256,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 +317,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 +347,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,22 +546,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Section { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Section { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Section { if condition { @@ -541,7 +586,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 +647,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 +677,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,22 +878,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Navigation { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Navigation { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Navigation { if condition { @@ -843,7 +918,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 +979,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 +1009,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,22 +1206,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Aside { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Aside { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Aside { if condition { @@ -1141,7 +1246,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 +1307,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 +1337,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,22 +1531,37 @@ 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) + } + + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Heading1 { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Heading1 { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Heading1 { if condition { @@ -1436,7 +1571,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 +1632,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 +1662,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,22 +1863,37 @@ 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) + } + + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Heading2 { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Heading2 { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Heading2 { if condition { @@ -1738,7 +1903,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 +1964,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 +1994,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,22 +2195,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Heading3 { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Heading3 { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Heading3 { if condition { @@ -2040,7 +2235,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 +2296,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 +2326,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,22 +2527,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Heading4 { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Heading4 { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Heading4 { if condition { @@ -2342,7 +2567,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 +2628,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 +2658,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,22 +2859,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Heading5 { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Heading5 { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Heading5 { if condition { @@ -2644,7 +2899,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 +2960,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 +2990,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,22 +3191,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Heading6 { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Heading6 { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Heading6 { if condition { @@ -2946,7 +3231,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 +3292,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 +3322,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,22 +3528,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> HeadingGroup { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> HeadingGroup { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> HeadingGroup { if condition { @@ -3253,7 +3568,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 +3629,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 +3659,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,21 +3854,36 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Header { return mutate(enterkeyhint: value.rawValue) } + + public func enterKey(_ value: Values.Hint) -> Header { + return mutate(enterkeyhint: value.rawValue) + } public func hidden(_ condition: Bool = true) -> Header { @@ -3549,7 +3894,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 +3955,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 +3985,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,22 +4178,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Footer { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Footer { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Footer { if condition { @@ -3843,7 +4218,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 +4279,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 +4309,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,22 +4509,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Address { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Address { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Address { if condition { @@ -4144,7 +4549,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 +4610,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 +4640,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,22 +4834,37 @@ 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 direction(_ value: Values.Direction) -> Paragraph { + + 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Paragraph { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Paragraph { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Paragraph { if condition { @@ -4439,7 +4874,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 +4934,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 +4965,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,22 +5163,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> HorizontalRule { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> HorizontalRule { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> HorizontalRule { if condition { @@ -4738,7 +5203,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 +5264,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 +5294,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,22 +5494,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> PreformattedText { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> PreformattedText { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> PreformattedText { if condition { @@ -5039,7 +5534,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 +5595,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 +5625,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,22 +5819,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Blockquote { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Blockquote { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Blockquote { if condition { @@ -5334,7 +5859,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 +5920,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 +5950,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,22 +6160,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> OrderedList { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> OrderedList { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> OrderedList { if condition { @@ -5645,7 +6200,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 +6261,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 +6291,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,22 +6502,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> UnorderedList { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> UnorderedList { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> UnorderedList { if condition { @@ -5957,7 +6542,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 +6603,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 +6633,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,22 +6838,37 @@ 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) + } + + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Menu { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Menu { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Menu { if condition { @@ -6263,7 +6878,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 +6939,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 +6969,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,23 +7073,38 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> DescriptionList { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> DescriptionList { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> DescriptionList { if condition { @@ -6469,7 +7114,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 +7175,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 +7205,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,22 +7404,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Figure { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Figure { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Figure { if condition { @@ -6769,7 +7444,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 +7505,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 +7535,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,22 +7731,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Anchor { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Anchor { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Anchor { if condition { @@ -7066,7 +7771,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 +7832,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 +7862,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,22 +8111,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Emphasize { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Emphasize { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Emphasize { if condition { @@ -7416,7 +8151,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 +8212,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 +8242,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,22 +8438,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Strong { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Strong { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Strong { if condition { @@ -7713,7 +8478,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 +8539,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 +8569,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,22 +8765,37 @@ 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) } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Small { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Small { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Small { if condition { @@ -8010,7 +8805,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 +8866,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 +8896,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,22 +9099,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> StrikeThrough { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> StrikeThrough { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> StrikeThrough { if condition { @@ -8314,7 +9139,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 +9200,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,14 +9230,24 @@ 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 inert(_ condition: Bool = true) -> StrikeThrough { - - if condition { - return mutate(inert: "inert") + 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 { + return mutate(inert: "inert") } return self @@ -8525,22 +9365,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Main { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Main { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Main { if condition { @@ -8550,7 +9405,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 +9466,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 +9496,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,22 +9697,37 @@ 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) + } + + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Search { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Search { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Search { if condition { @@ -8852,7 +9737,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 +9798,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 +9828,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,22 +9926,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Division { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Division { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Division { if condition { @@ -9051,7 +9966,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 +10027,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 +10057,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,22 +10256,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Definition { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Definition { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Definition { if condition { @@ -9351,7 +10296,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 +10357,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 +10387,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,22 +10584,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Cite { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Cite { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Cite { if condition { @@ -9649,7 +10624,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 +10685,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 +10715,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,22 +10911,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> ShortQuote { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> ShortQuote { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> ShortQuote { if condition { @@ -9946,7 +10951,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 +11012,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 +11042,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,22 +11243,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Abbreviation { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Abbreviation { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Abbreviation { if condition { @@ -10248,7 +11283,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 +11344,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 +11374,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,22 +11571,37 @@ 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) + } + + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Ruby { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Ruby { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Ruby { if condition { @@ -10546,7 +11611,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 +11672,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 +11702,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,22 +11901,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Data { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Data { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Data { if condition { @@ -10846,7 +11941,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 +12002,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 +12032,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,22 +12243,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Time { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Time { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Time { if condition { @@ -11158,7 +12283,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 +12343,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 +12374,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,22 +12576,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Code { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Code { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Code { if condition { @@ -11461,7 +12616,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 +12677,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 +12707,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,22 +12905,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Variable { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Variable { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Variable { if condition { @@ -11760,7 +12945,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 +13006,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 +13036,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,22 +13230,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> SampleOutput { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> SampleOutput { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> SampleOutput { if condition { @@ -12055,7 +13270,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 +13331,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 +13361,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,24 +13559,39 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> KeyboardInput { return mutate(enterkeyhint: value.rawValue) } - public func hidden(_ condition: Bool = true) -> KeyboardInput { - + public func enterKey(_ value: Values.Hint) -> KeyboardInput { + return mutate(enterkeyhint: value.rawValue) + } + + public func hidden(_ condition: Bool = true) -> KeyboardInput { + if condition { return mutate(hidden: "hidden") } @@ -12354,7 +13599,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 +13660,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 +13690,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,22 +13888,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Subscript { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Subscript { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Subscript { if condition { @@ -12653,7 +13928,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 +13988,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 +14018,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,22 +14216,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Superscript { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Superscript { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Superscript { if condition { @@ -12951,7 +14256,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 +14317,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 +14347,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,22 +14545,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Italic { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Italic { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Italic { if condition { @@ -13250,7 +14585,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 +14646,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 +14676,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,22 +14881,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Bold { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Bold { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Bold { if condition { @@ -13556,7 +14921,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 +14982,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 +15012,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,22 +15217,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Underline { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Underline { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Underline { if condition { @@ -13862,7 +15257,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 +15318,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 +15348,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,22 +15553,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Mark { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Mark { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Mark { if condition { @@ -14168,7 +15593,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 +15654,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 +15684,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,22 +15882,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Bdi { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Bdi { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Bdi { if condition { @@ -14467,7 +15922,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 +15983,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 +16013,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,22 +16205,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Bdo { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Bdo { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Bdo { if condition { @@ -14760,7 +16245,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 +16306,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 +16336,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,22 +16530,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Span { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Span { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Span { if condition { @@ -15055,7 +16570,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 +16631,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 +16661,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,22 +16846,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> LineBreak { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> LineBreak { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> LineBreak { if condition { @@ -15341,7 +16886,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 +16947,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 +16977,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,22 +17166,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> WordBreak { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> WordBreak { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> WordBreak { if condition { @@ -15631,7 +17206,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 +17267,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 +17297,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,22 +17491,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> InsertedText { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> InsertedText { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> InsertedText { if condition { @@ -15926,7 +17531,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 +17592,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 +17622,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,22 +17824,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> DeletedText { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> DeletedText { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> DeletedText { if condition { @@ -16229,7 +17864,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 +17925,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 +17955,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,22 +18162,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Picture { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Picture { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Picture { if condition { @@ -16537,7 +18202,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 +18263,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 +18293,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,22 +18409,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Image { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Image { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Image { if condition { @@ -16754,7 +18449,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 +18514,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 +18544,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,22 +18809,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> InlineFrame { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> InlineFrame { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> InlineFrame { if condition { @@ -17124,7 +18849,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 +18910,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 +18940,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,22 +19171,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Embed { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Embed { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Embed { if condition { @@ -17456,7 +19211,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 +19272,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 +19302,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,22 +19517,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Object { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Object { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Object { if condition { @@ -17772,7 +19557,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 +19618,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 +19648,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,22 +19868,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Video { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Video { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Video { if condition { @@ -18093,7 +19908,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 +19969,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 +19999,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,22 +20258,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Audio { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Audio { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Audio { if condition { @@ -18453,7 +20298,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 +20359,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 +20389,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 { @@ -18705,8 +20565,7 @@ extension Audio: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, /// .useMap("lorem") /// Map { /// Area() -/// .shape(.circle) -/// .coordinates("10, 10, 10 ,10") +/// .shape(.circle, coordinates: "10, 10, 10, 10") /// .alternate("Lorem ipsum...") /// .reference("https://...") /// } @@ -18769,22 +20628,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Map { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Map { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Map { if condition { @@ -18794,7 +20668,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 +20729,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 +20759,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,22 +20887,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Form { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Form { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Form { if condition { @@ -19023,7 +20927,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 +20988,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 +21018,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 +21045,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,22 +21261,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> DataList { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> DataList { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> DataList { if condition { @@ -19367,7 +21301,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 +21362,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 +21392,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,22 +21588,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Output { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Output { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Output { if condition { @@ -19664,7 +21628,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 +21689,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 +21719,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,22 +21927,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Progress { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Progress { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Progress { if condition { @@ -19973,7 +21967,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 +22028,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 +22058,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,22 +22273,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Meter { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Meter { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Meter { if condition { @@ -20289,7 +22313,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 +22373,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 +22404,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,22 +22636,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Details { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Details { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Details { if condition { @@ -20622,7 +22676,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 +22737,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 +22767,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 { @@ -20721,8 +22790,23 @@ extension Details: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes return self } - public func isOpen(_ value: Bool) -> Details { - return mutate(open: value) + @available(*, deprecated, message: "Use the open(_:) modifier instead.") + public func isOpen(_ condition: Bool = true) -> Details { + + if condition { + return mutate(open: "open") + } + + return self + } + + public func open(_ condition: Bool = true) -> Details { + + if condition { + return mutate(open: "open") + } + + return self } public func popover(_ value: Values.Popover.State) -> Details { @@ -20905,22 +22989,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Dialog { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Dialog { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Dialog { if condition { @@ -20930,7 +23029,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 +23090,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 +23120,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 { @@ -21029,8 +23143,23 @@ extension Dialog: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return self } - public func isOpen(_ value: Bool) -> Dialog { - return mutate(open: value) + @available(*, deprecated, message: "Use the open(_:) modifier instead.") + public func isOpen(_ condition: Bool) -> Dialog { + + if condition { + return mutate(open: "open") + } + + return self + } + + public func open(_ condition: Bool = true) -> Dialog { + + if condition { + return mutate(open: "open") + } + + return self } public func popover(_ value: Values.Popover.State) -> Dialog { @@ -21208,10 +23337,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,14 +23354,24 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Script { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Script { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Script { if condition { @@ -21237,7 +23381,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 +23450,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 +23480,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,22 +23628,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> NoScript { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> NoScript { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> NoScript { if condition { @@ -21494,7 +23668,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 +23729,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 +23759,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,22 +23884,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Template { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Template { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Template { if condition { @@ -21720,7 +23924,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 +23985,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 +24015,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,22 +24133,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Canvas { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Canvas { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Canvas { if condition { @@ -21939,7 +24173,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 +24234,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 +24264,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,22 +24473,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Table { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Table { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Table { if condition { @@ -22249,7 +24513,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 +24574,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 +24604,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 { @@ -22554,30 +24833,40 @@ extension Vector: GlobalVectorAttributes, WidthAttribute, HeightAttribute, ViewB return self.mutate(viewbox: "\(x) \(y) \(width) \(height)") } - public func fill(_ value: String) -> Vector { - return self.mutate(fill: value) + public func fill(_ color: String, opacity: Double? = nil) -> Vector { + return self.mutate(fill: color).mutate(fillopacity: opacity) } + @available(*, deprecated, message: "Use the stroke(_:width:opacity:cap:join:) modifier instead.") public func stroke(_ value: String) -> Vector { return self.mutate(stroke: value) } + public func stroke(_ color: String, width: Int? = nil, opacity: Double? = nil, cap: Values.Linecap? = nil, join: Values.Linejoin? = nil) -> Vector { + return self.mutate(stroke: color).mutate(strokewidth: width).mutate(strokeopacity: opacity).mutate(strokelinecap: cap?.rawValue).mutate(strokelinejoin: join?.rawValue) + } + + @available(*, deprecated, message: "Use the stroke(_:width:opacity:cap:join:) modifier instead.") public func strokeWidth(_ size: Int) -> Vector { return self.mutate(strokewidth: size) } + @available(*, deprecated, message: "Use the fill(_:opacity:) modifier instead.") public func fillOpacity(_ value: Double) -> Vector { return self.mutate(fillopacity: value) } + @available(*, deprecated, message: "Use the stroke(_:width:opacity:cap:join:) modifier instead.") public func strokeOpacity(_ value: Double) -> Vector { return self.mutate(strokeopacity: value) } + @available(*, deprecated, message: "Use the stroke(_:width:opacity:cap:join:) modifier instead.") public func strokeLineCap(_ value: Values.Linecap) -> Vector { return self.mutate(strokelinecap: value.rawValue) } + @available(*, deprecated, message: "Use the stroke(_:width:opacity:cap:join:) modifier instead.") public func strokeLineJoin(_ value: Values.Linejoin) -> Vector { return self.mutate(strokelinejoin: value.rawValue) } @@ -22667,22 +24956,37 @@ 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) + } + + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Slot { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Slot { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Slot { if condition { @@ -22692,7 +24996,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 +25057,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 +25087,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..f112286f 100644 --- a/Sources/HTMLKit/Abstraction/Elements/DefinitionElements.swift +++ b/Sources/HTMLKit/Abstraction/Elements/DefinitionElements.swift @@ -80,22 +80,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> TermName { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> TermName { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> TermName{ if condition { @@ -105,7 +120,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 +181,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 +211,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,22 +410,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> TermDefinition { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> TermDefinition { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> TermDefinition { if condition { @@ -405,7 +450,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 +511,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 +541,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..85ef90db 100644 --- a/Sources/HTMLKit/Abstraction/Elements/FigureElements.swift +++ b/Sources/HTMLKit/Abstraction/Elements/FigureElements.swift @@ -76,22 +76,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> FigureCaption { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> FigureCaption { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> FigureCaption { if condition { @@ -101,7 +116,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 +177,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 +207,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..832bc562 100644 --- a/Sources/HTMLKit/Abstraction/Elements/FormElements.swift +++ b/Sources/HTMLKit/Abstraction/Elements/FormElements.swift @@ -64,22 +64,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Input { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Input { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Input { if condition { @@ -89,7 +104,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 +165,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 +195,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 +247,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 { @@ -373,10 +403,11 @@ extension Input: GlobalAttributes, GlobalEventAttributes, AcceptAttribute, Alter return mutate(popover: value.rawValue) } - public func popoverTarget(_ value: String) -> Input { - return mutate(popovertarget: value) + public func popoverTarget(_ value: String, action: Values.Popover.Action? = nil) -> Input { + return mutate(popovertarget: value).mutate(popovertargetaction: action?.rawValue) } + @available(*, deprecated, message: "Use the popoverTarget(_:action:) modifier instead.") public func popoverAction(_ value: Values.Popover.Action) -> Input { return mutate(popoveraction: value.rawValue) } @@ -476,22 +507,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Label { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Label { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Label { if condition { @@ -501,7 +547,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 +608,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 +638,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,22 +852,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Select { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Select { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Select { if condition { @@ -816,7 +892,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 +953,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 +983,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 +1006,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,22 +1155,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> TextArea { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> TextArea { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> TextArea { if condition { @@ -1089,7 +1195,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 +1256,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 +1286,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 +1309,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,22 +1571,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Button { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Button { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Button { if condition { @@ -1475,7 +1611,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 +1672,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 +1702,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 { @@ -1616,10 +1767,11 @@ extension Button: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return mutate(popover: value.rawValue) } - public func popoverTarget(_ value: String) -> Button { - return mutate(popovertarget: value) + public func popoverTarget(_ value: String, action: Values.Popover.Action? = nil) -> Button { + return mutate(popovertarget: value).mutate(popovertargetaction: action?.rawValue) } + @available(*, deprecated, message: "Use the popoverTarget(_:action:) modifier instead.") public func popoverAction(_ value: Values.Popover.Action) -> Button { return mutate(popoveraction: value.rawValue) } @@ -1808,22 +1960,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Fieldset { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Fieldset { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Fieldset { if condition { @@ -1833,7 +2000,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 +2061,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 +2091,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..12815711 100644 --- a/Sources/HTMLKit/Abstraction/Elements/HeadElements.swift +++ b/Sources/HTMLKit/Abstraction/Elements/HeadElements.swift @@ -69,22 +69,37 @@ 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) + } + + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Title { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Title { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Title { if condition { @@ -94,7 +109,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 +170,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 +200,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,22 +320,37 @@ 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) + } + + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Base { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Base { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Base { if condition { @@ -315,7 +360,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 +421,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 +451,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,22 +571,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Meta { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Meta { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Meta { if condition { @@ -536,7 +611,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 +672,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 +702,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,22 +857,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Style { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Style { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Style { if condition { @@ -792,7 +897,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 +958,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 +988,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,22 +1127,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Link { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Link { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Link { if condition { @@ -1032,7 +1167,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 +1236,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 +1266,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..10f54b61 100644 --- a/Sources/HTMLKit/Abstraction/Elements/HtmlElements.swift +++ b/Sources/HTMLKit/Abstraction/Elements/HtmlElements.swift @@ -67,22 +67,37 @@ 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) + } + + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Head { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Head { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Head { if condition { @@ -92,7 +107,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 +168,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 +198,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,22 +321,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Body { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Body { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Body { if condition { @@ -316,7 +361,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 +422,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 +452,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..54356fdc 100644 --- a/Sources/HTMLKit/Abstraction/Elements/InputElements.swift +++ b/Sources/HTMLKit/Abstraction/Elements/InputElements.swift @@ -82,22 +82,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> OptionGroup { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> OptionGroup { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> OptionGroup { if condition { @@ -107,7 +122,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 +183,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 +213,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 { @@ -215,10 +245,19 @@ extension OptionGroup: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttrib return self } + @_disfavoredOverload public func label(_ value: String) -> OptionGroup { return mutate(label: value) } + public func label(_ localizedKey: LocalizedStringKey, tableName: String? = nil) -> OptionGroup { + return mutate(label: LocalizedString(key: localizedKey, table: tableName)) + } + + public func label(verbatim value: String) -> OptionGroup { + return mutate(label: value) + } + public func popover(_ value: Values.Popover.State) -> OptionGroup { return mutate(popover: value.rawValue) } @@ -393,22 +432,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Option { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Option { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Option { if condition { @@ -418,7 +472,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 +533,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 +563,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 { @@ -526,10 +595,19 @@ extension Option: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, return self } + @_disfavoredOverload public func label(_ value: String) -> Option { return mutate(label: value) } + public func label(_ localizedKey: LocalizedStringKey, tableName: String? = nil) -> Option { + return mutate(label: LocalizedString(key: localizedKey, table: tableName)) + } + + public func label(verbatim value: String) -> Option { + return mutate(label: value) + } + @_disfavoredOverload public func value(_ value: String) -> Option { return mutate(value: value) @@ -738,22 +816,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Legend { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Legend { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Legend { if condition { @@ -763,7 +856,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 +917,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 +947,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,22 +1146,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Summary { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Summary { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Summary { if condition { @@ -1063,7 +1186,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 +1247,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 +1277,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..b7f05c1b 100644 --- a/Sources/HTMLKit/Abstraction/Elements/ListElements.swift +++ b/Sources/HTMLKit/Abstraction/Elements/ListElements.swift @@ -76,22 +76,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> ListItem { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> ListItem { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> ListItem { if condition { @@ -101,7 +116,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 +177,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 +207,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..06390192 100644 --- a/Sources/HTMLKit/Abstraction/Elements/MapElements.swift +++ b/Sources/HTMLKit/Abstraction/Elements/MapElements.swift @@ -11,8 +11,7 @@ import OrderedCollections /// .useMap("lorem") /// Map { /// Area() -/// .shape(.circle) -/// .coordinates("10, 10, 10 ,10") +/// .shape(.circle, coordinates: "10, 10, 10 ,10") /// .alternate("Lorem ipsum...") /// .reference("https://...") /// } @@ -71,21 +70,36 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Area { return mutate(enterkeyhint: value.rawValue) } + + public func enterKey(_ value: Values.Hint) -> Area { + return mutate(enterkeyhint: value.rawValue) + } public func hidden(_ condition: Bool = true) -> Area { @@ -96,7 +110,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 +171,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 +201,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 { @@ -208,14 +237,24 @@ extension Area: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, A return mutate(alternate: value) } + @available(*, deprecated, message: "Use the shape(_:coordinates:) modifier instead.") public func coordinates(_ value: String) -> Area { return mutate(coords: value) } + @available(*, deprecated, message: "Use the shape(_:coordinates:) modifier instead.") public func shape(_ value: Values.Shape) -> Area { return mutate(shape: value.rawValue) } + public func shape() -> Area { + return mutate(shape: "default") + } + + public func shape(_ value: Values.Shape, coordinates: String) -> Area { + return mutate(shape: value.rawValue).mutate(coords: coordinates) + } + public func reference(_ value: String) -> Area { return mutate(href: value) } diff --git a/Sources/HTMLKit/Abstraction/Elements/MediaElements.swift b/Sources/HTMLKit/Abstraction/Elements/MediaElements.swift index 99b0b7db..12c74771 100644 --- a/Sources/HTMLKit/Abstraction/Elements/MediaElements.swift +++ b/Sources/HTMLKit/Abstraction/Elements/MediaElements.swift @@ -63,22 +63,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Source { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Source { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Source { if condition { @@ -88,7 +103,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 +164,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 +194,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,22 +364,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Track { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Track { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Track { if condition { @@ -359,7 +404,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 +465,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 +495,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 { @@ -474,10 +534,19 @@ extension Track: GlobalAttributes, GlobalEventAttributes, KindAttribute, SourceA return mutate(sourcelanguage: value.rawValue) } + @_disfavoredOverload public func label(_ value: String) -> Track { return mutate(label: value) } + public func label(_ localizedKey: LocalizedStringKey, tableName: String? = nil) -> Track { + return mutate(label: LocalizedString(key: localizedKey, table: tableName)) + } + + public func label(verbatim value: String) -> Track { + return mutate(label: value) + } + public func `default`() -> Track { return mutate(default: "default") } diff --git a/Sources/HTMLKit/Abstraction/Elements/ObjectElements.swift b/Sources/HTMLKit/Abstraction/Elements/ObjectElements.swift index 466fd41a..cae23f6b 100644 --- a/Sources/HTMLKit/Abstraction/Elements/ObjectElements.swift +++ b/Sources/HTMLKit/Abstraction/Elements/ObjectElements.swift @@ -67,22 +67,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Parameter { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Parameter { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Parameter { if condition { @@ -92,7 +107,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 +168,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 +198,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..79c17407 100644 --- a/Sources/HTMLKit/Abstraction/Elements/RubyElements.swift +++ b/Sources/HTMLKit/Abstraction/Elements/RubyElements.swift @@ -78,22 +78,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> RubyText { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> RubyText { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> RubyText { if condition { @@ -103,7 +118,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 +179,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 +209,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,22 +412,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> RubyPronunciation { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> RubyPronunciation { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> RubyPronunciation { if condition { @@ -407,7 +452,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 +513,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 +544,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..1e59a2ec 100644 --- a/Sources/HTMLKit/Abstraction/Elements/TableElements.swift +++ b/Sources/HTMLKit/Abstraction/Elements/TableElements.swift @@ -101,22 +101,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Caption { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Caption { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Caption { if condition { @@ -126,7 +141,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 +202,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 +232,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,23 +429,38 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> ColumnGroup { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> ColumnGroup { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> ColumnGroup { if condition { @@ -425,7 +470,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 +531,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 +561,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,22 +684,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> Column { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> Column { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> Column { if condition { @@ -649,7 +724,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 +785,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 +815,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,22 +942,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> TableBody { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> TableBody { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> TableBody { if condition { @@ -877,7 +982,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 +1043,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 +1073,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,22 +1288,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> TableHead { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> TableHead { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> TableHead { if condition { @@ -1193,7 +1328,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 +1389,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 +1419,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,22 +1634,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> TableFoot { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> TableFoot { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> TableFoot { if condition { @@ -1509,7 +1674,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 +1734,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 +1765,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,22 +1966,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> TableRow { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> TableRow { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> TableRow { if condition { @@ -1811,7 +2006,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 +2067,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 +2097,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 { @@ -2075,7 +2285,7 @@ public struct DataCell: ContentNode, TableElement { } } -extension DataCell: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, ColumnSpanAttribute, RowSpanAttribute, HeaderAttribute { +extension DataCell: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, ColumnSpanAttribute, RowSpanAttribute, HeadersAttribute { public func accessKey(_ value: Character) -> DataCell { return mutate(accesskey: value) @@ -2093,22 +2303,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> DataCell { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> DataCell { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> DataCell { if condition { @@ -2118,7 +2343,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 +2404,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 +2434,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 { @@ -2225,8 +2465,12 @@ extension DataCell: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribute return mutate(rowspan: size) } - public func headers(_ value: String) -> DataCell { - return mutate(headers: value) + public func headers(_ ids: [String]) -> DataCell { + return mutate(headers: ids.joined(separator: " ")) + } + + public func headers(_ ids: String...) -> DataCell { + return mutate(headers: ids.joined(separator: " ")) } public func popover(_ value: Values.Popover.State) -> DataCell { @@ -2386,7 +2630,7 @@ public struct HeaderCell: ContentNode, TableElement { } } -extension HeaderCell: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, ColumnSpanAttribute, RowSpanAttribute, HeaderAttribute, ScopeAttribute { +extension HeaderCell: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttributes, ColumnSpanAttribute, RowSpanAttribute, HeadersAttribute, ScopeAttribute { public func accessKey(_ value: Character) -> HeaderCell { return mutate(accesskey: value) @@ -2404,22 +2648,37 @@ 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) + } + @available(*, deprecated, message: "Use the enterKey(_:) modifier instead.") public func enterKeyHint(_ value: Values.Hint) -> HeaderCell { return mutate(enterkeyhint: value.rawValue) } + public func enterKey(_ value: Values.Hint) -> HeaderCell { + return mutate(enterkeyhint: value.rawValue) + } + public func hidden(_ condition: Bool = true) -> HeaderCell { if condition { @@ -2429,7 +2688,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 +2749,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 +2779,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 { @@ -2536,11 +2810,15 @@ extension HeaderCell: GlobalAttributes, GlobalEventAttributes, GlobalAriaAttribu return mutate(rowspan: size) } - public func headers(_ value: String) -> HeaderCell { - return mutate(headers: value) + public func headers(_ ids: [String]) -> HeaderCell { + return mutate(headers: ids.joined(separator: " ")) + } + + public func headers(_ ids: String...) -> HeaderCell { + return mutate(headers: ids.joined(separator: " ")) } - @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/Sources/HTMLKit/Abstraction/Elements/VectorElements.swift b/Sources/HTMLKit/Abstraction/Elements/VectorElements.swift index fcd58049..d4534732 100644 --- a/Sources/HTMLKit/Abstraction/Elements/VectorElements.swift +++ b/Sources/HTMLKit/Abstraction/Elements/VectorElements.swift @@ -58,7 +58,7 @@ public struct Circle: ContentNode, VectorElement { } extension Circle: GlobalVectorAttributes, CenterPointAttribute, RadiusAttribute { - + public func id(_ value: String) -> Circle { return self.mutate(id: value) } @@ -75,14 +75,20 @@ extension Circle: GlobalVectorAttributes, CenterPointAttribute, RadiusAttribute return self.mutate(style: TaintedString(value, as: .css(.attribute))) } - public func fill(_ value: String) -> Circle { - return self.mutate(fill: value) + public func fill(_ color: String, opacity: Double? = nil) -> Circle { + return self.mutate(fill: color).mutate(fillopacity: opacity) } + @available(*, deprecated, message: "Use the stroke(_:width:opacity:cap:join:) modifier instead.") public func stroke(_ value: String) -> Circle { return self.mutate(stroke: value) } + public func stroke(_ color: String, width: Int? = nil, opacity: Double? = nil, cap: Values.Linecap? = nil, join: Values.Linejoin? = nil) -> Circle { + return self.mutate(stroke: color).mutate(strokewidth: width).mutate(strokeopacity: opacity).mutate(strokelinecap: cap?.rawValue).mutate(strokelinejoin: join?.rawValue) + } + + @available(*, deprecated, message: "Use the stroke(_:width:opacity:cap:join:) modifier instead.") public func strokeWidth(_ size: Int) -> Circle { return self.mutate(strokewidth: size) } @@ -108,18 +114,22 @@ extension Circle: GlobalVectorAttributes, CenterPointAttribute, RadiusAttribute return self.mutate(radius: size) } + @available(*, deprecated, message: "Use the fill(_:opacity:) modifier instead.") public func fillOpacity(_ value: Double) -> Circle { return self.mutate(fillopacity: value) } + @available(*, deprecated, message: "Use the stroke(_:width:opacity:cap:join:) modifier instead.") public func strokeOpacity(_ value: Double) -> Circle { return self.mutate(strokeopacity: value) } + @available(*, deprecated, message: "Use the stroke(_:width:opacity:cap:join:) modifier instead.") public func strokeLineCap(_ value: Values.Linecap) -> Circle { return self.mutate(strokelinecap: value.rawValue) } + @available(*, deprecated, message: "Use the stroke(_:width:opacity:cap:join:) modifier instead.") public func strokeLineJoin(_ value: Values.Linejoin) -> Circle { return self.mutate(strokelinejoin: value.rawValue) } @@ -200,14 +210,20 @@ extension Rectangle: GlobalVectorAttributes, WidthAttribute, HeightAttribute, Ra return self.mutate(style: TaintedString(value, as: .css(.attribute))) } - public func fill(_ value: String) -> Rectangle { - return self.mutate(fill: value) + public func fill(_ color: String, opacity: Double? = nil) -> Rectangle { + return self.mutate(fill: color).mutate(fillopacity: opacity) } + @available(*, deprecated, message: "Use the stroke(_:width:opacity:cap:join:) modifier instead.") public func stroke(_ value: String) -> Rectangle { return self.mutate(stroke: value) } + + public func stroke(_ color: String, width: Int? = nil, opacity: Double? = nil, cap: Values.Linecap? = nil, join: Values.Linejoin? = nil) -> Rectangle { + return self.mutate(stroke: color).mutate(strokewidth: width).mutate(strokeopacity: opacity).mutate(strokelinecap: cap?.rawValue).mutate(strokelinejoin: join?.rawValue) + } + @available(*, deprecated, message: "Use the stroke(_:width:opacity:cap:join:) modifier instead.") public func strokeWidth(_ size: Int) -> Rectangle { return self.mutate(strokewidth: size) } @@ -254,18 +270,22 @@ extension Rectangle: GlobalVectorAttributes, WidthAttribute, HeightAttribute, Ra return self.mutate(height: size) } + @available(*, deprecated, message: "Use the fill(_:opacity:) modifier instead.") public func fillOpacity(_ value: Double) -> Rectangle { return self.mutate(fillopacity: value) } + @available(*, deprecated, message: "Use the stroke(_:width:opacity:cap:join:) modifier instead.") public func strokeOpacity(_ value: Double) -> Rectangle { return self.mutate(strokeopacity: value) } + @available(*, deprecated, message: "Use the stroke(_:width:opacity:cap:join:) modifier instead.") public func strokeLineCap(_ value: Values.Linecap) -> Rectangle { return self.mutate(strokelinecap: value.rawValue) } + @available(*, deprecated, message: "Use the stroke(_:width:opacity:cap:join:) modifier instead.") public func strokeLineJoin(_ value: Values.Linejoin) -> Rectangle { return self.mutate(strokelinejoin: value.rawValue) } @@ -346,14 +366,20 @@ extension Ellipse: GlobalVectorAttributes, CenterPointAttribute, RadiusPointAttr return self.mutate(style: TaintedString(value, as: .css(.attribute))) } - public func fill(_ value: String) -> Ellipse { - return self.mutate(fill: value) + public func fill(_ color: String, opacity: Double? = nil) -> Ellipse { + return self.mutate(fill: color).mutate(fillopacity: opacity) } + @available(*, deprecated, message: "Use the stroke(_:width:opacity:cap:join:) modifier instead.") public func stroke(_ value: String) -> Ellipse { return self.mutate(stroke: value) } + public func stroke(_ color: String, width: Int? = nil, opacity: Double? = nil, cap: Values.Linecap? = nil, join: Values.Linejoin? = nil) -> Ellipse { + return self.mutate(stroke: color).mutate(strokewidth: width).mutate(strokeopacity: opacity).mutate(strokelinecap: cap?.rawValue).mutate(strokelinejoin: join?.rawValue) + } + + @available(*, deprecated, message: "Use the stroke(_:width:opacity:cap:join:) modifier instead.") public func strokeWidth(_ size: Int) -> Ellipse { return self.mutate(strokewidth: size) } @@ -392,18 +418,22 @@ extension Ellipse: GlobalVectorAttributes, CenterPointAttribute, RadiusPointAttr return self.mutate(rx: point.x).mutate(ry: point.y) } + @available(*, deprecated, message: "Use the fill(_:opacity:) modifier instead.") public func fillOpacity(_ value: Double) -> Ellipse { return self.mutate(fillopacity: value) } + @available(*, deprecated, message: "Use the stroke(_:width:opacity:cap:join:) modifier instead.") public func strokeOpacity(_ value: Double) -> Ellipse { return self.mutate(strokeopacity: value) } + @available(*, deprecated, message: "Use the stroke(_:width:opacity:cap:join:) modifier instead.") public func strokeLineCap(_ value: Values.Linecap) -> Ellipse { return self.mutate(strokelinecap: value.rawValue) } + @available(*, deprecated, message: "Use the stroke(_:width:opacity:cap:join:) modifier instead.") public func strokeLineJoin(_ value: Values.Linejoin) -> Ellipse { return self.mutate(strokelinejoin: value.rawValue) } @@ -484,30 +514,40 @@ extension Line: GlobalVectorAttributes { return self.mutate(style: TaintedString(value, as: .css(.attribute))) } - public func fill(_ value: String) -> Line { - return self.mutate(fill: value) + public func fill(_ color: String, opacity: Double? = nil) -> Line { + return self.mutate(fill: color).mutate(fillopacity: opacity) } + @available(*, deprecated, message: "Use the stroke(_:width:opacity:cap:join:) modifier instead.") public func stroke(_ value: String) -> Line { return self.mutate(stroke: value) } + public func stroke(_ color: String, width: Int? = nil, opacity: Double? = nil, cap: Values.Linecap? = nil, join: Values.Linejoin? = nil) -> Line { + return self.mutate(stroke: color).mutate(strokewidth: width).mutate(strokeopacity: opacity).mutate(strokelinecap: cap?.rawValue).mutate(strokelinejoin: join?.rawValue) + } + + @available(*, deprecated, message: "Use the stroke(_:width:opacity:cap:join:) modifier instead.") public func strokeWidth(_ size: Int) -> Line { return self.mutate(strokewidth: size) } + @available(*, deprecated, message: "Use the fill(_:opacity:) modifier instead.") public func fillOpacity(_ value: Double) -> Line { return self.mutate(fillopacity: value) } + @available(*, deprecated, message: "Use the stroke(_:width:opacity:cap:join:) modifier instead.") public func strokeOpacity(_ value: Double) -> Line { return self.mutate(strokeopacity: value) } + @available(*, deprecated, message: "Use the stroke(_:width:opacity:cap:join:) modifier instead.") public func strokeLineCap(_ value: Values.Linecap) -> Line { return self.mutate(strokelinecap: value.rawValue) } + @available(*, deprecated, message: "Use the stroke(_:width:opacity:cap:join:) modifier instead.") public func strokeLineJoin(_ value: Values.Linejoin) -> Line { return self.mutate(strokelinejoin: value.rawValue) } @@ -587,30 +627,40 @@ extension Polygon: GlobalVectorAttributes, PointsAttribute { return self.mutate(style: TaintedString(value, as: .css(.attribute))) } - public func fill(_ value: String) -> Polygon { - return self.mutate(fill: value) + public func fill(_ color: String, opacity: Double? = nil) -> Polygon { + return self.mutate(fill: color).mutate(fillopacity: opacity) } + @available(*, deprecated, message: "Use the stroke(_:width:opacity:cap:join:) modifier instead.") public func stroke(_ value: String) -> Polygon { return self.mutate(stroke: value) } + public func stroke(_ color: String, width: Int? = nil, opacity: Double? = nil, cap: Values.Linecap? = nil, join: Values.Linejoin? = nil) -> Polygon { + return self.mutate(stroke: color).mutate(strokewidth: width).mutate(strokeopacity: opacity).mutate(strokelinecap: cap?.rawValue).mutate(strokelinejoin: join?.rawValue) + } + + @available(*, deprecated, message: "Use the stroke(_:width:opacity:cap:join:) modifier instead.") public func strokeWidth(_ size: Int) -> Polygon { return self.mutate(strokewidth: size) } + @available(*, deprecated, message: "Use the fill(_:opacity:) modifier instead.") public func fillOpacity(_ value: Double) -> Polygon { return self.mutate(fillopacity: value) } + @available(*, deprecated, message: "Use the stroke(_:width:opacity:cap:join:) modifier instead.") public func strokeOpacity(_ value: Double) -> Polygon { return self.mutate(strokeopacity: value) } + @available(*, deprecated, message: "Use the stroke(_:width:opacity:cap:join:) modifier instead.") public func strokeLineCap(_ value: Values.Linecap) -> Polygon { return self.mutate(strokelinecap: value.rawValue) } + @available(*, deprecated, message: "Use the stroke(_:width:opacity:cap:join:) modifier instead.") public func strokeLineJoin(_ value: Values.Linejoin) -> Polygon { return self.mutate(strokelinejoin: value.rawValue) } @@ -694,30 +744,40 @@ extension Polyline: GlobalVectorAttributes, PointsAttribute { return self.mutate(style: TaintedString(value, as: .css(.attribute))) } - public func fill(_ value: String) -> Polyline { - return self.mutate(fill: value) + public func fill(_ color: String, opacity: Double? = nil) -> Polyline { + return self.mutate(fill: color).mutate(fillopacity: opacity) } + @available(*, deprecated, message: "Use the stroke(_:width:opacity:cap:join:) modifier instead.") public func stroke(_ value: String) -> Polyline { return self.mutate(stroke: value) } + public func stroke(_ color: String, width: Int? = nil, opacity: Double? = nil, cap: Values.Linecap? = nil, join: Values.Linejoin? = nil) -> Polyline { + return self.mutate(stroke: color).mutate(strokewidth: width).mutate(strokeopacity: opacity).mutate(strokelinecap: cap?.rawValue).mutate(strokelinejoin: join?.rawValue) + } + + @available(*, deprecated, message: "Use the stroke(_:width:opacity:cap:join:) modifier instead.") public func strokeWidth(_ size: Int) -> Polyline { return self.mutate(strokewidth: size) } + @available(*, deprecated, message: "Use the fill(_:opacity:) modifier instead.") public func fillOpacity(_ value: Double) -> Polyline { return self.mutate(fillopacity: value) } + @available(*, deprecated, message: "Use the stroke(_:width:opacity:cap:join:) modifier instead.") public func strokeOpacity(_ value: Double) -> Polyline { return self.mutate(strokeopacity: value) } + @available(*, deprecated, message: "Use the stroke(_:width:opacity:cap:join:) modifier instead.") public func strokeLineCap(_ value: Values.Linecap) -> Polyline { return self.mutate(strokelinecap: value.rawValue) } + @available(*, deprecated, message: "Use the stroke(_:width:opacity:cap:join:) modifier instead.") public func strokeLineJoin(_ value: Values.Linejoin) -> Polyline { return self.mutate(strokelinejoin: value.rawValue) } @@ -801,30 +861,40 @@ extension Path: GlobalVectorAttributes, DrawAttribute { return self.mutate(style: TaintedString(value, as: .css(.attribute))) } - public func fill(_ value: String) -> Path { - return self.mutate(fill: value) + public func fill(_ color: String, opacity: Double? = nil) -> Path { + return self.mutate(fill: color).mutate(fillopacity: opacity) } + @available(*, deprecated, message: "Use the stroke(_:width:opacity:cap:join:) modifier instead.") public func stroke(_ value: String) -> Path { return self.mutate(stroke: value) } + public func stroke(_ color: String, width: Int? = nil, opacity: Double? = nil, cap: Values.Linecap? = nil, join: Values.Linejoin? = nil) -> Path { + return self.mutate(stroke: color).mutate(strokewidth: width).mutate(strokeopacity: opacity).mutate(strokelinecap: cap?.rawValue).mutate(strokelinejoin: join?.rawValue) + } + + @available(*, deprecated, message: "Use the stroke(_:width:opacity:cap:join:) modifier instead.") public func strokeWidth(_ size: Int) -> Path { return self.mutate(strokewidth: size) } + @available(*, deprecated, message: "Use the fill(_:opacity:) modifier instead.") public func fillOpacity(_ value: Double) -> Path { return self.mutate(fillopacity: value) } + @available(*, deprecated, message: "Use the stroke(_:width:opacity:cap:join:) modifier instead.") public func strokeOpacity(_ value: Double) -> Path { return self.mutate(strokeopacity: value) } + @available(*, deprecated, message: "Use the stroke(_:width:opacity:cap:join:) modifier instead.") public func strokeLineCap(_ value: Values.Linecap) -> Path { return self.mutate(strokelinecap: value.rawValue) } + @available(*, deprecated, message: "Use the stroke(_:width:opacity:cap:join:) modifier instead.") public func strokeLineJoin(_ value: Values.Linejoin) -> Path { return self.mutate(strokelinejoin: value.rawValue) } @@ -907,30 +977,40 @@ extension Group: GlobalVectorAttributes { return self.mutate(style: TaintedString(value, as: .css(.attribute))) } - public func fill(_ value: String) -> Group { - return self.mutate(fill: value) + public func fill(_ color: String, opacity: Double? = nil) -> Group { + return self.mutate(fill: color).mutate(fillopacity: opacity) } + @available(*, deprecated, message: "Use the stroke(_:width:opacity:cap:join:) modifier instead.") public func stroke(_ value: String) -> Group { return self.mutate(stroke: value) } + + public func stroke(_ color: String, width: Int? = nil, opacity: Double? = nil, cap: Values.Linecap? = nil, join: Values.Linejoin? = nil) -> Group { + return self.mutate(stroke: color).mutate(strokewidth: width).mutate(strokeopacity: opacity).mutate(strokelinecap: cap?.rawValue).mutate(strokelinejoin: join?.rawValue) + } + @available(*, deprecated, message: "Use the stroke(_:width:opacity:cap:join:) modifier instead.") public func strokeWidth(_ size: Int) -> Group { return self.mutate(strokewidth: size) } + @available(*, deprecated, message: "Use the fill(_:opacity:) modifier instead.") public func fillOpacity(_ value: Double) -> Group { return self.mutate(fillopacity: value) } + @available(*, deprecated, message: "Use the stroke(_:width:opacity:cap:join:) modifier instead.") public func strokeOpacity(_ value: Double) -> Group { return self.mutate(strokeopacity: value) } + @available(*, deprecated, message: "Use the stroke(_:width:opacity:cap:join:) modifier instead.") public func strokeLineCap(_ value: Values.Linecap) -> Group { return self.mutate(strokelinecap: value.rawValue) } + @available(*, deprecated, message: "Use the stroke(_:width:opacity:cap:join:) modifier instead.") public func strokeLineJoin(_ value: Values.Linejoin) -> Group { return self.mutate(strokelinejoin: value.rawValue) } @@ -1042,30 +1122,40 @@ extension Use: GlobalVectorAttributes, ReferenceAttribute, WidthAttribute, Heigh return self.mutate(style: TaintedString(value, as: .css(.attribute))) } - public func fill(_ value: String) -> Use { - return self.mutate(fill: value) + public func fill(_ color: String, opacity: Double? = nil) -> Use { + return self.mutate(fill: color).mutate(fillopacity: opacity) } + @available(*, deprecated, message: "Use the stroke(_:width:opacity:cap:join:) modifier instead.") public func stroke(_ value: String) -> Use { return self.mutate(stroke: value) } + public func stroke(_ color: String, width: Int? = nil, opacity: Double? = nil, cap: Values.Linecap? = nil, join: Values.Linejoin? = nil) -> Use { + return self.mutate(stroke: color).mutate(strokewidth: width).mutate(strokeopacity: opacity).mutate(strokelinecap: cap?.rawValue).mutate(strokelinejoin: join?.rawValue) + } + + @available(*, deprecated, message: "Use the stroke(_:width:opacity:cap:join:) modifier instead.") public func strokeWidth(_ size: Int) -> Use { return self.mutate(strokewidth: size) } + @available(*, deprecated, message: "Use the fill(_:opacity:) modifier instead.") public func fillOpacity(_ value: Double) -> Use { return self.mutate(fillopacity: value) } + @available(*, deprecated, message: "Use the stroke(_:width:opacity:cap:join:) modifier instead.") public func strokeOpacity(_ value: Double) -> Use { return self.mutate(strokeopacity: value) } + @available(*, deprecated, message: "Use the stroke(_:width:opacity:cap:join:) modifier instead.") public func strokeLineCap(_ value: Values.Linecap) -> Use { return self.mutate(strokelinecap: value.rawValue) } + @available(*, deprecated, message: "Use the stroke(_:width:opacity:cap:join:) modifier instead.") public func strokeLineJoin(_ value: Values.Linejoin) -> Use { return self.mutate(strokelinejoin: value.rawValue) } diff --git a/Sources/HTMLKit/Abstraction/Tokens/ValueTokens.swift b/Sources/HTMLKit/Abstraction/Tokens/ValueTokens.swift index 5d8059df..bdf6724f 100644 --- a/Sources/HTMLKit/Abstraction/Tokens/ValueTokens.swift +++ b/Sources/HTMLKit/Abstraction/Tokens/ValueTokens.swift @@ -860,7 +860,7 @@ public enum Values { /// Indicates a ressource preload. case preload - @available(*, deprecated, message: "It is no longer part of the web standards.") + @available(*, unavailable, message: "It is no longer part of the web standards.") case prerender /// Indicates a page pagination. @@ -875,7 +875,7 @@ public enum Values { /// Indicates a content tag. case tag - @available(*, deprecated, message: "It is no longer part of the web standards. Use 'icon' instead.") + @available(*, unavailable, message: "It is no longer part of the web standards. Use 'icon' instead.") case shortcutIcon = "shortcut icon" /// Indicates a touch icon. @@ -917,6 +917,7 @@ public enum Values { /// ``` public enum Shape: String { + @available(*, deprecated, message: "Use the shape() modifier instead.") /// Expects the entire region. case `default` @@ -1094,7 +1095,7 @@ public enum Values { /// /// ```swift /// Input() - /// .enterKeyHint(.next) + /// .enterKey(.next) /// ``` public enum Hint: String { @@ -1222,7 +1223,7 @@ public enum Values { /// Indicates a select list. case combobox - @available(*, deprecated, message: "It is an abstract role and should not be used.") + @available(*, unavailable, message: "It is an abstract role and should not be used.") case command /// Indicates a text comment. @@ -1231,7 +1232,7 @@ public enum Values { /// Indicates a page aside. case complementary - @available(*, deprecated, message: "It is an abstract role and should not be used.") + @available(*, unavailable, message: "It is an abstract role and should not be used.") case composite /// Indicates a page footer. @@ -1243,7 +1244,7 @@ public enum Values { /// Indicates a dialog window. case dialog - @available(*, deprecated, message: "It is no longer part of the web standards. Use 'list' instead.") + @available(*, unavailable, message: "It is no longer part of the web standards. Use 'list' instead.") case directory /// Indicates a read mode. @@ -1273,10 +1274,10 @@ public enum Values { /// Indicates an image set. case img - @available(*, deprecated, message: "It is an abstract role and should not be used.") + @available(*, unavailable, message: "It is an abstract role and should not be used.") case input - @available(*, deprecated, message: "It is an abstract role and should not be used.") + @available(*, unavailable, message: "It is an abstract role and should not be used.") case landmark /// Indicates an item list. @@ -1339,13 +1340,13 @@ public enum Values { /// Indicates a radio select. case radio - @available(*, deprecated, message: "It is an abstract role and should not be used.") + @available(*, unavailable, message: "It is an abstract role and should not be used.") case range /// Indicates a content section. case region - @available(*, deprecated, message: "It is an abstract role and should not be used.") + @available(*, unavailable, message: "It is an abstract role and should not be used.") case roleType = "roletype" /// Indicates a table row. @@ -1366,10 +1367,10 @@ public enum Values { /// Indicates a search control. case searchBox = "searchbox" - @available(*, deprecated, message: "It is an abstract role and should not be used.") + @available(*, unavailable, message: "It is an abstract role and should not be used.") case sectionHead = "sectionhead" - @available(*, deprecated, message: "It is an abstract role and should not be used.") + @available(*, unavailable, message: "It is an abstract role and should not be used.") case select /// Indicates a content divider. @@ -1378,7 +1379,7 @@ public enum Values { /// Indicates a status mesage. case status - @available(*, deprecated, message: "It is an abstract role and should not be used.") + @available(*, unavailable, message: "It is an abstract role and should not be used.") case structure /// Indicates a content suggestion. @@ -1423,10 +1424,10 @@ public enum Values { /// Indicates a tree item. case treeItem = "treeitem" - @available(*, deprecated, message: "It is an abstract role and should not be used.") + @available(*, unavailable, message: "It is an abstract role and should not be used.") case widget - @available(*, deprecated, message: "It is an abstract role and should not be used.") + @available(*, unavailable, message: "It is an abstract role and should not be used.") case window } @@ -1942,8 +1943,7 @@ public enum Values { /// Button { /// "Lorem ipsum" /// } - /// .popoverTarget("id") - /// .popoverAction(.hide) + /// .popoverTarget("id", action: .hide) /// ``` public enum Action: String { diff --git a/Tests/HTMLKitTests/AttributesTests.swift b/Tests/HTMLKitTests/AttributesTests.swift index 2036c5a5..d7a0d775 100644 --- a/Tests/HTMLKitTests/AttributesTests.swift +++ b/Tests/HTMLKitTests/AttributesTests.swift @@ -15,7 +15,7 @@ final class AttributesTests: XCTestCase { @ContentBuilder var body: Content } - typealias AllAttributes = AccessKeyAttribute & AcceptAttribute & ActionAttribute & AlternateAttribute & AsynchronouslyAttribute & AutocapitalizeAttribute & AutocompleteAttribute & AutofocusAttribute & AutoplayAttribute & CharsetAttribute & CheckedAttribute & CiteAttribute & ClassAttribute & ColumnsAttribute & ColumnSpanAttribute & ContentAttribute & EditAttribute & ControlsAttribute & CoordinatesAttribute & DataAttribute & DateTimeAttribute & DefaultAttribute & DeferAttribute & DirectionAttribute & DisabledAttribute & DownloadAttribute & DragAttribute & EncodingAttribute & EnterKeyHintAttribute & ForAttribute & FormAttribute & FormActionAttribute & EquivalentAttribute & HeaderAttribute & HeightAttribute & HiddenAttribute & HighAttribute & ReferenceAttribute & ReferenceLanguageAttribute & IdentifierAttribute & IsMapAttribute & InputModeAttribute & IsAttribute & ItemAttribute & ItemIdAttribute & ItemPropertyAttribute & ItemReferenceAttribute & ItemScopeAttribute & ItemTypeAttribute & KindAttribute & LabelAttribute & LanguageAttribute & ListAttribute & LoopAttribute & LowAttribute & MaximumValueAttribute & MaximumLengthAttribute & MediaAttribute & MethodAttribute & MinimumValueAttribute & MinimumLengthAttribute & MultipleAttribute & MutedAttribute & NameAttribute & NonceAttribute & NoValidateAttribute & OpenAttribute & OptimumAttribute & PatternAttribute & PartAttribute & PingAttribute & PlaceholderAttribute & PosterAttribute & PreloadAttribute & ReadOnlyAttribute & ReferrerPolicyAttribute & RelationshipAttribute & RequiredAttribute & ReversedAttribute & RoleAttribute & RowsAttribute & RowSpanAttribute & SandboxAttribute & ScopeAttribute & ShapeAttribute & SizeAttribute & SizesAttribute & SlotAttribute & SpanAttribute & SpellCheckAttribute & SourceAttribute & StartAttribute & StepAttribute & StyleAttribute & TabulatorAttribute & TargetAttribute & TitleAttribute & TranslateAttribute & TypeAttribute & ValueAttribute & WidthAttribute & WrapAttribute & PropertyAttribute & SelectedAttribute & WindowEventAttribute & FocusEventAttribute & PointerEventAttribute & MouseEventAttribute & WheelEventAttribute & InputEventAttribute & KeyboardEventAttribute & DragEventAttribute & ClipboardEventAttribute & SelectionEventAttribute & MediaEventAttribute & FormEventAttribute & DetailEventAttribute & AriaAtomicAttribute & AriaBusyAttribute & AriaControlsAttribute & AriaCurrentAttribute & AriaDescribedAttribute & AriaDetailsAttribute & AriaDisabledAttribute & AriaErrorMessageAttribute & AriaFlowToAttribute & AriaPopupAttribute & AriaHiddenAttribute & AriaInvalidAttribute & AriaShortcutsAttribute & AriaLabelAttribute & AriaLabeledAttribute & AriaLiveAttribute & AriaOwnsAttribute & AriaRelevantAttribute & AriaRoleDescriptionAttribute & DrawAttribute & FillAttribute & FillOpacityAttribute & StrokeAttribute & StrokeWidthAttribute & StrokeOpacityAttribute & StrokeLineCapAttribute & StrokeLineJoinAttribute & RadiusAttribute & PositionPointAttribute & RadiusPointAttribute & CenterPointAttribute & ViewBoxAttribute & NamespaceAttribute & PointsAttribute & ShadowRootModeAttribute & InertAttribute & FetchPriorityAttribute & LoadingAttribute & SourceSetAttribute & DecodingAttribute & BlockingAttribute & PopoverAttribute & PopoverTargetAttribute & PopoverActionAttribute & UseMapAttribute & PlaysInlineAttribute & IntegrityAttribute & AsAttribute & CrossOriginAttribute & SourceLanguageAttribute & SourceDocumentAttribute + typealias AllAttributes = AccessKeyAttribute & AcceptAttribute & ActionAttribute & AlternateAttribute & AsynchronouslyAttribute & AutocapitalizeAttribute & AutocompleteAttribute & AutofocusAttribute & AutoplayAttribute & CharsetAttribute & CheckedAttribute & CiteAttribute & ClassAttribute & ColumnsAttribute & ColumnSpanAttribute & ContentAttribute & EditAttribute & ControlsAttribute & CoordinatesAttribute & DataAttribute & DateTimeAttribute & DefaultAttribute & DeferAttribute & DirectionAttribute & DisabledAttribute & DownloadAttribute & DragAttribute & EncodingAttribute & EnterKeyAttribute & ForAttribute & FormAttribute & FormActionAttribute & EquivalentAttribute & HeadersAttribute & HeightAttribute & HiddenAttribute & HighAttribute & ReferenceAttribute & ReferenceLanguageAttribute & IdentifierAttribute & IsMapAttribute & InputModeAttribute & IsAttribute & ItemAttribute & ItemIdAttribute & ItemPropertyAttribute & ItemReferenceAttribute & ItemScopeAttribute & ItemTypeAttribute & KindAttribute & LabelAttribute & LanguageAttribute & ListAttribute & LoopAttribute & LowAttribute & MaximumValueAttribute & MaximumLengthAttribute & MediaAttribute & MethodAttribute & MinimumValueAttribute & MinimumLengthAttribute & MultipleAttribute & MutedAttribute & NameAttribute & NonceAttribute & NoValidateAttribute & OpenAttribute & OptimumAttribute & PatternAttribute & PartAttribute & PingAttribute & PlaceholderAttribute & PosterAttribute & PreloadAttribute & ReadOnlyAttribute & ReferrerPolicyAttribute & RelationshipAttribute & RequiredAttribute & ReversedAttribute & RoleAttribute & RowsAttribute & RowSpanAttribute & SandboxAttribute & ScopeAttribute & ShapeAttribute & SizeAttribute & SizesAttribute & SlotAttribute & SpanAttribute & SpellCheckAttribute & SourceAttribute & StartAttribute & StepAttribute & StyleAttribute & TabulatorAttribute & TargetAttribute & TitleAttribute & TranslateAttribute & TypeAttribute & ValueAttribute & WidthAttribute & WrapAttribute & PropertyAttribute & SelectedAttribute & WindowEventAttribute & FocusEventAttribute & PointerEventAttribute & MouseEventAttribute & WheelEventAttribute & InputEventAttribute & KeyboardEventAttribute & DragEventAttribute & ClipboardEventAttribute & SelectionEventAttribute & MediaEventAttribute & FormEventAttribute & DetailEventAttribute & AriaAtomicAttribute & AriaBusyAttribute & AriaControlsAttribute & AriaCurrentAttribute & AriaDescribedAttribute & AriaDetailsAttribute & AriaDisabledAttribute & AriaErrorMessageAttribute & AriaFlowToAttribute & AriaPopupAttribute & AriaHiddenAttribute & AriaInvalidAttribute & AriaShortcutsAttribute & AriaLabelAttribute & AriaLabeledAttribute & AriaLiveAttribute & AriaOwnsAttribute & AriaRelevantAttribute & AriaRoleDescriptionAttribute & DrawAttribute & FillAttribute & StrokeAttribute & StrokeWidthAttribute & StrokeOpacityAttribute & StrokeLineCapAttribute & StrokeLineJoinAttribute & RadiusAttribute & PositionPointAttribute & RadiusPointAttribute & CenterPointAttribute & ViewBoxAttribute & NamespaceAttribute & PointsAttribute & ShadowRootModeAttribute & InertAttribute & FetchPriorityAttribute & LoadingAttribute & SourceSetAttribute & DecodingAttribute & BlockingAttribute & PopoverAttribute & PopoverTargetAttribute & PopoverActionAttribute & UseMapAttribute & PlaysInlineAttribute & IntegrityAttribute & AsAttribute & CrossOriginAttribute & SourceLanguageAttribute & SourceDocumentAttribute struct Tag: ContentNode, GlobalElement, AllAttributes { @@ -57,16 +57,16 @@ 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) } - func enterKeyHint(_ value: Values.Hint) -> Tag { + func enterKey(_ value: Values.Hint) -> Tag { return self.mutate(enterkeyhint: value.rawValue) } @@ -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 { @@ -308,8 +313,12 @@ final class AttributesTests: XCTestCase { return self.mutate(httpequiv: value.rawValue) } - func headers(_ value: String) -> Tag { - return self.mutate(headers: value) + func headers(_ ids: [String]) -> Tag { + return self.mutate(headers: ids.joined(separator: " ")) + } + + func headers(_ ids: String...) -> Tag { + return self.mutate(headers: ids.joined(separator: " ")) } func height(_ size: Int) -> Tag { @@ -336,10 +345,19 @@ final class AttributesTests: XCTestCase { return self.mutate(kind: value.rawValue) } + @_disfavoredOverload func label(_ value: String) -> Tag { return self.mutate(label: value) } + func label(_ localizedKey: LocalizedStringKey, tableName: String? = nil) -> Tag { + return self.mutate(label: LocalizedString(key: localizedKey, table: tableName)) + } + + func label(verbatim value: String) -> Tag { + return self.mutate(label: value) + } + func list(_ value: String) -> Tag { return self.mutate(list: value) } @@ -405,8 +423,13 @@ final class AttributesTests: XCTestCase { return self.mutate(novalidate: "novalidate") } - func isOpen(_ value: Bool) -> Tag { - return self.mutate(open: value) + func open(_ condition: Bool = true) -> Tag { + + if condition { + return self.mutate(open: "open") + } + + return self } func optimum(_ value: Float) -> Tag { @@ -509,8 +532,12 @@ final class AttributesTests: XCTestCase { return self.mutate(scope: value.rawValue) } - func shape(_ value: Values.Shape) -> Tag { - return self.mutate(shape: value.rawValue) + func shape() -> Tag { + return self.mutate(shape: "default") + } + + func shape(_ value: Values.Shape, coordinates: String) -> Tag { + return self.mutate(shape: value.rawValue).mutate(coords: coordinates) } func size(_ size: Int) -> Tag { @@ -611,16 +638,12 @@ final class AttributesTests: XCTestCase { return self.mutate(draw: value) } - func fill(_ value: String) -> Tag { - return self.mutate(fill: value) - } - - func fillOpacity(_ value: Double) -> Tag { - return self.mutate(fillopacity: value) + func fill(_ color: String, opacity: Double? = nil) -> Tag { + return self.mutate(fill: color).mutate(fillopacity: opacity) } - func stroke(_ value: String) -> Tag { - return self.mutate(stroke: value) + public func stroke(_ color: String, width: Int? = nil, opacity: Double? = nil, cap: Values.Linecap? = nil, join: Values.Linejoin? = nil) -> Tag { + return self.mutate(stroke: color).mutate(strokewidth: width).mutate(strokeopacity: opacity).mutate(strokelinecap: cap?.rawValue).mutate(strokelinejoin: join?.rawValue) } func strokeWidth(_ size: Int) -> Tag { @@ -727,8 +750,8 @@ final class AttributesTests: XCTestCase { return self.mutate(popover: value.rawValue) } - func popoverTarget(_ value: String) -> Tag { - return self.mutate(popovertarget: value) + func popoverTarget(_ id: String, action: Values.Popover.Action? = nil) -> Tag { + return self.mutate(popovertarget: id).mutate(popovertargetaction: action?.rawValue) } func popoverAction(_ value: Values.Popover.Action) -> Tag { @@ -971,11 +994,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 +1011,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), """ + \ + \ """ ) @@ -997,7 +1028,7 @@ final class AttributesTests: XCTestCase { func testEnterkeyhintAttribute() throws { let view = TestView { - Tag {}.enterKeyHint(.enter) + Tag {}.enterKey(.enter) } XCTAssertEqual(try renderer.render(view: view), @@ -1069,12 +1100,12 @@ final class AttributesTests: XCTestCase { func testRoleAttribute() throws { let view = TestView { - Tag {}.role(.range) + Tag {}.role(.alert) } XCTAssertEqual(try renderer.render(view: view), """ - + """ ) } @@ -1082,11 +1113,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 +1169,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), """ + \ + \ """ ) @@ -1341,19 +1380,6 @@ final class AttributesTests: XCTestCase { ) } - func testCoordinatesAttribute() throws { - - let view = TestView { - Tag {}.coordinates("255,132,316,150") - } - - XCTAssertEqual(try renderer.render(view: view), - """ - - """ - ) - } - func testDataAttribute() throws { let view = TestView { @@ -1507,12 +1533,16 @@ final class AttributesTests: XCTestCase { func testHeadersAttribute() throws { let view = TestView { - Tag {}.headers("name") + Tag {}.headers("id") + Tag {}.headers("id", "id") + Tag {}.headers(["id", "id"]) } XCTAssertEqual(try renderer.render(view: view), """ - + \ + \ + """ ) } @@ -1819,12 +1849,16 @@ final class AttributesTests: XCTestCase { func testIsOpenAttribute() throws { let view = TestView { - Tag {}.isOpen(true) + Tag {}.open() + Tag {}.open(false) + Tag {}.open(true) } XCTAssertEqual(try renderer.render(view: view), """ - + \ + \ + """ ) } @@ -2081,12 +2115,14 @@ final class AttributesTests: XCTestCase { func testShapeAttribute() throws { let view = TestView { - Tag {}.shape(.circle) + Tag {}.shape() + Tag {}.shape(.circle, coordinates: "255,132,316,150") } XCTAssertEqual(try renderer.render(view: view), """ - + \ + """ ) } @@ -2384,24 +2420,13 @@ final class AttributesTests: XCTestCase { let view = TestView { Tag {}.popoverTarget("id") + Tag {}.popoverTarget("id", action: .hide) } XCTAssertEqual(try renderer.render(view: view), """ - - """ - ) - } - - func testPopoverActionAttribute() throws { - - let view = TestView { - Tag {}.popoverAction(.toggle) - } - - XCTAssertEqual(try renderer.render(view: view), - """ - + \ + """ ) } @@ -2897,24 +2922,13 @@ final class AttributesTests: XCTestCase { let view = TestView { Tag {}.fill("black") + Tag {}.fill("black", opacity: 0.5) } XCTAssertEqual(try renderer.render(view: view), """ - - """ - ) - } - - func testFillOpacityAttribute() throws { - - let view = TestView { - Tag {}.fillOpacity(0.5) - } - - XCTAssertEqual(try renderer.render(view: view), - """ - + \ + """ ) } @@ -2923,63 +2937,19 @@ final class AttributesTests: XCTestCase { let view = TestView { Tag {}.stroke("black") + Tag {}.stroke("black", width: 1) + Tag {}.stroke("black", width: 1, opacity: 0.5) + Tag {}.stroke("black", width: 1, opacity: 0.5, cap: .butt) + Tag {}.stroke("black", width: 1, opacity: 0.5, cap: .butt, join: .round) } XCTAssertEqual(try renderer.render(view: view), """ - - """ - ) - } - - func testStrokeWidthAttribute() throws { - - let view = TestView { - Tag {}.strokeWidth(5) - } - - XCTAssertEqual(try renderer.render(view: view), - """ - - """ - ) - } - - func testStrokeOpacityAttribute() throws { - - let view = TestView { - Tag {}.strokeOpacity(1.0) - } - - XCTAssertEqual(try renderer.render(view: view), - """ - - """ - ) - } - - func testStrokeLineCapAttribute() throws { - - let view = TestView { - Tag {}.strokeLineCap(.round) - } - - XCTAssertEqual(try renderer.render(view: view), - """ - - """ - ) - } - - func testStrokeLineJoinAttribute() throws { - - let view = TestView { - Tag {}.strokeLineJoin(.miter) - } - - XCTAssertEqual(try renderer.render(view: view), - """ - + \ + \ + \ + \ + """ ) }