Skip to content

Commit

Permalink
Update phoenix_html to v4
Browse files Browse the repository at this point in the history
  • Loading branch information
dushyantss authored and tiagoefmoraes committed Sep 24, 2024
1 parent 37cc399 commit f5a0714
Show file tree
Hide file tree
Showing 28 changed files with 53 additions and 51 deletions.
4 changes: 2 additions & 2 deletions lib/surface/components/form.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ defmodule Surface.Components.Form do
@moduledoc """
Defines a **form** that lets the user submit information.
Provides a wrapper for `Phoenix.HTML.Form.form_for/3`. Additionally,
Provides a wrapper for `PhoenixHTMLHelpers.Form.form_for/3`. Additionally,
adds the form instance that is returned by `form_for/3` into the context,
making it available to any child input.
Expand Down Expand Up @@ -55,7 +55,7 @@ defmodule Surface.Components.Form do
@doc "Keyword list of errors for the form."
prop errors, :keyword

@doc "Keyword list with options to be passed down to `Phoenix.HTML.Tag.tag/2`"
@doc "Keyword list with options to be passed down to `PhoenixHTMLHelpers.Tag.tag/2`"
prop opts, :keyword, default: []

@doc "Class or classes to apply to the form"
Expand Down
4 changes: 2 additions & 2 deletions lib/surface/components/form/checkbox.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ defmodule Surface.Components.Form.Checkbox do
@moduledoc """
Defines a checkbox.
Provides a wrapper for Phoenix.HTML.Form's `checkbox/3` function.
Provides a wrapper for PhoenixHTMLHelpers.Form's `checkbox/3` function.
All options passed via `opts` will be sent to `checkbox/3`, `value` and
`class` can be set directly and will override anything in `opts`.
Expand All @@ -17,7 +17,7 @@ defmodule Surface.Components.Form.Checkbox do

use Surface.Components.Form.Input

import Phoenix.HTML.Form, only: [checkbox: 3]
import PhoenixHTMLHelpers.Form, only: [checkbox: 3]
import Surface.Components.Utils, only: [events_to_opts: 1]
import Surface.Components.Form.Utils

Expand Down
4 changes: 2 additions & 2 deletions lib/surface/components/form/color_input.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ defmodule Surface.Components.Form.ColorInput do
An input field that let the user specify a **color**, either with a
text field or a color picker interface.
Provides a wrapper for Phoenix.HTML.Form's `color_input/3` function.
Provides a wrapper for PhoenixHTMLHelpers.Form's `color_input/3` function.
All options passed via `opts` will be sent to `color_input/3`, `value` and
`class` can be set directly and will override anything in `opts`.
Expand All @@ -18,7 +18,7 @@ defmodule Surface.Components.Form.ColorInput do

use Surface.Components.Form.Input

import Phoenix.HTML.Form, only: [color_input: 3]
import PhoenixHTMLHelpers.Form, only: [color_input: 3]
import Surface.Components.Utils, only: [events_to_opts: 1]
import Surface.Components.Form.Utils

Expand Down
4 changes: 2 additions & 2 deletions lib/surface/components/form/date_input.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ defmodule Surface.Components.Form.DateInput do
An input field that let the user enter a **date**, either with a text field
or a date picker interface.
Provides a wrapper for Phoenix.HTML.Form's `date_input/3` function.
Provides a wrapper for PhoenixHTMLHelpers.Form's `date_input/3` function.
All options passed via `opts` will be sent to `date_input/3`, `value` and
`class` can be set directly and will override anything in `opts`.
Expand All @@ -18,7 +18,7 @@ defmodule Surface.Components.Form.DateInput do

use Surface.Components.Form.Input

import Phoenix.HTML.Form, only: [date_input: 3]
import PhoenixHTMLHelpers.Form, only: [date_input: 3]
import Surface.Components.Utils, only: [events_to_opts: 1]
import Surface.Components.Form.Utils

