playbook_ui_docs 16.7.0.pre.alpha.PLAY2868datadefaultvalues16201 → 16.7.0.pre.alpha.PLAY2928removetrix16285

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fd3b4384199fc489de181144c596e8ab96b29bd0c9659cfd607709398e3cab37
4
- data.tar.gz: 52c93dd0f35e997b78a877bb7723f9146101c41c230c27089ff8f898d893a3e2
3
+ metadata.gz: f710813998b751c1d9e7fa43f69f4e90742a4427607bcf5c76ce95d87dca7163
4
+ data.tar.gz: 17f516a4294188f4277ef770edb838ee613afab69de9d964356ad7a351e559a5
5
5
  SHA512:
6
- metadata.gz: 47c1bb3cb9a5c2b858bb168b831df9708440d3374042f4611e34073538eefc4163ff6c65538f4fde1f379455ae1c326ba486d4b4a717e8cde0830f09faf0be7b
7
- data.tar.gz: '0951dcac0e906ac6f122aef295801fafd51651278a590b4bf3b6ef5cd78c9ed8e17927b8701fc768847468d9a52f6ddeef7ca830a1915bc39513977e2ac27c5d'
6
+ metadata.gz: b1932acddb901417e12c2e7fd8519bada67581cd5311b736e3a37fc7e815c0e343ec4d381e0cae1fe0194c8c974001e6678027cd660cc2ab240ea9d4a40f9d8c
7
+ data.tar.gz: c41c1e14a0eee2b74a8d1742943e75a03937a920b9195b58603966732726ee240716dd3c465a136cf800a77250f9716479b48f0614e87066dcfae24b5b3418f8
@@ -1,6 +1,4 @@
1
1
  <%= pb_rails("date_picker", props: {
2
- classname: "inline-date-picker",
3
- hide_icon: true,
4
2
  inline: true,
5
3
  picker_id: "date-picker-inline"
6
4
  }) %>
@@ -6,8 +6,6 @@ const DatePickerInline = (props) => {
6
6
  return (
7
7
  <div>
8
8
  <DatePicker
9
- className="inline-date-picker"
10
- hideIcon
11
9
  inLine
12
10
  pickerId="date-picker-inline"
13
11
  {...props}
@@ -113,9 +113,7 @@
113
113
  "name": "inline_date",
114
114
  "pickerId": "playground-date-inline",
115
115
  "label": "Inline",
116
- "className": "inline-date-picker",
117
- "inLine": true,
118
- "hideIcon": true
116
+ "inLine": true
119
117
  }
120
118
  },
121
119
  {
@@ -88,9 +88,7 @@
88
88
  "name": "inline_date",
89
89
  "pickerId": "playground-date-inline",
90
90
  "label": "Inline",
91
- "className": "inline-date-picker",
92
- "inLine": true,
93
- "hideIcon": true
91
+ "inLine": true
94
92
  }
95
93
  },
96
94
  {
@@ -0,0 +1 @@
1
+ <%= pb_rails("rich_text_editor", props: { input_options: { id: 'hidden_input_id', name: "hidden_input_name" }, value: "Add your text here. You can format your text, add links, quotes, and bullets." }) %>
@@ -0,0 +1,12 @@
1
+ The Rails rich text editor is a TipTap surface with no React. The UI (toolbar, block-style menu, formatting actions) is rendered with Playbook Rails kits (`pb_rails`). The editor document is a vanilla TipTap `Editor` instance; HTML is synced to a hidden `<input>` so standard Rails forms can submit the value.
2
+
3
+ ### How TipTap is loaded (Rails)
4
+
5
+ - The kit’s module script (`rich_text_editor_rails.js`) uses `import()` with **full URLs** on [esm.sh](https://esm.sh) (e.g. `@tiptap/core@2.8.0`). esm.sh resolves dependencies server-side, so **no `<script type="importmap">`** is required—this avoids conflicts when the host page already has an import map (e.g. Vite in dev, or another app map) because Firefox only applies one native map.
6
+ - You do not need TipTap in your app’s npm dependencies or Gemfile for this kit; the browser loads modules from esm.sh when the page runs.
7
+ - Ensure **CSP** allows loading scripts from `https://esm.sh` (and esm.sh’s redirected module URLs) if you use a strict `script-src` / `connect-src`.
8
+
9
+ ### Relation to the React implementation
10
+
11
+ - Same core: both use TipTap v2 on top of ProseMirror; styling lives in Playbook SCSS (`_tiptap_styles.scss`) so the editor chrome lines up between platforms.
12
+ - Different shell: Rails uses ERB + Playbook Rails components + inline module script. React uses `RichTextEditor` / `_tiptap_editor.tsx` and TipTap wired through the bundled Playbook React package—see Advanced Default for that stack and when you need TipTap installed in your JavaScript bundle.
@@ -0,0 +1,9 @@
1
+ <%= pb_rails("rich_text_editor", props: {
2
+ simple: true,
3
+ label: "Notes",
4
+ input_options: {
5
+ id: "rails_rte_simple_demo",
6
+ name: "content",
7
+ },
8
+ value: "<p>Use <strong>Bold</strong> and <em>Italic</em> from the toolbar.</p>",
9
+ }) %>
@@ -0,0 +1,8 @@
1
+ ### Simple toolbar (`simple: true`)
2
+
3
+ Pass **`simple: true`** for a compact toolbar: **Bold**, **Italic**, **Undo**, and **Redo** (same history controls as the full toolbar—plain buttons, not popovers).
4
+
5
+ - No block-style dropdown (no “Paragraph” / headings / lists in the menu).
6
+ - No **`pb_popover`** on the toolbar—useful in **native `<dialog>`** modals, turbo-loaded panels, or other tight layouts where the full block menu is awkward to position.
7
+
8
+ The underlying TipTap document still accepts the same HTML as the default Rails editor; `simple` only changes which **toolbar controls** are shown.
@@ -1,6 +1,8 @@
1
1
  examples:
2
2
 
3
3
  rails:
4
+ - rich_text_editor_rails_default: "Rails (TipTap)"
5
+ - rich_text_editor_rails_simple: "Rails (TipTap — Simple toolbar)"
4
6
 
5
7
  react:
6
8
  - rich_text_editor_advanced_default: Advanced Default
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: playbook_ui_docs
3
3
  version: !ruby/object:Gem::Version
4
- version: 16.7.0.pre.alpha.PLAY2868datadefaultvalues16201
4
+ version: 16.7.0.pre.alpha.PLAY2928removetrix16285
5
5
  platform: ruby
6
6
  authors:
7
7
  - Power UX
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2026-05-08 00:00:00.000000000 Z
12
+ date: 2026-05-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: playbook_ui
@@ -2140,6 +2140,10 @@ files:
2140
2140
  - app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_default.md
2141
2141
  - app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_more_extensions.jsx
2142
2142
  - app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_more_extensions.md
2143
+ - app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_rails_default.html.erb
2144
+ - app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_rails_default.md
2145
+ - app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_rails_simple.html.erb
2146
+ - app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_rails_simple.md
2143
2147
  - app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_toolbar_disabled.jsx
2144
2148
  - app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_toolbar_disabled.md
2145
2149
  - app/pb_kits/playbook/pb_rich_text_editor/docs/example.yml