diff --git a/examples/official-site/content/components/button.md b/examples/official-site/content/components/button.md new file mode 100644 index 000000000..0ecc6a912 --- /dev/null +++ b/examples/official-site/content/components/button.md @@ -0,0 +1,81 @@ +--- +icon: hand-click +since: 0.14.0 +category: forms-and-feedback +summary: Follow a link, download a file, or submit a form. +top: + - class + - name: justify + type: TEXT + description: The horizontal alignment of the button list (e.g., start, end, center, between). + - name: shape + type: TEXT + description: Shape of the buttons (e.g., pill, square) + - name: size + type: TEXT + description: The size of the buttons (e.g., sm, lg). +row: + - name: color + type: COLOR + description: The color of the button (e.g., red, green, blue, but also primary, warning, danger, etc.). + Only base color names are supported, not variations like "blue-lt" or "gray-300". Use a custom CSS stylesheet + to further customize the colors. + - name: disabled + type: BOOLEAN + description: Whether the button is disabled or not. + - name: download + type: TEXT + description: If defined, the link will download the target instead of navigating to it. Set the value to + the desired name of the downloaded file. + - name: form + type: TEXT + description: Identifier (id) of the form to which the button should submit. + - name: icon + type: ICON + description: Name of an icon to be displayed on the left side of the button. + - name: icon_after + type: ICON + description: Name of an icon to display after the text in the button + - name: id + type: TEXT + description: HTML Identifier to add to the button element. + - name: image + type: TEXT + description: Path to image file (relative. relative to web root or URL) to be displayed on the button. + - name: image_alt + type: TEXT + description: Alternative text for an informative button image. Leave empty if decorative or repeated by the button title. + - name: link + type: URL + description: The URL to which the button should navigate when clicked. If the form attribute is specified, + then this overrides the page to which the form is submitted. + - name: modal + type: TEXT + description: Display the modal window corresponding to the specified ID. + - name: narrow + type: BOOLEAN + description: Whether to trim horizontal padding. + - name: outline + type: COLOR + description: Outline color of the button (e.g. red, purple, ...) + - name: rel + type: TEXT + description: '"nofollow" when the contents of the target link are not endorsed, "noopener" when the target + is not trusted, and "noreferrer" to hide where the user came from when they open the link.' + - name: space_after + type: BOOLEAN + description: Whether there should be extra space to the right of the button. In a line of buttons, this + will put the buttons before this one on the left, and the ones after on the right. + - name: target + type: TEXT + description: '"_blank" to open the link in a new tab, "_self" to open it in the same tab, "_parent" to + open it in the parent frame, or "_top" to open it in the full body of the window.' + - name: title + type: TEXT + description: The text displayed on the button. + - name: tooltip + type: TEXT + description: Text displayed when the user hovers over the button. +--- + +Displays one or more buttons that follow links, download files, or submit a form. diff --git a/examples/official-site/content/components/button/examples/01-basic.md b/examples/official-site/content/components/button/examples/01-basic.md new file mode 100644 index 000000000..25baa56fb --- /dev/null +++ b/examples/official-site/content/components/button/examples/01-basic.md @@ -0,0 +1,11 @@ +--- +rows: + - component: button + - link: /documentation.sql + title: Enabled + - link: '#' + title: Disabled + disabled: true +--- + +A basic button with a link diff --git a/examples/official-site/content/components/button/examples/02-shape-and-color.md b/examples/official-site/content/components/button/examples/02-shape-and-color.md new file mode 100644 index 000000000..b8e1891cb --- /dev/null +++ b/examples/official-site/content/components/button/examples/02-shape-and-color.md @@ -0,0 +1,14 @@ +--- +rows: + - component: button + size: sm + shape: pill + - title: Purple + outline: purple + - title: Orange + outline: orange + - title: Red + outline: red +--- + +A button with a custom shape, size, and outline color diff --git a/examples/official-site/content/components/button/examples/03-centered.md b/examples/official-site/content/components/button/examples/03-centered.md new file mode 100644 index 000000000..f6f832792 --- /dev/null +++ b/examples/official-site/content/components/button/examples/03-centered.md @@ -0,0 +1,25 @@ +--- +rows: + - component: button + justify: center + - link: '#' + color: light + title: Light + - link: '#' + color: success + title: Success + - link: '#' + color: info + title: Info + - link: '#' + color: dark + title: Dark + - link: '#' + color: warning + title: Warning + - link: '#' + color: danger + title: Narrow +--- + +A list of buttons aligned in the center diff --git a/examples/official-site/content/components/button/examples/04-narrow.md b/examples/official-site/content/components/button/examples/04-narrow.md new file mode 100644 index 000000000..0fadda248 --- /dev/null +++ b/examples/official-site/content/components/button/examples/04-narrow.md @@ -0,0 +1,46 @@ +--- +rows: + - component: button + - link: '#' + narrow: true + icon: edit + color: primary + tooltip: Edit + - link: '#' + narrow: true + icon: trash + color: danger + tooltip: Delete + - link: '#' + narrow: true + icon: corner-down-right + color: info + tooltip: Preview + - link: '#' + narrow: true + icon: download + color: success + tooltip: Download + - link: '#' + narrow: true + icon: upload + color: warning + tooltip: Upload + - link: '#' + narrow: true + icon: info-circle + color: cyan + tooltip: Info + - link: '#' + narrow: true + icon: help-circle + color: purple + tooltip: Help + - link: '#' + narrow: true + icon: settings + color: indigo + tooltip: Settings +--- + +Icon buttons using the narrow property diff --git a/examples/official-site/content/components/button/examples/05-icons.md b/examples/official-site/content/components/button/examples/05-icons.md new file mode 100644 index 000000000..c1c3ce94a --- /dev/null +++ b/examples/official-site/content/components/button/examples/05-icons.md @@ -0,0 +1,15 @@ +--- +rows: + - component: button + size: lg + - link: '#' + outline: azure + title: Edit + icon: edit + - link: '#' + outline: danger + title: Delete + icon: trash +--- + +Buttons with icons and different sizes diff --git a/examples/official-site/content/components/button/examples/06-square.md b/examples/official-site/content/components/button/examples/06-square.md new file mode 100644 index 000000000..b705ff25f --- /dev/null +++ b/examples/official-site/content/components/button/examples/06-square.md @@ -0,0 +1,20 @@ +--- +rows: + - component: button + shape: square + - link: '#' + color: green + title: Save + icon: device-floppy + - link: '#' + title: Cancel + space_after: true + tooltip: This will delete your draft + - link: '#' + outline: indigo + title: Preview + icon_after: corner-down-right + tooltip: View temporary draft +--- + +A row of square buttons with spacing in between diff --git a/examples/official-site/content/components/button/examples/07-form-actions.md b/examples/official-site/content/components/button/examples/07-form-actions.md new file mode 100644 index 000000000..c8aee4e7d --- /dev/null +++ b/examples/official-site/content/components/button/examples/07-form-actions.md @@ -0,0 +1,25 @@ +--- +rows: + - component: form + id: poem + validate: '' + - type: textarea + name: Poem + placeholder: Write a poem + - component: button + - link: ?action=save + form: poem + color: primary + title: Save + - link: ?action=preview + form: poem + outline: yellow + title: Preview +--- + +Multiple buttons sending the same form to different pages. + +We use `'' AS validate` to remove the submit button from inside the form itself, +and instead use the button component to submit the form to pages with different GET variables. + +In the target page, we could then use the GET variable `$action` to determine what to do with the form data. diff --git a/examples/official-site/content/components/button/examples/08-download.md b/examples/official-site/content/components/button/examples/08-download.md new file mode 100644 index 000000000..68bdf46c4 --- /dev/null +++ b/examples/official-site/content/components/button/examples/08-download.md @@ -0,0 +1,11 @@ +--- +rows: + - component: button + - link: /sqlpage_introduction_video.mp4 + title: Download Video + icon: download + download: Introduction Video.webm + rel: nofollow +--- + +A button that downloads a file when clicked, and prevents search engines from following the link. diff --git a/examples/official-site/content/components/button/examples/09-image.md b/examples/official-site/content/components/button/examples/09-image.md new file mode 100644 index 000000000..4420566b6 --- /dev/null +++ b/examples/official-site/content/components/button/examples/09-image.md @@ -0,0 +1,9 @@ +--- +rows: + - component: button + - link: https://en.wikipedia.org/wiki/File:Globe.svg + title: Open an article + image: https://upload.wikimedia.org/wikipedia/commons/f/fa/Globe.svg +--- + +A button with an image-based icon. diff --git a/examples/official-site/content/components/modal.md b/examples/official-site/content/components/modal.md new file mode 100644 index 000000000..59fc9f397 --- /dev/null +++ b/examples/official-site/content/components/modal.md @@ -0,0 +1,67 @@ +--- +icon: app-window +since: 0.36.0 +category: forms-and-feedback +summary: Open a dialog over the page for details, forms, or media. +top: + - name: allow + type: TEXT + description: For embedded content, this attribute specifies the features or permissions that can be used. + - name: class + type: TEXT + description: Class attribute added to the container in HTML. It can be used to apply custom styling to + this item through css. + - name: close + type: TEXT + description: The text to display in the Close button. + - name: close_label + type: TEXT + description: The same as `close`. Use it on databases where `close` is a reserved word, such as SQL Server. + - name: embed + type: TEXT + description: Embed remote content in an iframe. + - name: embed_mode + type: TEXT + description: Use "iframe" to display embedded content within an iframe. + - name: height + type: INTEGER + description: Height of the modal content, in pixels. Overflow content scrolls. + - name: id + type: TEXT + required: true + description: ID attribute added to the container in HTML. It can be used to target this item through css + or for displaying this item. + - name: large + type: BOOLEAN + description: Indicates that the modal box has an increased width. + - name: sandbox + type: TEXT + description: For embedded content, this attribute specifies the security restrictions on the loaded content. + - name: scrollable + type: BOOLEAN + description: Create a scrollable modal that allows scroll the modal body. + - name: small + type: BOOLEAN + description: Indicates that the modal box has a reduced width. + - name: style + type: TEXT + description: Applies CSS styles to the embedded content. + - name: title + type: TEXT + required: true + description: Description of the modal box. +row: + - name: contents + type: TEXT + description: A paragraph of text to display, without any formatting, without having to make additional + queries. + - name: contents_md + type: TEXT + description: Rich text in the markdown format. Among others, this allows you to write bold text using `**bold**`, + italics using `*italics*`, and links using `[text](https://example.com)`. +--- + +Defines the a temporary popup box displayed on top of a webpage’s content. +Useful for displaying additional information, help, or collect data from users. + +Modals are closed by default, and can be opened by clicking on a button or link targeting their ID. diff --git a/examples/official-site/content/components/modal/examples/01-text.md b/examples/official-site/content/components/modal/examples/01-text.md new file mode 100644 index 000000000..ef4092e6c --- /dev/null +++ b/examples/official-site/content/components/modal/examples/01-text.md @@ -0,0 +1,13 @@ +--- +rows: + - component: modal + id: my_modal + title: A modal box + close: Close + - contents: I'm a modal window, and I allow you to display additional information or help for the user. + - component: button + - title: Open a simple modal + link: '#my_modal' +--- + +This example shows how to create a modal box that displays a paragraph of text. The modal window is opened with the help of a button. diff --git a/examples/official-site/content/components/modal/examples/02-form.md b/examples/official-site/content/components/modal/examples/02-form.md new file mode 100644 index 000000000..9282d95a6 --- /dev/null +++ b/examples/official-site/content/components/modal/examples/02-form.md @@ -0,0 +1,13 @@ +--- +rows: + - component: modal + id: my_embed_form_modal + title: Embedded form + large: true + embed: /examples/form.sql + - component: button + - title: Open a modal with a form + link: '#my_embed_form_modal' +--- + +The button opens the dialog by its `id`. `embed` loads the form from another SQLPage file without its surrounding page shell. diff --git a/examples/official-site/content/components/modal/examples/03-chart.md b/examples/official-site/content/components/modal/examples/03-chart.md new file mode 100644 index 000000000..2185f46f1 --- /dev/null +++ b/examples/official-site/content/components/modal/examples/03-chart.md @@ -0,0 +1,19 @@ +--- +rows: + - component: modal + id: my_embed_chart_modal + title: Embeded chart content + close: Close + embed: /examples/chart.sql?_sqlpage_embed + - component: datagrid + - title: Chart + color: blue + description: Revenue + link: '#my_embed_chart_modal' + - title: Form + color: green + description: Fill info + link: '#my_embed_form_modal' +--- + +A popup modal that contains a chart generated by a separate SQL file. The modal is triggered by links inside a datagrid. diff --git a/examples/official-site/content/components/modal/examples/04-video.md b/examples/official-site/content/components/modal/examples/04-video.md new file mode 100644 index 000000000..c73372895 --- /dev/null +++ b/examples/official-site/content/components/modal/examples/04-video.md @@ -0,0 +1,15 @@ +--- +rows: + - component: modal + id: my_embed_video_modal + title: Embeded video content + close: Close + embed: https://www.youtube.com/embed/mXdgmSdaXkg + allow: accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share + embed_mode: iframe + height: '350' + - component: text + contents_md: Open a [modal with a video](#my_embed_video_modal) +--- + +Example of modal video content diff --git a/examples/official-site/sqlpage/migrations/18_button.sql b/examples/official-site/sqlpage/migrations/18_button.sql deleted file mode 100644 index 4cfd80e88..000000000 --- a/examples/official-site/sqlpage/migrations/18_button.sql +++ /dev/null @@ -1,122 +0,0 @@ --- Button Component Documentation - --- Component Definition -INSERT INTO component(name, icon, description, introduced_in_version) VALUES - ('button', 'hand-click', 'Displays one or more buttons that follow links, download files, or submit a form.', '0.14.0'); - --- Inserting parameter information for the button component -INSERT INTO parameter(component, name, description, type, top_level, optional) SELECT 'button', * FROM (VALUES - -- Top-level parameters (for the whole button list) - ('justify', 'The horizontal alignment of the button list (e.g., start, end, center, between).', 'TEXT', TRUE, TRUE), - ('size', 'The size of the buttons (e.g., sm, lg).', 'TEXT', TRUE, TRUE), - ('shape', 'Shape of the buttons (e.g., pill, square)', 'TEXT', TRUE, TRUE), - -- Item-level parameters (for each button) - ('link', 'The URL to which the button should navigate when clicked. If the form attribute is specified, then this overrides the page to which the form is submitted.', 'URL', FALSE, TRUE), - ('color', 'The color of the button (e.g., red, green, blue, but also primary, warning, danger, etc.). Only base color names are supported, not variations like "blue-lt" or "gray-300". Use a custom CSS stylesheet to further customize the colors.', 'COLOR', FALSE, TRUE), - ('title', 'The text displayed on the button.', 'TEXT', FALSE, TRUE), - ('tooltip', 'Text displayed when the user hovers over the button.', 'TEXT', FALSE, TRUE), - ('disabled', 'Whether the button is disabled or not.', 'BOOLEAN', FALSE, TRUE), - ('outline', 'Outline color of the button (e.g. red, purple, ...)', 'COLOR', FALSE, TRUE), - ('space_after', 'Whether there should be extra space to the right of the button. In a line of buttons, this will put the buttons before this one on the left, and the ones after on the right.', 'BOOLEAN', FALSE, TRUE), - ('icon_after', 'Name of an icon to display after the text in the button', 'ICON', FALSE, TRUE), - ('icon', 'Name of an icon to be displayed on the left side of the button.', 'ICON', FALSE, TRUE), - ('image', 'Path to image file (relative. relative to web root or URL) to be displayed on the button.', 'TEXT', FALSE, TRUE), - ('narrow', 'Whether to trim horizontal padding.', 'BOOLEAN', FALSE, TRUE), - ('form', 'Identifier (id) of the form to which the button should submit.', 'TEXT', FALSE, TRUE), - ('rel', '"nofollow" when the contents of the target link are not endorsed, "noopener" when the target is not trusted, and "noreferrer" to hide where the user came from when they open the link.', 'TEXT', FALSE, TRUE), - ('target', '"_blank" to open the link in a new tab, "_self" to open it in the same tab, "_parent" to open it in the parent frame, or "_top" to open it in the full body of the window.', 'TEXT', FALSE, TRUE), - ('download', 'If defined, the link will download the target instead of navigating to it. Set the value to the desired name of the downloaded file.', 'TEXT', FALSE, TRUE), - ('id', 'HTML Identifier to add to the button element.', 'TEXT', FALSE, TRUE) -) x; - --- Inserting example information for the button component -INSERT INTO example(component, description, properties) VALUES - ('button', 'A basic button with a link', - json('[{"component":"button"}, {"link":"/documentation.sql", "title":"Enabled"}, {"link":"#", "title":"Disabled", "disabled":true}]')) -; - - -INSERT INTO example(component, description, properties) VALUES - ('button', 'A button with a custom shape, size, and outline color', - json('[{"component":"button", "size":"sm", "shape":"pill" }, - {"title":"Purple", "outline":"purple" }, - {"title":"Orange", "outline":"orange" }, - {"title":"Red", "outline":"red" }]') - ); - -INSERT INTO example(component, description, properties) VALUES - ('button', 'A list of buttons aligned in the center', - json('[{"component":"button", "justify":"center"}, - {"link":"#", "color":"light", "title":"Light"}, - {"link":"#", "color":"success", "title":"Success"}, - {"link":"#", "color":"info", "title":"Info"}, - {"link":"#", "color":"dark", "title":"Dark"}, - {"link":"#", "color":"warning", "title":"Warning"}, - {"link":"#", "color":"danger", "title":"Narrow"}]') - ); - -INSERT INTO example(component, description, properties) VALUES - ('button', 'Icon buttons using the narrow property', - json('[{"component":"button"}, - {"link":"#", "narrow":true, "icon":"edit", "color":"primary", "tooltip":"Edit" }, - {"link":"#", "narrow":true, "icon":"trash", "color":"danger", "tooltip":"Delete" }, - {"link":"#", "narrow":true, "icon":"corner-down-right", "color":"info", "tooltip":"Preview" }, - {"link":"#", "narrow":true, "icon":"download", "color":"success", "tooltip":"Download" }, - {"link":"#", "narrow":true, "icon":"upload", "color":"warning", "tooltip":"Upload" }, - {"link":"#", "narrow":true, "icon":"info-circle", "color":"cyan", "tooltip":"Info" }, - {"link":"#", "narrow":true, "icon":"help-circle", "color":"purple", "tooltip":"Help" }, - {"link":"#", "narrow":true, "icon":"settings", "color":"indigo", "tooltip":"Settings" }]') - ); - -INSERT INTO example(component, description, properties) VALUES - ('button', 'Buttons with icons and different sizes', - json('[{"component":"button", "size":"lg" }, - {"link":"#", "outline":"azure", "title":"Edit", "icon":"edit"}, - {"link":"#", "outline":"danger", "title":"Delete", "icon":"trash"}]') - ); - -INSERT INTO example(component, description, properties) VALUES - ('button', 'A row of square buttons with spacing in between', - json('[{"component":"button", "shape":"square"}, - {"link":"#", "color":"green", "title":"Save", "icon": "device-floppy" }, - {"link":"#", "title":"Cancel", "space_after":true, "tooltip": "This will delete your draft"}, - {"link":"#", "outline":"indigo", "title":"Preview", "icon_after": "corner-down-right", "tooltip": "View temporary draft" }]') - ); - -INSERT INTO example(component, description, properties) VALUES - ('button', 'Multiple buttons sending the same form to different pages. - -We use `'''' AS validate` to remove the submit button from inside the form itself, -and instead use the button component to submit the form to pages with different GET variables. - -In the target page, we could then use the GET variable `$action` to determine what to do with the form data. - ', - json('[{"component":"form", "id": "poem", "validate": ""}, - {"type": "textarea", "name": "Poem", "placeholder": "Write a poem"}, - {"component":"button"}, - {"link":"?action=save", "form":"poem", "color":"primary", "title":"Save" }, - {"link":"?action=preview", "form":"poem", "outline":"yellow", "title":"Preview" }]') - ); - -INSERT INTO example(component, description, properties) VALUES - ('button', 'A button that downloads a file when clicked, and prevents search engines from following the link.', - json('[{"component":"button"}, - {"link":"/sqlpage_introduction_video.mp4", - "title":"Download Video", - "icon":"download", - "download":"Introduction Video.webm", - "rel":"nofollow" - }]') - ); - -INSERT INTO example(component, description, properties) VALUES - ('button', 'A button with an image-based icon.', - json('[{"component":"button"}, - {"link":"https://en.wikipedia.org/wiki/File:Globe.svg", - "title":"Open an article", - "image":"https://upload.wikimedia.org/wikipedia/commons/f/fa/Globe.svg" - }]') - ); - -INSERT INTO parameter(component, name, description, type, top_level, optional) VALUES - ('button', 'image_alt', 'Alternative text for an informative button image. Leave empty if decorative or repeated by the button title.', 'TEXT', FALSE, TRUE); diff --git a/examples/official-site/sqlpage/migrations/63_modal.sql b/examples/official-site/sqlpage/migrations/63_modal.sql deleted file mode 100644 index 0d03337ec..000000000 --- a/examples/official-site/sqlpage/migrations/63_modal.sql +++ /dev/null @@ -1,85 +0,0 @@ -INSERT INTO component(name, icon, description, introduced_in_version) VALUES - ('modal', 'app-window', ' -Defines the a temporary popup box displayed on top of a webpage’s content. -Useful for displaying additional information, help, or collect data from users. - -Modals are closed by default, and can be opened by clicking on a button or link targeting their ID.', '0.36.0'); - -INSERT INTO parameter(component, name, description, type, top_level, optional) SELECT 'modal', * FROM (VALUES - ('title','Description of the modal box.','TEXT',TRUE,FALSE), - ('close','The text to display in the Close button.','TEXT',TRUE,TRUE), - ('close_label','The same as `close`. Use it on databases where `close` is a reserved word, such as SQL Server.','TEXT',TRUE,TRUE), - ('contents','A paragraph of text to display, without any formatting, without having to make additional queries.','TEXT',FALSE,TRUE), - ('contents_md','Rich text in the markdown format. Among others, this allows you to write bold text using `**bold**`, italics using `*italics*`, and links using `[text](https://example.com)`.','TEXT',FALSE,TRUE), - ('scrollable','Create a scrollable modal that allows scroll the modal body.','BOOLEAN',TRUE,TRUE), - ('class','Class attribute added to the container in HTML. It can be used to apply custom styling to this item through css.','TEXT',TRUE,TRUE), - ('id','ID attribute added to the container in HTML. It can be used to target this item through css or for displaying this item.','TEXT',TRUE,FALSE), - ('large','Indicates that the modal box has an increased width.','BOOLEAN',TRUE,TRUE), - ('small','Indicates that the modal box has a reduced width.','BOOLEAN',TRUE,TRUE), - ('embed','Embed remote content in an iframe.','TEXT',TRUE,TRUE), - ('embed_mode','Use "iframe" to display embedded content within an iframe.','TEXT',TRUE,TRUE), - ('height','Height of the modal content, in pixels. Overflow content scrolls.','INTEGER',TRUE,TRUE), - ('allow','For embedded content, this attribute specifies the features or permissions that can be used.','TEXT',TRUE,TRUE), - ('sandbox','For embedded content, this attribute specifies the security restrictions on the loaded content.','TEXT',TRUE,TRUE), - ('style','Applies CSS styles to the embedded content.','TEXT',TRUE,TRUE) -) x; - -INSERT INTO example(component, description, properties) VALUES - ('modal', - 'This example shows how to create a modal box that displays a paragraph of text. The modal window is opened with the help of a button.', - json('[ - {"component": "modal","id": "my_modal","title": "A modal box","close": "Close"}, - {"contents":"I''m a modal window, and I allow you to display additional information or help for the user."}, - {"component": "button"}, - {"title":"Open a simple modal","link":"#my_modal"} - ]') - ), - ('modal', - 'The button opens the dialog by its `id`. `embed` loads the form from another SQLPage file without its surrounding page shell.', - json('[ - { - "component":"modal", - "id":"my_embed_form_modal", - "title":"Embedded form", - "large":true, - "embed":"/examples/form.sql" - }, - {"component": "button"}, - {"title":"Open a modal with a form","link":"#my_embed_form_modal"} - ]') - ), - ('modal', - 'A popup modal that contains a chart generated by a separate SQL file. The modal is triggered by links inside a datagrid.', - json('[ - { - "component":"modal", - "id":"my_embed_chart_modal", - "title":"Embeded chart content", - "close":"Close", - "embed":"/examples/chart.sql?_sqlpage_embed" - }, - {"component": "datagrid"}, - {"title":"Chart", "color":"blue", "description":"Revenue", "link":"#my_embed_chart_modal"}, - {"title":"Form", "color":"green", "description":"Fill info", "link":"#my_embed_form_modal"}, - ]') - ), - ('modal', - 'Example of modal video content', - json('[ - { - "component":"modal", - "id":"my_embed_video_modal", - "title":"Embeded video content", - "close":"Close", - "embed":"https://www.youtube.com/embed/mXdgmSdaXkg", - "allow":"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share", - "embed_mode":"iframe", - "height":"350" - }, - {"component": "text", "contents_md": "Open a [modal with a video](#my_embed_video_modal)"} - ]') - ); - -INSERT INTO parameter(component, name, description, type, top_level, optional) SELECT 'button', * FROM (VALUES - ('modal','Display the modal window corresponding to the specified ID.','TEXT',FALSE,TRUE) -) x; diff --git a/examples/official-site/sqlpage/migrations/82_reference_catalog.sql b/examples/official-site/sqlpage/migrations/82_reference_catalog.sql index 07a2787f9..f875ef567 100644 --- a/examples/official-site/sqlpage/migrations/82_reference_catalog.sql +++ b/examples/official-site/sqlpage/migrations/82_reference_catalog.sql @@ -37,8 +37,6 @@ WITH copy(name, category, summary) AS (VALUES ('timeline', 'display-data', 'Arrange events along a vertical timeline.'), ('tracking', 'display-data', 'Show a sequence of activity or status changes as colored segments.'), - ('button', 'forms-and-feedback', 'Follow a link, download a file, or submit a form.'), - ('modal', 'forms-and-feedback', 'Open a dialog over the page for details, forms, or media.'), ('breadcrumb', 'navigation', 'Link the current page to its parent pages.'), ('facet', 'navigation', 'Let readers choose filters for a dataset.'), diff --git a/examples/official-site/sqlpage/migrations/99_shared_id_class_attributes.sql b/examples/official-site/sqlpage/migrations/99_shared_id_class_attributes.sql index 6710497ae..b745958cc 100644 --- a/examples/official-site/sqlpage/migrations/99_shared_id_class_attributes.sql +++ b/examples/official-site/sqlpage/migrations/99_shared_id_class_attributes.sql @@ -50,7 +50,6 @@ FROM (VALUES ('big_number', TRUE), ('big_number', FALSE), ('breadcrumb', TRUE), - ('button', TRUE), ('card', TRUE), ('card', FALSE), ('chart', TRUE),