Sha256: e9fbf05ae86f3f613f8b379ce8f8d59d9835fd7e74614557d15c7a2ceb638190

Contents?: true

Size: 1.98 KB

Versions: 220

Compression:

Stored size: 1.98 KB

Contents

<%= content_tag(:div,
    id: object.id,
    data: object.data,
    class: object.classname,
    aria: object.aria) do %>

  <% if object.size == "md" %>
    <!-- icon -->
    <% if object.show_icon %>
      <%= pb_rails("body", props: {
        color: "light",
        tag: "div",
      }) do %>
        <%= pb_rails("icon", props: { icon: "calendar-alt", fixed_width: true }) %>
      <% end %>
    <% end %>

    <!-- day_of_week -->
    <% if object.show_day_of_week %>
      <%= pb_rails("title", props: { tag: "div", text: object.day_of_week, size: 4 }) %>
      <%= pb_rails("body", props: {
        text: "•",
        color: "light",
        tag: "div",
      }) %>
    <% end %>

    <!-- month day, year -->

    <%# if not current year %>
    <% if object.year.to_s == DateTime.now.year.to_s %>
      <%= pb_rails("title", props: { tag: "div", text: "#{object.month} #{object.day}", size: 4 }) %>
    <%# if is current year %>
    <% else %>
      <%= pb_rails("title", props: { tag: "div", text: "#{object.month} #{object.day}, #{object.year}", size: 4 }) %>
    <% end %>

  <% else %>

    <!-- icon -->
    <% if object.show_icon %>
      <%= pb_rails("caption", props: {
        tag: "div",
      }) do %>
        <%= pb_rails("icon", props: { icon: "calendar-alt", fixed_width: true, size: "sm" }) %>
      <% end %>
    <% end %>

    <!-- day_of_week -->
    <% if object.show_day_of_week %>
      <%= pb_rails("caption", props: { tag: "div", text: object.day_of_week }) %>
      <%= pb_rails("caption", props: {
        text: "•",
        color: "light",
        tag: "div",
      }) %>
    <% end %>

    <!-- month day, year -->

    <%# if not current year %>
    <% if object.year.to_s == DateTime.now.year.to_s %>
      <%= pb_rails("caption", props: { tag: "span", text: "#{object.month} #{object.day}" }) %>
    <%# if is current year %>
    <% else %>
      <%= pb_rails("caption", props: { tag: "span", text: "#{object.month} #{object.day}, #{object.year}" }) %>
    <% end %>
  <% end %>
<% end %>

Version data entries

220 entries across 220 versions & 1 rubygems

Version Path
playbook_ui-12.14.0 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-12.13.0.pre.alpha.PLAY693tooltipwrongbg440 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-12.13.0.pre.alpha.addingProductTokens439 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-12.13.0.pre.alpha.PLAY705phonenumberkit438 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-12.13.0 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-12.12.0.pre.alpha.PLAY697sandpacklayoutstyles413 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-12.12.0 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-12.11.0 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-12.10.0.pre.alpha.PLAY705phonenumberreturn372 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-12.10.0.pre.alpha.PLAY677richtexteditorts370 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-12.10.0 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-12.9.1.pre.alpha.play664tiptapinvestigation353 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-12.9.1.pre.alpha.PLAY689bugtxtinputlabel346 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-12.9.1.pre.alpha.menucleanup345 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-12.9.1.pre.alpha.menucleanup342 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-12.9.1 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-12.9.0 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-12.8.0.pre.alpha.PLAY625phonenumberdark301 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-12.8.0.pre.alpha.PLAY625phonenumberdark300 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-12.8.0.pre.alpha.PLAY649mapkitstyles299 app/pb_kits/playbook/pb_date/date.html.erb