playbook_ui 12.17.1 → 12.18.0.pre.alpha.PLAY785typeaheadts608

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/index.js +1 -1
  3. data/app/pb_kits/playbook/pb_avatar_action_button/avatar_action_button.html.erb +1 -2
  4. data/app/pb_kits/playbook/pb_collapsible/_collapsible.tsx +2 -2
  5. data/app/pb_kits/playbook/pb_docs/kit_api.html.erb +48 -36
  6. data/app/pb_kits/playbook/pb_docs/kit_api.rb +97 -9
  7. data/app/pb_kits/playbook/pb_docs/kit_example.html.erb +1 -1
  8. data/app/pb_kits/playbook/pb_docs/kit_example.rb +9 -5
  9. data/app/pb_kits/playbook/pb_lightbox/_lightbox.tsx +8 -0
  10. data/app/pb_kits/playbook/pb_lightbox/docs/_lightbox_current_photo.jsx +121 -0
  11. data/app/pb_kits/playbook/pb_lightbox/docs/_lightbox_current_photo.md +1 -0
  12. data/app/pb_kits/playbook/pb_lightbox/docs/example.yml +1 -0
  13. data/app/pb_kits/playbook/pb_lightbox/docs/index.js +1 -0
  14. data/app/pb_kits/playbook/pb_nav/_item.tsx +6 -6
  15. data/app/pb_kits/playbook/pb_nav/_nav.tsx +4 -4
  16. data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/EditorButton.tsx +49 -0
  17. data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/EditorTypes.ts +9 -0
  18. data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/Toolbar.tsx +62 -0
  19. data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarDropdown.tsx +139 -0
  20. data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarHistory.tsx +45 -0
  21. data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarNodes.tsx +59 -0
  22. data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.scss +1 -1
  23. data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.tsx +28 -12
  24. data/app/pb_kits/playbook/pb_rich_text_editor/_tiptap_styles.scss +231 -0
  25. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_description.md +1 -0
  26. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_default.jsx +36 -0
  27. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_default.md +4 -0
  28. data/app/pb_kits/playbook/pb_rich_text_editor/docs/example.yml +1 -0
  29. data/app/pb_kits/playbook/pb_rich_text_editor/docs/index.js +1 -0
  30. data/app/pb_kits/playbook/pb_time_range_inline/_time_range_inline.tsx +185 -0
  31. data/app/pb_kits/playbook/pb_time_range_inline/time_range_inline.test.js +85 -0
  32. data/app/pb_kits/playbook/pb_title/_title.tsx +1 -1
  33. data/app/pb_kits/playbook/pb_title_detail/_title_detail.tsx +45 -0
  34. data/app/pb_kits/playbook/pb_title_detail/title_detail.test.js +71 -0
  35. data/app/pb_kits/playbook/pb_toggle/{_toggle.jsx → _toggle.tsx} +20 -22
  36. data/app/pb_kits/playbook/pb_toggle/toggle.test.js +67 -0
  37. data/app/pb_kits/playbook/pb_tooltip/_tooltip.scss +11 -6
  38. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_default.html.erb +4 -4
  39. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_with_icon_circle.html.erb +1 -2
  40. data/app/pb_kits/playbook/pb_tooltip/docs/example.yml +0 -1
  41. data/app/pb_kits/playbook/pb_typeahead/{_typeahead.jsx → _typeahead.tsx} +22 -12
  42. data/app/pb_kits/playbook/pb_typeahead/components/{ClearIndicator.jsx → ClearIndicator.tsx} +2 -4
  43. data/app/pb_kits/playbook/pb_typeahead/components/{Control.jsx → Control.tsx} +5 -7
  44. data/app/pb_kits/playbook/pb_typeahead/components/{IndicatorsContainer.jsx → IndicatorsContainer.tsx} +2 -4
  45. data/app/pb_kits/playbook/pb_typeahead/components/{MenuList.jsx → MenuList.tsx} +0 -2
  46. data/app/pb_kits/playbook/pb_typeahead/components/MultiValue.tsx +66 -0
  47. data/app/pb_kits/playbook/pb_typeahead/components/Option.tsx +37 -0
  48. data/app/pb_kits/playbook/pb_typeahead/components/{Placeholder.jsx → Placeholder.tsx} +7 -9
  49. data/app/pb_kits/playbook/pb_typeahead/components/{ValueContainer.jsx → ValueContainer.tsx} +3 -5
  50. data/app/pb_kits/playbook/pb_typeahead/{index.js → index.ts} +37 -29
  51. data/app/pb_kits/playbook/pb_typeahead/types.d.ts +2 -0
  52. data/app/pb_kits/playbook/pb_user/_user.tsx +2 -2
  53. data/lib/playbook/markdown/helper.rb +50 -71
  54. data/lib/playbook/markdown.rb +0 -1
  55. data/lib/playbook/number_spacing.rb +10 -10
  56. data/lib/playbook/position.rb +10 -10
  57. data/lib/playbook/spacing.rb +10 -10
  58. data/lib/playbook/version.rb +2 -2
  59. data/lib/playbook/z_index.rb +10 -10
  60. metadata +38 -24
  61. data/app/pb_kits/playbook/pb_time_range_inline/_time_range_inline.jsx +0 -172
  62. data/app/pb_kits/playbook/pb_title_detail/_title_detail.jsx +0 -44
  63. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_white.html.erb +0 -9
  64. data/app/pb_kits/playbook/pb_typeahead/components/MultiValue.jsx +0 -62
  65. data/app/pb_kits/playbook/pb_typeahead/components/Option.jsx +0 -39
  66. data/lib/playbook/markdown/template_handler.rb +0 -47
@@ -1,47 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "redcarpet"
4
-
5
- module Playbook
6
- module Markdown
7
- class HTMLWithPants < Redcarpet::Render::HTML
8
- include Redcarpet::Render::SmartyPants
9
- end
10
-
11
- class TemplateHandler
12
- class_attribute :default_format
13
- self.default_format = Mime[:html]
14
-
15
- class << self
16
- def call(template)
17
- compiled_source = erb.call(template)
18
- "#{name}.render(begin;#{compiled_source};end)"
19
- end
20
-
21
- def render(template)
22
- markdown.render(template).html_safe
23
- end
24
-
25
- private
26
-
27
- def md_options
28
- @md_options ||= {
29
- autolink: true,
30
- no_intra_emphasis: true,
31
- fenced_code_blocks: true,
32
- strikethrough: true,
33
- tables: true,
34
- }
35
- end
36
-
37
- def markdown
38
- @markdown ||= Redcarpet::Markdown.new(::Playbook::Markdown::HTMLWithPants, md_options)
39
- end
40
-
41
- def erb
42
- @erb ||= ActionView::Template.registered_template_handler(:erb)
43
- end
44
- end
45
- end
46
- end
47
- end