Expand Down
4 changes: 2 additions & 2 deletions lib/surface/components/form/date_select.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ defmodule Surface.Components.Form.DateSelect do
@moduledoc """
Generates select tags for date.
Provides a wrapper for Phoenix.HTML.Form's `date_select/3` function.
Provides a wrapper for PhoenixHTMLHelpers.Form's `date_select/3` function.
All options passed via `opts` will be sent to `date_select/3`,
`value`, `default`, `year`, `month`, `day` and `builder`
Expand All @@ -21,7 +21,7 @@ defmodule Surface.Components.Form.DateSelect do

use Surface.Component

import Phoenix.HTML.Form, only: [date_select: 3]
import PhoenixHTMLHelpers.Form, only: [date_select: 3]
import Surface.Components.Form.Utils

@doc "The form identifier"
Expand Down
4 changes: 2 additions & 2 deletions lib/surface/components/form/datetime_local_input.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ defmodule Surface.Components.Form.DateTimeLocalInput do
An input field that let the user enter both **date** and **time**, using a
text field and a date picker interface.
Provides a wrapper for Phoenix.HTML.Form's `datetime_local_input/3` function.
Provides a wrapper for PhoenixHTMLHelpers.Form's `datetime_local_input/3` function.
All options passed via `opts` will be sent to `datetime_local_input/3`, `value` and
`class` can be set directly and will override anything in `opts`.
Expand All @@ -18,7 +18,7 @@ defmodule Surface.Components.Form.DateTimeLocalInput do

use Surface.Components.Form.Input

import Phoenix.HTML.Form, only: [datetime_local_input: 3]
import PhoenixHTMLHelpers.Form, only: [datetime_local_input: 3]
import Surface.Components.Utils, only: [events_to_opts: 1]
import Surface.Components.Form.Utils

Expand Down
4 changes: 2 additions & 2 deletions lib/surface/components/form/datetime_select.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ defmodule Surface.Components.Form.DateTimeSelect do
@moduledoc """
Generates select tags for datetime.
Provides a wrapper for Phoenix.HTML.Form's `datetime_select/3` function.
Provides a wrapper for PhoenixHTMLHelpers.Form's `datetime_select/3` function.
All options passed via `opts` will be sent to `datetime_select/3`,
`value`, `default`, `year`, `month`, `day`, `hour`, `minute`, `second` and `builder`
Expand All @@ -21,7 +21,7 @@ defmodule Surface.Components.Form.DateTimeSelect do

use Surface.Component

import Phoenix.HTML.Form, only: [datetime_select: 3]
import PhoenixHTMLHelpers.Form, only: [datetime_select: 3]
import Surface.Components.Form.Utils

@doc "The form identifier"
Expand Down
4 changes: 2 additions & 2 deletions lib/surface/components/form/email_input.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ defmodule Surface.Components.Form.EmailInput do
@moduledoc """
An input field that let the user enter one or multiple **e-mails**.
Provides a wrapper for Phoenix.HTML.Form's `email_input/3` function.
Provides a wrapper for PhoenixHTMLHelpers.Form's `email_input/3` function.
All options passed via `opts` will be sent to `email_input/3`, `value` and
`class` can be set directly and will override anything in `opts`.
Expand All @@ -17,7 +17,7 @@ defmodule Surface.Components.Form.EmailInput do

use Surface.Components.Form.Input

import Phoenix.HTML.Form, only: [email_input: 3]
import PhoenixHTMLHelpers.Form, only: [email_input: 3]
import Surface.Components.Utils, only: [events_to_opts: 1]
import Surface.Components.Form.Utils

Expand Down
2 changes: 1 addition & 1 deletion lib/surface/components/form/file_input.ex
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ defmodule Surface.Components.Form.FileInput do

use Surface.Components.Form.Input

import Phoenix.HTML.Form, only: [file_input: 3]
import PhoenixHTMLHelpers.Form, only: [file_input: 3]
import Surface.Components.Utils, only: [events_to_opts: 1]
import Surface.Components.Form.Utils

Expand Down
4 changes: 2 additions & 2 deletions lib/surface/components/form/hidden_input.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ defmodule Surface.Components.Form.HiddenInput do
@moduledoc """
A **hidden** input field.
Provides a wrapper for Phoenix.HTML.Form's `hidden_input/3` function.
Provides a wrapper for PhoenixHTMLHelpers.Form's `hidden_input/3` function.
All options passed via `opts` will be sent to `hidden_input/3`, `value` and
`class` can be set directly and will override anything in `opts`.
Expand All @@ -17,7 +17,7 @@ defmodule Surface.Components.Form.HiddenInput do

use Surface.Components.Form.Input

import Phoenix.HTML.Form, only: [hidden_input: 3]
import PhoenixHTMLHelpers.Form, only: [hidden_input: 3]
import Surface.Components.Utils, only: [events_to_opts: 1]
import Surface.Components.Form.Utils

