UNPKG

design-system-govbr-rnp

Version:

## Padrão Digital de Governo - React Biblioteca de componentes React que implementa o [Padrão Visual digital do governo](https://www.gov.br/ds/). O objetivo da biblioteca é facilitar a implementação e promover a padronização das interfaces de sistemas do

473 lines (472 loc) 11 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.ListHorizontalByExpansion = exports.ListHorizontal = exports.ListByExpansion = exports.GroupingsBySeparator = exports.GroupingsByLabel = exports.Density = exports.Default = void 0; var _react = _interopRequireDefault(require("react")); var _List = _interopRequireDefault(require("./List")); var _freeSolidSvgIcons = require("@fortawesome/free-solid-svg-icons"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var _default = { title: "Components/List", component: _List.default, argTypes: { type: { table: { disable: true } }, size: { name: "Tamanho", type: { name: "string" }, table: { type: { summary: "string" }, defaultValue: { summary: "medium" } }, control: { type: "select", options: ["medium", "low"] } }, title: { name: "Título", type: { name: "string" }, table: { type: { summary: "string" } } }, options: { name: "Opções", type: { name: "object" }, table: { type: { summary: "object" } } } } }; exports.default = _default; function Template(args) { return /*#__PURE__*/_react.default.createElement(_List.default, args); } var Default = Template.bind({}); exports.Default = Default; Default.storyName = "Lista Vertical"; Default.args = { type: "default", selectable: true, title: "Título (opcional)", options: [{ id: "ITEM 1", icon: _freeSolidSvgIcons.faHeartbeat, itemText: "ITEM Texto principal", itemTextFinally: "META", optionsCheckbox: { hidden: true, name: "item01", value: "item01" } }, { id: "ITEM 2", icon: _freeSolidSvgIcons.faHeartbeat, itemText: "ITEM Texto principal", itemTextFinally: "META", optionsCheckbox: { hidden: true, name: "item02", value: "item02" } }, { id: "ITEM 3", icon: _freeSolidSvgIcons.faHeartbeat, itemText: "ITEM Texto principal", itemTextFinally: "META", optionsCheckbox: { hidden: true, name: "item02", value: "item02" } }] }; var Density = Template.bind({}); exports.Density = Density; Density.storyName = "Lista Densidades"; Density.args = { type: "Density", title: "Por densidade", size: "medium", selectable: false, options: [{ id: "ITEM 1", icon: _freeSolidSvgIcons.faHeartbeat, itemText: "ITEM Texto principal", itemTextFinally: "META", optionsCheckbox: { hidden: true, name: "item01", value: "item01" } }, { id: "ITEM 2", icon: _freeSolidSvgIcons.faHeartbeat, itemText: "ITEM Texto principal", itemTextFinally: "META", optionsCheckbox: { hidden: true, name: "item02", value: "item02" } }, { id: "ITEM 3", icon: _freeSolidSvgIcons.faHeartbeat, itemText: "ITEM Texto principal", itemTextFinally: "META", optionsCheckbox: { hidden: true, name: "item03", value: "item03" } }] }; var GroupingsByLabel = Template.bind({}); exports.GroupingsByLabel = GroupingsByLabel; GroupingsByLabel.storyName = "Agrupamentos por rótulos"; GroupingsByLabel.args = { type: "Groupings", title: "Por rótulo", selectable: false, options: [{ id: "ITEM 1", icon: _freeSolidSvgIcons.faHeartbeat, itemText: "Sub-item", itemTextFinally: "META", label: "RÓTULO 01", optionsCheckbox: { hidden: true, name: "item01", value: "item01" } }, { id: "ITEM 2", icon: _freeSolidSvgIcons.faHeartbeat, itemText: "Sub-item", itemTextFinally: "META", optionsCheckbox: { hidden: true, name: "item02", value: "item02" } }, { id: "ITEM 3", icon: _freeSolidSvgIcons.faHeartbeat, itemText: "Sub-item", itemTextFinally: "META", optionsCheckbox: { hidden: true, name: "item03", value: "item03" } }, { id: "ITEM 4", icon: _freeSolidSvgIcons.faHeartbeat, itemText: "Sub-item", itemTextFinally: "META", label: "RÓTULO 02", optionsCheckbox: { hidden: true, name: "item04", value: "item04" } }, { id: "ITEM 5", icon: _freeSolidSvgIcons.faHeartbeat, itemText: "Sub-item", itemTextFinally: "META", optionsCheckbox: { hidden: true, name: "item05", value: "item05" } }, { id: "ITEM 6", icon: _freeSolidSvgIcons.faHeartbeat, itemText: "Sub-item", itemTextFinally: "META", optionsCheckbox: { hidden: true, name: "item06", value: "item06" } }] }; var GroupingsBySeparator = Template.bind({}); exports.GroupingsBySeparator = GroupingsBySeparator; GroupingsBySeparator.storyName = "Agrupamentos por separador"; GroupingsBySeparator.args = { type: "Groupings", title: "Por separador", options: [{ id: "ITEM 1", icon: _freeSolidSvgIcons.faHeartbeat, itemText: "Sub-item", itemTextFinally: "META" }, { id: "ITEM 2", icon: _freeSolidSvgIcons.faHeartbeat, itemText: "Sub-item", itemTextFinally: "META", divider: true }, { id: "ITEM 3", icon: _freeSolidSvgIcons.faHeartbeat, itemText: "Sub-item", itemTextFinally: "META" }, { id: "ITEM 4", icon: _freeSolidSvgIcons.faHeartbeat, itemText: "Sub-item", itemTextFinally: "META", divider: true }, { id: "ITEM 5", icon: _freeSolidSvgIcons.faHeartbeat, itemText: "Sub-item", itemTextFinally: "META" }, { id: "ITEM 6", icon: _freeSolidSvgIcons.faHeartbeat, itemText: "Sub-item", itemTextFinally: "META" }] }; var ListByExpansion = Template.bind({}); exports.ListByExpansion = ListByExpansion; ListByExpansion.storyName = "Lista por expansão"; ListByExpansion.args = { type: "ListByExpansion", title: "Por expansão", options: [{ id: "ITEM 1", name: "i1", icon: _freeSolidSvgIcons.faHeartbeat, items: [{ id: "1", icon: _freeSolidSvgIcons.faHeartbeat, itemText: "ITEM 1", divider: true, optionsCheckbox: { hidden: true, name: "item03", value: "item03" } }, { id: "2", icon: _freeSolidSvgIcons.faHeartbeat, itemText: "ITEM 2", divider: true, optionsCheckbox: { hidden: true, name: "item03", value: "item03" } }], textExpansion: "RÓTULO 01" }, { id: "ITEM 2", name: "i2", icon: _freeSolidSvgIcons.faHeartbeat, items: [{ id: "1", icon: _freeSolidSvgIcons.faHeartbeat, itemText: "ITEM 1", divider: true, optionsCheckbox: { hidden: true, name: "item03", value: "item03" } }, { id: "2", icon: _freeSolidSvgIcons.faHeartbeat, itemText: "ITEM 2", divider: true, optionsCheckbox: { hidden: true, name: "item03", value: "item03" } }], textExpansion: "RÓTULO 02", itemTextFinally: "META" }, { id: "ITEM 3", name: "i3", icon: _freeSolidSvgIcons.faHeartbeat, items: [{ id: "1", icon: _freeSolidSvgIcons.faHeartbeat, itemText: "ITEM 1", divider: true, optionsCheckbox: { hidden: true, name: "item03", value: "item03" } }, { id: "2", icon: _freeSolidSvgIcons.faHeartbeat, itemText: "ITEM 2", divider: true, optionsCheckbox: { hidden: true, name: "item03", value: "item03" } }], textExpansion: "RÓTULO 03" }] }; var ListHorizontal = Template.bind({}); exports.ListHorizontal = ListHorizontal; ListHorizontal.storyName = "Lista horizontal"; ListHorizontal.args = { type: "ListHorizontal", title: "Lista horizontal", size: "medium", selectable: false, options: [{ id: "ITEM 1", icon: _freeSolidSvgIcons.faHeartbeat, itemText: "ITEM Texto principal", itemTextFinally: "META" }, { id: "ITEM 2", icon: _freeSolidSvgIcons.faHeartbeat, itemText: "ITEM Texto principal", itemTextFinally: "META" }, { id: "ITEM 3", icon: _freeSolidSvgIcons.faHeartbeat, itemText: "ITEM Texto principal", itemTextFinally: "META" }, { id: "ITEM 4", icon: _freeSolidSvgIcons.faHeartbeat, itemText: "ITEM Texto principal", itemTextFinally: "META" }] }; var ListHorizontalByExpansion = Template.bind({}); exports.ListHorizontalByExpansion = ListHorizontalByExpansion; ListHorizontalByExpansion.storyName = "Lista horizontal por expansão"; ListHorizontalByExpansion.args = { type: "ListHorizontalByExpansion", title: "Lista horizontal por expansão", size: "medium", options: [{ id: "ITEM 1", selectable: true, name: "i1", icon: _freeSolidSvgIcons.faHeartbeat, textExpansion: "RÓTULO 01", items: [{ id: "1", icon: _freeSolidSvgIcons.faHeartbeat, itemText: "ITEM 1", optionsCheckbox: { hidden: false, name: "item01", value: "item01" } }, { id: "2", icon: _freeSolidSvgIcons.faHeartbeat, itemText: "ITEM 2", optionsCheckbox: { hidden: false, name: "item02", value: "item02" } }, { id: "3", icon: _freeSolidSvgIcons.faHeartbeat, itemText: "ITEM 3", optionsCheckbox: { hidden: false, name: "item03", value: "item03" } }, { id: "4", icon: _freeSolidSvgIcons.faHeartbeat, itemText: "ITEM 4", optionsCheckbox: { hidden: false, name: "item04", value: "item04" } }] }, { id: "ITEM 2", name: "i2", icon: _freeSolidSvgIcons.faHeartbeat, items: [{ id: "1", icon: _freeSolidSvgIcons.faHeartbeat, itemText: "ITEM 1", optionsCheckbox: { hidden: false, name: "item04", value: "item04" } }, { id: "2", icon: _freeSolidSvgIcons.faHeartbeat, itemText: "ITEM 2", optionsCheckbox: { hidden: false, name: "item04", value: "item04" } }], textExpansion: "RÓTULO 02", itemTextFinally: "META" }, { id: "ITEM 3", name: "i3", icon: _freeSolidSvgIcons.faHeartbeat, items: [{ id: "1", icon: _freeSolidSvgIcons.faHeartbeat, itemText: "ITEM 1", optionsCheckbox: { hidden: false, name: "item04", value: "item04" } }, { id: "2", icon: _freeSolidSvgIcons.faHeartbeat, itemText: "ITEM 2", optionsCheckbox: { hidden: false, name: "item04", value: "item04" } }], textExpansion: "RÓTULO 03" }] };