playbook_ui 12.17.0 → 12.18.0.pre.alpha.PLAY785typeaheadts607

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) 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 +3 -0
  10. data/app/pb_kits/playbook/pb_lightbox/docs/_lightbox_compound_component.jsx +5 -1
  11. data/app/pb_kits/playbook/pb_lightbox/docs/_lightbox_current_photo.jsx +1 -1
  12. data/app/pb_kits/playbook/pb_lightbox/docs/_lightbox_custom_header.jsx +5 -1
  13. data/app/pb_kits/playbook/pb_lightbox/docs/_lightbox_default.jsx +5 -1
  14. data/app/pb_kits/playbook/pb_lightbox/docs/_lightbox_default.md +1 -1
  15. data/app/pb_kits/playbook/pb_lightbox/docs/_lightbox_multiple.jsx +5 -1
  16. data/app/pb_kits/playbook/pb_lightbox/lightbox.test.jsx +5 -1
  17. data/app/pb_kits/playbook/pb_nav/_item.tsx +6 -6
  18. data/app/pb_kits/playbook/pb_nav/_nav.tsx +4 -4
  19. data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/EditorButton.tsx +49 -0
  20. data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/EditorTypes.ts +9 -0
  21. data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/Toolbar.tsx +62 -0
  22. data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarDropdown.tsx +139 -0
  23. data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarHistory.tsx +45 -0
  24. data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarNodes.tsx +59 -0
  25. data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.scss +1 -1
  26. data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.tsx +28 -12
  27. data/app/pb_kits/playbook/pb_rich_text_editor/_tiptap_styles.scss +231 -0
  28. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_description.md +1 -0
  29. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_default.jsx +36 -0
  30. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_default.md +4 -0
  31. data/app/pb_kits/playbook/pb_rich_text_editor/docs/example.yml +1 -0
  32. data/app/pb_kits/playbook/pb_rich_text_editor/docs/index.js +1 -0
  33. data/app/pb_kits/playbook/pb_time_range_inline/_time_range_inline.tsx +185 -0
  34. data/app/pb_kits/playbook/pb_time_range_inline/time_range_inline.test.js +85 -0
  35. data/app/pb_kits/playbook/pb_title/_title.tsx +1 -1
  36. data/app/pb_kits/playbook/pb_title_detail/_title_detail.tsx +45 -0
  37. data/app/pb_kits/playbook/pb_title_detail/title_detail.test.js +71 -0
  38. data/app/pb_kits/playbook/pb_toggle/{_toggle.jsx → _toggle.tsx} +20 -22
  39. data/app/pb_kits/playbook/pb_toggle/toggle.test.js +67 -0
  40. data/app/pb_kits/playbook/pb_tooltip/_tooltip.scss +11 -6
  41. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_default.html.erb +4 -4
  42. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_with_icon_circle.html.erb +1 -2
  43. data/app/pb_kits/playbook/pb_tooltip/docs/example.yml +0 -1
  44. data/app/pb_kits/playbook/pb_typeahead/{_typeahead.jsx → _typeahead.tsx} +22 -12
  45. data/app/pb_kits/playbook/pb_typeahead/components/{ClearIndicator.jsx → ClearIndicator.tsx} +2 -4
  46. data/app/pb_kits/playbook/pb_typeahead/components/{Control.jsx → Control.tsx} +5 -7
  47. data/app/pb_kits/playbook/pb_typeahead/components/{IndicatorsContainer.jsx → IndicatorsContainer.tsx} +2 -4
  48. data/app/pb_kits/playbook/pb_typeahead/components/{MenuList.jsx → MenuList.tsx} +0 -2
  49. data/app/pb_kits/playbook/pb_typeahead/components/MultiValue.tsx +66 -0
  50. data/app/pb_kits/playbook/pb_typeahead/components/Option.tsx +37 -0
  51. data/app/pb_kits/playbook/pb_typeahead/components/{Placeholder.jsx → Placeholder.tsx} +7 -9
  52. data/app/pb_kits/playbook/pb_typeahead/components/{ValueContainer.jsx → ValueContainer.tsx} +3 -5
  53. data/app/pb_kits/playbook/pb_typeahead/{index.js → index.ts} +37 -29
  54. data/app/pb_kits/playbook/pb_typeahead/types.d.ts +2 -0
  55. data/app/pb_kits/playbook/pb_user/_user.tsx +2 -2
  56. data/lib/playbook/markdown/helper.rb +50 -71
  57. data/lib/playbook/markdown.rb +0 -1
  58. data/lib/playbook/number_spacing.rb +10 -10
  59. data/lib/playbook/position.rb +10 -10
  60. data/lib/playbook/spacing.rb +10 -10
  61. data/lib/playbook/version.rb +2 -2
  62. data/lib/playbook/z_index.rb +10 -10
  63. metadata +36 -24
  64. data/app/pb_kits/playbook/pb_time_range_inline/_time_range_inline.jsx +0 -172
  65. data/app/pb_kits/playbook/pb_title_detail/_title_detail.jsx +0 -44
  66. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_white.html.erb +0 -9
  67. data/app/pb_kits/playbook/pb_typeahead/components/MultiValue.jsx +0 -62
  68. data/app/pb_kits/playbook/pb_typeahead/components/Option.jsx +0 -39
  69. 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