Expand Down
2 changes: 1 addition & 1 deletion lib/surface/components/form/hidden_inputs.ex
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
defmodule Surface.Components.Form.HiddenInputs do
@moduledoc """
A wrapper for `Phoenix.HTML.Form.html.hidden_inputs_for/1`.
A wrapper for `PhoenixHTMLHelpers.Form.hidden_inputs_for/1`.
Generates hidden inputs for the given form.
"""
Expand Down
2 changes: 1 addition & 1 deletion lib/surface/components/form/inputs.ex
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
defmodule Surface.Components.Form.Inputs do
@moduledoc """
A wrapper for `Phoenix.HTML.Form.html.inputs_for/3`.
A wrapper for `PhoenixHTMLHelpers.Form.inputs_for/3`.
Additionally, adds the generated form instance that is returned by `inputs_for/3`
into the context, making it available to any child input.
Expand Down
4 changes: 2 additions & 2 deletions lib/surface/components/form/multiple_select.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ defmodule Surface.Components.Form.MultipleSelect do
@moduledoc """
Defines a select.
Provides a wrapper for Phoenix.HTML.Form's `multiple_select/4` function.
Provides a wrapper for PhoenixHTMLHelpers.Form's `multiple_select/4` function.
All options passed via `opts` will be sent to `multiple_select/4`, `class` can
be set directly and will override anything in `opts`.
"""

use Surface.Component

import Phoenix.HTML.Form, only: [multiple_select: 4]
import PhoenixHTMLHelpers.Form, only: [multiple_select: 4]
import Surface.Components.Form.Utils

@doc "The form identifier"
Expand Down
4 changes: 2 additions & 2 deletions lib/surface/components/form/number_input.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ defmodule Surface.Components.Form.NumberInput do
@moduledoc """
An input field that let the user to enter a **number**.
Provides a wrapper for Phoenix.HTML.Form's `number_input/3` function.
Provides a wrapper for PhoenixHTMLHelpers.Form's `number_input/3` function.
All options passed via `opts` will be sent to `number_input/3`, `value` and
`class` can be set directly and will override anything in `opts`.
Expand All @@ -17,7 +17,7 @@ defmodule Surface.Components.Form.NumberInput do

use Surface.Components.Form.Input

import Phoenix.HTML.Form, only: [number_input: 3]
import PhoenixHTMLHelpers.Form, only: [number_input: 3]
import Surface.Components.Utils, only: [events_to_opts: 1]
import Surface.Components.Form.Utils

Expand Down
4 changes: 2 additions & 2 deletions lib/surface/components/form/password_input.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ defmodule Surface.Components.Form.PasswordInput do
@moduledoc """
An input field that let the user securely specify a **password**.
Provides a wrapper for Phoenix.HTML.Form's `password_input/3` function.
Provides a wrapper for PhoenixHTMLHelpers.Form's `password_input/3` function.
All options passed via `opts` will be sent to `password_input/3`, `value` and
`class` can be set directly and will override anything in `opts`.
Expand All @@ -17,7 +17,7 @@ defmodule Surface.Components.Form.PasswordInput do

use Surface.Components.Form.Input

import Phoenix.HTML.Form, only: [password_input: 3]
import PhoenixHTMLHelpers.Form, only: [password_input: 3]
import Surface.Components.Utils, only: [events_to_opts: 1]
import Surface.Components.Form.Utils

Expand Down
4 changes: 2 additions & 2 deletions lib/surface/components/form/radio_button.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ defmodule Surface.Components.Form.RadioButton do
@moduledoc """
Defines a radio button.
Provides a wrapper for Phoenix.HTML.Form's `radio_button/4` function.
Provides a wrapper for PhoenixHTMLHelpers.Form's `radio_button/4` function.
All options passed via `opts` will be sent to `radio_button/4`, `value` and
`class` can be set directly and will override anything in `opts`.
Expand All @@ -17,7 +17,7 @@ defmodule Surface.Components.Form.RadioButton do

use Surface.Components.Form.Input

import Phoenix.HTML.Form, only: [radio_button: 4]
import PhoenixHTMLHelpers.Form, only: [radio_button: 4]
import Surface.Components.Utils, only: [events_to_opts: 1]
import Surface.Components.Form.Utils

Expand Down
4 changes: 2 additions & 2 deletions lib/surface/components/form/range_input.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ defmodule Surface.Components.Form.RangeInput do
An input field that let the user specify a numeric value in a given **range**,
usually using a slider.
Provides a wrapper for Phoenix.HTML.Form's `range_input/3` function.
Provides a wrapper for PhoenixHTMLHelpers.Form's `range_input/3` function.
All options passed via `opts` will be sent to `range_input/3`, `value`, `min`, `max`
and `class` can be set directly and will override anything in `opts`.
Expand All @@ -18,7 +18,7 @@ defmodule Surface.Components.Form.RangeInput do

use Surface.Components.Form.Input

import Phoenix.HTML.Form, only: [range_input: 3]
import PhoenixHTMLHelpers.Form, only: [range_input: 3]
import Surface.Components.Utils, only: [events_to_opts: 1]
import Surface.Components.Form.Utils

Expand Down
4 changes: 2 additions & 2 deletions lib/surface/components/form/reset.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ defmodule Surface.Components.Form.Reset do
@moduledoc """
Defines a reset button.
Provides a wrapper for Phoenix.HTML.Form's `reset/2` function.
Provides a wrapper for PhoenixHTMLHelpers.Form's `reset/2` function.
All options passed via `opts` will be sent to `reset/2`, `value` and
`class` can be set directly and will override anything in `opts`.
Expand All @@ -18,7 +18,7 @@ defmodule Surface.Components.Form.Reset do
use Surface.Component
use Surface.Components.Events

import Phoenix.HTML.Form, only: [reset: 2]
import PhoenixHTMLHelpers.Form, only: [reset: 2]
import Surface.Components.Utils, only: [events_to_opts: 1]
import Surface.Components.Form.Utils

Expand Down
4 changes: 2 additions & 2 deletions lib/surface/components/form/search_input.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ defmodule Surface.Components.Form.SearchInput do
@moduledoc """
An input field that let the user enter **search** queries.
Provides a wrapper for Phoenix.HTML.Form's `search_input/3` function.
Provides a wrapper for PhoenixHTMLHelpers.Form's `search_input/3` function.
All options passed via `opts` will be sent to `search_input/3`, `value` and
`class` can be set directly and will override anything in `opts`.
Expand All @@ -17,7 +17,7 @@ defmodule Surface.Components.Form.SearchInput do

use Surface.Components.Form.Input

import Phoenix.HTML.Form, only: [search_input: 3]
import PhoenixHTMLHelpers.Form, only: [search_input: 3]
import Surface.Components.Utils, only: [events_to_opts: 1]
import Surface.Components.Form.Utils

Expand Down
4 changes: 2 additions & 2 deletions lib/surface/components/form/select.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ defmodule Surface.Components.Form.Select do
@moduledoc """
Defines a select.
Provides a wrapper for Phoenix.HTML.Form's `select/4` function.
Provides a wrapper for PhoenixHTMLHelpers.Form's `select/4` function.
All options passed via `opts` will be sent to `select/4`, `class` can
be set directly and will override anything in `opts`.
"""

use Surface.Component

import Phoenix.HTML.Form, only: [select: 4]
import PhoenixHTMLHelpers.Form, only: [select: 4]
import Surface.Components.Form.Utils

@doc "The form identifier"
Expand Down
4 changes: 2 additions & 2 deletions lib/surface/components/form/telephone_input.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ defmodule Surface.Components.Form.TelephoneInput do
@moduledoc """
An input field that let the user enter a **telephone number**.
Provides a wrapper for Phoenix.HTML.Form's `telephone_input/3` function.
Provides a wrapper for PhoenixHTMLHelpers.Form's `telephone_input/3` function.
All options passed via `opts` will be sent to `telephone_input/3`, `value`,
`pattern` and `class` can be set directly and will override anything in `opts`.
Expand All @@ -17,7 +17,7 @@ defmodule Surface.Components.Form.TelephoneInput do

use Surface.Components.Form.Input

import Phoenix.HTML.Form, only: [telephone_input: 3]
import PhoenixHTMLHelpers.Form, only: [telephone_input: 3]
import Surface.Components.Utils, only: [events_to_opts: 1]
import Surface.Components.Form.Utils

Expand Down
4 changes: 2 additions & 2 deletions lib/surface/components/form/text_input.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ defmodule Surface.Components.Form.TextInput do
@moduledoc """
An input field that let the user enter a **single-line text**.
Provides a wrapper for Phoenix.HTML.Form's `text_input/3` function.
Provides a wrapper for PhoenixHTMLHelpers.Form's `text_input/3` function.
All options passed via `opts` will be sent to `text_input/3`, `value` and
`class` can be set directly and will override anything in `opts`.
Expand All @@ -17,7 +17,7 @@ defmodule Surface.Components.Form.TextInput do

use Surface.Components.Form.Input

import Phoenix.HTML.Form, only: [text_input: 3]
import PhoenixHTMLHelpers.Form, only: [text_input: 3]
import Surface.Components.Utils, only: [events_to_opts: 1]
import Surface.Components.Form.Utils

Expand Down
4 changes: 2 additions & 2 deletions lib/surface/components/form/textarea.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ defmodule Surface.Components.Form.TextArea do
@moduledoc """
An input field that let the user enter a **multi-line** text.
Provides a wrapper for Phoenix.HTML.Form's `textarea/3` function.
Provides a wrapper for PhoenixHTMLHelpers.Form's `textarea/3` function.
All options passed via `opts` will be sent to `textarea/3`. Explicitly
defined properties like `value` and `class` can be set directly and will
Expand All @@ -17,7 +17,7 @@ defmodule Surface.Components.Form.TextArea do

use Surface.Components.Form.Input

import Phoenix.HTML.Form, only: [textarea: 3]
import PhoenixHTMLHelpers.Form, only: [textarea: 3]
import Surface.Components.Utils, only: [events_to_opts: 1]
import Surface.Components.Form.Utils

Expand Down
Loading

0 comments on commit f5a0714

Please sign in to comment.