fds-vue-core 2.0.88 → 2.1.0
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.
- package/README.md +1 -0
- package/configs/eslint.config.base.js +262 -0
- package/configs/prettier.config.js +13 -0
- package/configs/tsconfig.base.json +17 -0
- package/configs/vscode-settings.json +74 -0
- package/dist/fds-vue-core.cjs.js +5367 -5374
- package/dist/fds-vue-core.cjs.js.map +1 -1
- package/dist/fds-vue-core.es.js +5368 -5375
- package/dist/fds-vue-core.es.js.map +1 -1
- package/dist/global-components.d.ts +36 -36
- package/dist/index.d.ts +2 -80
- package/dist/slot-styles.css +1 -1
- package/dist/tokens.css +0 -1
- package/package.json +15 -6
- package/src/.DS_Store +0 -0
- package/src/App.vue +133 -0
- package/src/apply.css +60 -0
- package/src/assets/icons.ts +517 -0
- package/src/components/Blocks/FdsBlockAlert/FdsBlockAlert.stories.ts +94 -0
- package/src/components/Blocks/FdsBlockAlert/FdsBlockAlert.vue +112 -0
- package/src/components/Blocks/FdsBlockAlert/types.ts +12 -0
- package/src/components/Blocks/FdsBlockContent/FdsBlockContent.stories.ts +110 -0
- package/src/components/Blocks/FdsBlockContent/FdsBlockContent.vue +66 -0
- package/src/components/Blocks/FdsBlockContent/types.ts +6 -0
- package/src/components/Blocks/FdsBlockExpander/FdsBlockExpander.stories.ts +123 -0
- package/src/components/Blocks/FdsBlockExpander/FdsBlockExpander.vue +87 -0
- package/src/components/Blocks/FdsBlockExpander/types.ts +8 -0
- package/src/components/Blocks/FdsBlockInfo/FdsBlockInfo.stories.ts +110 -0
- package/src/components/Blocks/FdsBlockInfo/FdsBlockInfo.vue +98 -0
- package/src/components/Blocks/FdsBlockInfo/types.ts +8 -0
- package/src/components/Blocks/FdsBlockLink/FdsBlockLink.css +9 -0
- package/src/components/Blocks/FdsBlockLink/FdsBlockLink.stories.ts +179 -0
- package/src/components/Blocks/FdsBlockLink/FdsBlockLink.vue +149 -0
- package/src/components/Blocks/FdsBlockLink/types.ts +14 -0
- package/src/components/Buttons/ButtonBaseProps.ts +18 -0
- package/src/components/Buttons/FdsButtonCopy/FdsButtonCopy.stories.ts +53 -0
- package/src/components/Buttons/FdsButtonCopy/FdsButtonCopy.vue +87 -0
- package/src/components/Buttons/FdsButtonCopy/types.ts +8 -0
- package/src/components/Buttons/FdsButtonDownload/FdsButtonDownload.stories.ts +111 -0
- package/src/components/Buttons/FdsButtonDownload/FdsButtonDownload.vue +187 -0
- package/src/components/Buttons/FdsButtonIcon/FdsButtonIcon.stories.ts +55 -0
- package/src/components/Buttons/FdsButtonIcon/FdsButtonIcon.vue +57 -0
- package/src/components/Buttons/FdsButtonIcon/types.ts +12 -0
- package/src/components/Buttons/FdsButtonMinor/FdsButtonMinor.stories.ts +68 -0
- package/src/components/Buttons/FdsButtonMinor/FdsButtonMinor.vue +126 -0
- package/src/components/Buttons/FdsButtonPrimary/FdsButtonPrimary.stories.ts +86 -0
- package/src/components/Buttons/FdsButtonPrimary/FdsButtonPrimary.vue +107 -0
- package/src/components/Buttons/FdsButtonSecondary/FdsButtonSecondary.stories.ts +68 -0
- package/src/components/Buttons/FdsButtonSecondary/FdsButtonSecondary.vue +107 -0
- package/src/components/FdsIcon/FdsIcon.stories.ts +69 -0
- package/src/components/FdsIcon/FdsIcon.vue +34 -0
- package/src/components/FdsIcon/types.ts +9 -0
- package/src/components/FdsModal/FdsModal.stories.ts +241 -0
- package/src/components/FdsModal/FdsModal.vue +261 -0
- package/src/components/FdsModal/types.ts +12 -0
- package/src/components/FdsPagination/FdsPagination.stories.ts +109 -0
- package/src/components/FdsPagination/FdsPagination.vue +193 -0
- package/src/components/FdsPagination/types.ts +6 -0
- package/src/components/FdsSearchSelect/FdsSearchSelect.stories.ts +428 -0
- package/src/components/FdsSearchSelect/FdsSearchSelect.vue +610 -0
- package/src/components/FdsSearchSelect/types.ts +25 -0
- package/src/components/FdsSpinner/FdsSpinner.stories.ts +31 -0
- package/src/components/FdsSpinner/FdsSpinner.vue +90 -0
- package/src/components/FdsSpinner/types.ts +6 -0
- package/src/components/FdsSticker/FdsSticker.stories.ts +148 -0
- package/src/components/FdsSticker/FdsSticker.vue +44 -0
- package/src/components/FdsSticker/types.ts +4 -0
- package/src/components/FdsTreeView/FdsTreeView.stories.ts +136 -0
- package/src/components/FdsTreeView/FdsTreeView.vue +162 -0
- package/src/components/FdsTreeView/TreeNode.vue +383 -0
- package/src/components/FdsTreeView/types.ts +141 -0
- package/src/components/FdsTreeView/useTreeState.ts +607 -0
- package/src/components/FdsTreeView/utils.ts +65 -0
- package/src/components/FdsTruncatedText/FdsTruncatedText.stories.ts +78 -0
- package/src/components/FdsTruncatedText/FdsTruncatedText.vue +85 -0
- package/src/components/FdsTruncatedText/types.ts +6 -0
- package/src/components/Form/FdsCheckbox/FdsCheckbox.stories.ts +275 -0
- package/src/components/Form/FdsCheckbox/FdsCheckbox.vue +155 -0
- package/src/components/Form/FdsCheckbox/types.ts +10 -0
- package/src/components/Form/FdsInput/FdsInput.stories.ts +319 -0
- package/src/components/Form/FdsInput/FdsInput.vue +233 -0
- package/src/components/Form/FdsInput/types.ts +25 -0
- package/src/components/Form/FdsRadio/FdsRadio.stories.ts +63 -0
- package/src/components/Form/FdsRadio/FdsRadio.vue +88 -0
- package/src/components/Form/FdsRadio/types.ts +12 -0
- package/src/components/Form/FdsSelect/FdsSelect.stories.ts +78 -0
- package/src/components/Form/FdsSelect/FdsSelect.vue +136 -0
- package/src/components/Form/FdsSelect/types.ts +13 -0
- package/src/components/Form/FdsTextarea/FdsTextarea.stories.ts +52 -0
- package/src/components/Form/FdsTextarea/FdsTextarea.vue +110 -0
- package/src/components/Form/FdsTextarea/types.ts +12 -0
- package/src/components/Table/FdsTable/FdsTable.stories.ts +221 -0
- package/src/components/Table/FdsTable/FdsTable.vue +25 -0
- package/src/components/Table/FdsTable/types.ts +4 -0
- package/src/components/Table/FdsTableHead/FdsTableHead.stories.ts +151 -0
- package/src/components/Table/FdsTableHead/FdsTableHead.vue +54 -0
- package/src/components/Table/FdsTableHead/types.ts +5 -0
- package/src/components/Tabs/FdsTabs/FdsTabs.stories.ts +247 -0
- package/src/components/Tabs/FdsTabs/FdsTabs.vue +27 -0
- package/src/components/Tabs/FdsTabs/types.ts +4 -0
- package/src/components/Tabs/FdsTabsItem/FdsTabsItem.vue +125 -0
- package/src/components/Tabs/FdsTabsItem/types.ts +16 -0
- package/src/components/Typography/FdsHeading/FdsHeading.stories.ts +93 -0
- package/src/components/Typography/FdsHeading/FdsHeading.vue +51 -0
- package/src/components/Typography/FdsHeading/types.ts +5 -0
- package/src/components/Typography/FdsListHeading/FdsListHeading.stories.ts +58 -0
- package/src/components/Typography/FdsListHeading/FdsListHeading.vue +62 -0
- package/src/components/Typography/FdsListHeading/types.ts +8 -0
- package/src/components/Typography/FdsSeparator/FdsSeparator.stories.ts +31 -0
- package/src/components/Typography/FdsSeparator/FdsSeparator.vue +5 -0
- package/src/components/Typography/FdsText/FdsText.stories.ts +66 -0
- package/src/components/Typography/FdsText/FdsText.vue +28 -0
- package/src/components/Typography/FdsText/types.ts +3 -0
- package/src/composables/useBoldQuery.ts +29 -0
- package/src/composables/useElementFinalSize.ts +24 -0
- package/src/composables/useHasSlots.ts +17 -0
- package/src/composables/useIsPid.ts +48 -0
- package/src/docs/Start/Start.mdx +12 -0
- package/src/docs/Usage.md +117 -0
- package/src/fonts.css +28 -0
- package/src/global-components.ts +38 -0
- package/src/index.ts +180 -0
- package/src/main.ts +7 -0
- package/src/slot-styles.css +93 -0
- package/src/style.css +89 -0
- package/src/tokens.css +252 -0
- package/tsconfig.base.json +4 -0
- package/dist/App.vue.d.ts +0 -3
- package/dist/App.vue.d.ts.map +0 -1
- package/dist/assets/icons.d.ts +0 -5
- package/dist/assets/icons.d.ts.map +0 -1
- package/dist/components/Blocks/FdsBlockAlert/FdsBlockAlert.stories.d.ts +0 -9
- package/dist/components/Blocks/FdsBlockAlert/FdsBlockAlert.stories.d.ts.map +0 -1
- package/dist/components/Blocks/FdsBlockAlert/FdsBlockAlert.vue.d.ts +0 -30
- package/dist/components/Blocks/FdsBlockAlert/FdsBlockAlert.vue.d.ts.map +0 -1
- package/dist/components/Blocks/FdsBlockAlert/types.d.ts +0 -12
- package/dist/components/Blocks/FdsBlockAlert/types.d.ts.map +0 -1
- package/dist/components/Blocks/FdsBlockContent/FdsBlockContent.stories.d.ts +0 -9
- package/dist/components/Blocks/FdsBlockContent/FdsBlockContent.stories.d.ts.map +0 -1
- package/dist/components/Blocks/FdsBlockContent/FdsBlockContent.vue.d.ts +0 -19
- package/dist/components/Blocks/FdsBlockContent/FdsBlockContent.vue.d.ts.map +0 -1
- package/dist/components/Blocks/FdsBlockContent/types.d.ts +0 -7
- package/dist/components/Blocks/FdsBlockContent/types.d.ts.map +0 -1
- package/dist/components/Blocks/FdsBlockExpander/FdsBlockExpander.stories.d.ts +0 -11
- package/dist/components/Blocks/FdsBlockExpander/FdsBlockExpander.stories.d.ts.map +0 -1
- package/dist/components/Blocks/FdsBlockExpander/FdsBlockExpander.vue.d.ts +0 -23
- package/dist/components/Blocks/FdsBlockExpander/FdsBlockExpander.vue.d.ts.map +0 -1
- package/dist/components/Blocks/FdsBlockExpander/types.d.ts +0 -8
- package/dist/components/Blocks/FdsBlockExpander/types.d.ts.map +0 -1
- package/dist/components/Blocks/FdsBlockInfo/FdsBlockInfo.stories.d.ts +0 -9
- package/dist/components/Blocks/FdsBlockInfo/FdsBlockInfo.stories.d.ts.map +0 -1
- package/dist/components/Blocks/FdsBlockInfo/FdsBlockInfo.vue.d.ts +0 -20
- package/dist/components/Blocks/FdsBlockInfo/FdsBlockInfo.vue.d.ts.map +0 -1
- package/dist/components/Blocks/FdsBlockInfo/types.d.ts +0 -8
- package/dist/components/Blocks/FdsBlockInfo/types.d.ts.map +0 -1
- package/dist/components/Blocks/FdsBlockLink/FdsBlockLink.stories.d.ts +0 -14
- package/dist/components/Blocks/FdsBlockLink/FdsBlockLink.stories.d.ts.map +0 -1
- package/dist/components/Blocks/FdsBlockLink/FdsBlockLink.vue.d.ts +0 -30
- package/dist/components/Blocks/FdsBlockLink/FdsBlockLink.vue.d.ts.map +0 -1
- package/dist/components/Blocks/FdsBlockLink/types.d.ts +0 -14
- package/dist/components/Blocks/FdsBlockLink/types.d.ts.map +0 -1
- package/dist/components/Buttons/ButtonBaseProps.d.ts +0 -18
- package/dist/components/Buttons/ButtonBaseProps.d.ts.map +0 -1
- package/dist/components/Buttons/FdsButtonCopy/FdsButtonCopy.stories.d.ts +0 -7
- package/dist/components/Buttons/FdsButtonCopy/FdsButtonCopy.stories.d.ts.map +0 -1
- package/dist/components/Buttons/FdsButtonCopy/FdsButtonCopy.vue.d.ts +0 -14
- package/dist/components/Buttons/FdsButtonCopy/FdsButtonCopy.vue.d.ts.map +0 -1
- package/dist/components/Buttons/FdsButtonCopy/types.d.ts +0 -9
- package/dist/components/Buttons/FdsButtonCopy/types.d.ts.map +0 -1
- package/dist/components/Buttons/FdsButtonDownload/FdsButtonDownload.stories.d.ts +0 -10
- package/dist/components/Buttons/FdsButtonDownload/FdsButtonDownload.stories.d.ts.map +0 -1
- package/dist/components/Buttons/FdsButtonDownload/FdsButtonDownload.vue.d.ts +0 -25
- package/dist/components/Buttons/FdsButtonDownload/FdsButtonDownload.vue.d.ts.map +0 -1
- package/dist/components/Buttons/FdsButtonIcon/FdsButtonIcon.stories.d.ts +0 -7
- package/dist/components/Buttons/FdsButtonIcon/FdsButtonIcon.stories.d.ts.map +0 -1
- package/dist/components/Buttons/FdsButtonIcon/FdsButtonIcon.vue.d.ts +0 -14
- package/dist/components/Buttons/FdsButtonIcon/FdsButtonIcon.vue.d.ts.map +0 -1
- package/dist/components/Buttons/FdsButtonIcon/types.d.ts +0 -12
- package/dist/components/Buttons/FdsButtonIcon/types.d.ts.map +0 -1
- package/dist/components/Buttons/FdsButtonMinor/FdsButtonMinor.stories.d.ts +0 -7
- package/dist/components/Buttons/FdsButtonMinor/FdsButtonMinor.stories.d.ts.map +0 -1
- package/dist/components/Buttons/FdsButtonMinor/FdsButtonMinor.vue.d.ts +0 -25
- package/dist/components/Buttons/FdsButtonMinor/FdsButtonMinor.vue.d.ts.map +0 -1
- package/dist/components/Buttons/FdsButtonPrimary/FdsButtonPrimary.stories.d.ts +0 -9
- package/dist/components/Buttons/FdsButtonPrimary/FdsButtonPrimary.stories.d.ts.map +0 -1
- package/dist/components/Buttons/FdsButtonPrimary/FdsButtonPrimary.vue.d.ts +0 -20
- package/dist/components/Buttons/FdsButtonPrimary/FdsButtonPrimary.vue.d.ts.map +0 -1
- package/dist/components/Buttons/FdsButtonSecondary/FdsButtonSecondary.stories.d.ts +0 -7
- package/dist/components/Buttons/FdsButtonSecondary/FdsButtonSecondary.stories.d.ts.map +0 -1
- package/dist/components/Buttons/FdsButtonSecondary/FdsButtonSecondary.vue.d.ts +0 -20
- package/dist/components/Buttons/FdsButtonSecondary/FdsButtonSecondary.vue.d.ts.map +0 -1
- package/dist/components/FdsIcon/FdsIcon.stories.d.ts +0 -8
- package/dist/components/FdsIcon/FdsIcon.stories.d.ts.map +0 -1
- package/dist/components/FdsIcon/FdsIcon.vue.d.ts +0 -7
- package/dist/components/FdsIcon/FdsIcon.vue.d.ts.map +0 -1
- package/dist/components/FdsIcon/types.d.ts +0 -8
- package/dist/components/FdsIcon/types.d.ts.map +0 -1
- package/dist/components/FdsModal/FdsModal.stories.d.ts +0 -13
- package/dist/components/FdsModal/FdsModal.stories.d.ts.map +0 -1
- package/dist/components/FdsModal/FdsModal.vue.d.ts +0 -33
- package/dist/components/FdsModal/FdsModal.vue.d.ts.map +0 -1
- package/dist/components/FdsModal/types.d.ts +0 -13
- package/dist/components/FdsModal/types.d.ts.map +0 -1
- package/dist/components/FdsPagination/FdsPagination.stories.d.ts +0 -11
- package/dist/components/FdsPagination/FdsPagination.stories.d.ts.map +0 -1
- package/dist/components/FdsPagination/FdsPagination.vue.d.ts +0 -21
- package/dist/components/FdsPagination/FdsPagination.vue.d.ts.map +0 -1
- package/dist/components/FdsPagination/types.d.ts +0 -7
- package/dist/components/FdsPagination/types.d.ts.map +0 -1
- package/dist/components/FdsSearchSelect/FdsSearchSelect.stories.d.ts +0 -15
- package/dist/components/FdsSearchSelect/FdsSearchSelect.stories.d.ts.map +0 -1
- package/dist/components/FdsSearchSelect/FdsSearchSelect.vue.d.ts +0 -41
- package/dist/components/FdsSearchSelect/FdsSearchSelect.vue.d.ts.map +0 -1
- package/dist/components/FdsSearchSelect/types.d.ts +0 -29
- package/dist/components/FdsSearchSelect/types.d.ts.map +0 -1
- package/dist/components/FdsSpinner/FdsSpinner.stories.d.ts +0 -7
- package/dist/components/FdsSpinner/FdsSpinner.stories.d.ts.map +0 -1
- package/dist/components/FdsSpinner/FdsSpinner.vue.d.ts +0 -15
- package/dist/components/FdsSpinner/FdsSpinner.vue.d.ts.map +0 -1
- package/dist/components/FdsSpinner/types.d.ts +0 -7
- package/dist/components/FdsSpinner/types.d.ts.map +0 -1
- package/dist/components/FdsSticker/FdsSticker.stories.d.ts +0 -15
- package/dist/components/FdsSticker/FdsSticker.stories.d.ts.map +0 -1
- package/dist/components/FdsSticker/FdsSticker.vue.d.ts +0 -17
- package/dist/components/FdsSticker/FdsSticker.vue.d.ts.map +0 -1
- package/dist/components/FdsSticker/types.d.ts +0 -5
- package/dist/components/FdsSticker/types.d.ts.map +0 -1
- package/dist/components/FdsTreeView/FdsTreeView.stories.d.ts +0 -7
- package/dist/components/FdsTreeView/FdsTreeView.stories.d.ts.map +0 -1
- package/dist/components/FdsTreeView/FdsTreeView.vue.d.ts +0 -29
- package/dist/components/FdsTreeView/FdsTreeView.vue.d.ts.map +0 -1
- package/dist/components/FdsTreeView/TreeNode.vue.d.ts +0 -21
- package/dist/components/FdsTreeView/TreeNode.vue.d.ts.map +0 -1
- package/dist/components/FdsTreeView/types.d.ts +0 -122
- package/dist/components/FdsTreeView/types.d.ts.map +0 -1
- package/dist/components/FdsTreeView/useTreeState.d.ts +0 -48
- package/dist/components/FdsTreeView/useTreeState.d.ts.map +0 -1
- package/dist/components/FdsTreeView/utils.d.ts +0 -4
- package/dist/components/FdsTreeView/utils.d.ts.map +0 -1
- package/dist/components/FdsTruncatedText/FdsTruncatedText.stories.d.ts +0 -9
- package/dist/components/FdsTruncatedText/FdsTruncatedText.stories.d.ts.map +0 -1
- package/dist/components/FdsTruncatedText/FdsTruncatedText.vue.d.ts +0 -26
- package/dist/components/FdsTruncatedText/FdsTruncatedText.vue.d.ts.map +0 -1
- package/dist/components/FdsTruncatedText/types.d.ts +0 -7
- package/dist/components/FdsTruncatedText/types.d.ts.map +0 -1
- package/dist/components/Form/FdsCheckbox/FdsCheckbox.stories.d.ts +0 -12
- package/dist/components/Form/FdsCheckbox/FdsCheckbox.stories.d.ts.map +0 -1
- package/dist/components/Form/FdsCheckbox/FdsCheckbox.vue.d.ts +0 -38
- package/dist/components/Form/FdsCheckbox/FdsCheckbox.vue.d.ts.map +0 -1
- package/dist/components/Form/FdsCheckbox/types.d.ts +0 -11
- package/dist/components/Form/FdsCheckbox/types.d.ts.map +0 -1
- package/dist/components/Form/FdsInput/FdsInput.stories.d.ts +0 -18
- package/dist/components/Form/FdsInput/FdsInput.stories.d.ts.map +0 -1
- package/dist/components/Form/FdsInput/FdsInput.vue.d.ts +0 -39
- package/dist/components/Form/FdsInput/FdsInput.vue.d.ts.map +0 -1
- package/dist/components/Form/FdsInput/types.d.ts +0 -26
- package/dist/components/Form/FdsInput/types.d.ts.map +0 -1
- package/dist/components/Form/FdsRadio/FdsRadio.stories.d.ts +0 -8
- package/dist/components/Form/FdsRadio/FdsRadio.stories.d.ts.map +0 -1
- package/dist/components/Form/FdsRadio/FdsRadio.vue.d.ts +0 -36
- package/dist/components/Form/FdsRadio/FdsRadio.vue.d.ts.map +0 -1
- package/dist/components/Form/FdsRadio/types.d.ts +0 -13
- package/dist/components/Form/FdsRadio/types.d.ts.map +0 -1
- package/dist/components/Form/FdsSelect/FdsSelect.stories.d.ts +0 -10
- package/dist/components/Form/FdsSelect/FdsSelect.stories.d.ts.map +0 -1
- package/dist/components/Form/FdsSelect/FdsSelect.vue.d.ts +0 -45
- package/dist/components/Form/FdsSelect/FdsSelect.vue.d.ts.map +0 -1
- package/dist/components/Form/FdsSelect/types.d.ts +0 -18
- package/dist/components/Form/FdsSelect/types.d.ts.map +0 -1
- package/dist/components/Form/FdsTextarea/FdsTextarea.stories.d.ts +0 -8
- package/dist/components/Form/FdsTextarea/FdsTextarea.stories.d.ts.map +0 -1
- package/dist/components/Form/FdsTextarea/FdsTextarea.vue.d.ts +0 -27
- package/dist/components/Form/FdsTextarea/FdsTextarea.vue.d.ts.map +0 -1
- package/dist/components/Form/FdsTextarea/types.d.ts +0 -13
- package/dist/components/Form/FdsTextarea/types.d.ts.map +0 -1
- package/dist/components/Table/FdsTable/FdsTable.stories.d.ts +0 -10
- package/dist/components/Table/FdsTable/FdsTable.stories.d.ts.map +0 -1
- package/dist/components/Table/FdsTable/FdsTable.vue.d.ts +0 -16
- package/dist/components/Table/FdsTable/FdsTable.vue.d.ts.map +0 -1
- package/dist/components/Table/FdsTable/types.d.ts +0 -5
- package/dist/components/Table/FdsTable/types.d.ts.map +0 -1
- package/dist/components/Table/FdsTableHead/FdsTableHead.stories.d.ts +0 -12
- package/dist/components/Table/FdsTableHead/FdsTableHead.stories.d.ts.map +0 -1
- package/dist/components/Table/FdsTableHead/FdsTableHead.vue.d.ts +0 -24
- package/dist/components/Table/FdsTableHead/FdsTableHead.vue.d.ts.map +0 -1
- package/dist/components/Table/FdsTableHead/types.d.ts +0 -6
- package/dist/components/Table/FdsTableHead/types.d.ts.map +0 -1
- package/dist/components/Tabs/FdsTabs/FdsTabs.stories.d.ts +0 -14
- package/dist/components/Tabs/FdsTabs/FdsTabs.stories.d.ts.map +0 -1
- package/dist/components/Tabs/FdsTabs/FdsTabs.vue.d.ts +0 -17
- package/dist/components/Tabs/FdsTabs/FdsTabs.vue.d.ts.map +0 -1
- package/dist/components/Tabs/FdsTabs/types.d.ts +0 -5
- package/dist/components/Tabs/FdsTabs/types.d.ts.map +0 -1
- package/dist/components/Tabs/FdsTabsItem/FdsTabsItem.vue.d.ts +0 -22
- package/dist/components/Tabs/FdsTabsItem/FdsTabsItem.vue.d.ts.map +0 -1
- package/dist/components/Tabs/FdsTabsItem/types.d.ts +0 -17
- package/dist/components/Tabs/FdsTabsItem/types.d.ts.map +0 -1
- package/dist/components/Typography/FdsHeading/FdsHeading.stories.d.ts +0 -11
- package/dist/components/Typography/FdsHeading/FdsHeading.stories.d.ts.map +0 -1
- package/dist/components/Typography/FdsHeading/FdsHeading.vue.d.ts +0 -6
- package/dist/components/Typography/FdsHeading/FdsHeading.vue.d.ts.map +0 -1
- package/dist/components/Typography/FdsHeading/types.d.ts +0 -6
- package/dist/components/Typography/FdsHeading/types.d.ts.map +0 -1
- package/dist/components/Typography/FdsListHeading/FdsListHeading.stories.d.ts +0 -11
- package/dist/components/Typography/FdsListHeading/FdsListHeading.stories.d.ts.map +0 -1
- package/dist/components/Typography/FdsListHeading/FdsListHeading.vue.d.ts +0 -7
- package/dist/components/Typography/FdsListHeading/FdsListHeading.vue.d.ts.map +0 -1
- package/dist/components/Typography/FdsListHeading/types.d.ts +0 -9
- package/dist/components/Typography/FdsListHeading/types.d.ts.map +0 -1
- package/dist/components/Typography/FdsSeparator/FdsSeparator.stories.d.ts +0 -7
- package/dist/components/Typography/FdsSeparator/FdsSeparator.stories.d.ts.map +0 -1
- package/dist/components/Typography/FdsSeparator/FdsSeparator.vue.d.ts +0 -3
- package/dist/components/Typography/FdsSeparator/FdsSeparator.vue.d.ts.map +0 -1
- package/dist/components/Typography/FdsText/FdsText.stories.d.ts +0 -9
- package/dist/components/Typography/FdsText/FdsText.stories.d.ts.map +0 -1
- package/dist/components/Typography/FdsText/FdsText.vue.d.ts +0 -16
- package/dist/components/Typography/FdsText/FdsText.vue.d.ts.map +0 -1
- package/dist/components/Typography/FdsText/types.d.ts +0 -4
- package/dist/components/Typography/FdsText/types.d.ts.map +0 -1
- package/dist/composables/useBoldQuery.d.ts +0 -10
- package/dist/composables/useBoldQuery.d.ts.map +0 -1
- package/dist/composables/useElementFinalSize.d.ts +0 -3
- package/dist/composables/useElementFinalSize.d.ts.map +0 -1
- package/dist/composables/useHasSlots.d.ts +0 -6
- package/dist/composables/useHasSlots.d.ts.map +0 -1
- package/dist/composables/useIsPid.d.ts +0 -16
- package/dist/composables/useIsPid.d.ts.map +0 -1
- package/dist/global-components.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/main.d.ts +0 -2
- package/dist/main.d.ts.map +0 -1
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/vue3'
|
|
2
|
+
import FdsTableHead from '@/components/Table/FdsTableHead/FdsTableHead.vue'
|
|
3
|
+
import FdsTable from './FdsTable.vue'
|
|
4
|
+
|
|
5
|
+
const meta: Meta<typeof FdsTable> = {
|
|
6
|
+
title: 'FDS/Table/FdsTable',
|
|
7
|
+
component: FdsTable,
|
|
8
|
+
tags: ['autodocs'],
|
|
9
|
+
argTypes: {
|
|
10
|
+
bordered: { control: { type: 'boolean' } },
|
|
11
|
+
compact: { control: { type: 'boolean' } },
|
|
12
|
+
},
|
|
13
|
+
args: {
|
|
14
|
+
bordered: false,
|
|
15
|
+
compact: false,
|
|
16
|
+
},
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export default meta
|
|
20
|
+
type Story = StoryObj<typeof meta>
|
|
21
|
+
|
|
22
|
+
const tableTransform = (storyContext: { args?: { bordered?: boolean; compact?: boolean } }) => {
|
|
23
|
+
const args = storyContext?.args || {}
|
|
24
|
+
const attrs = []
|
|
25
|
+
if (args.bordered) attrs.push(':bordered="true"')
|
|
26
|
+
if (args.compact) attrs.push(':compact="true"')
|
|
27
|
+
|
|
28
|
+
const attrsStr = attrs.length ? ` ${attrs.join(' ')}` : ''
|
|
29
|
+
return `<FdsTable${attrsStr}>
|
|
30
|
+
<table>
|
|
31
|
+
<thead>
|
|
32
|
+
<tr>
|
|
33
|
+
<FdsTableHead>ID</FdsTableHead>
|
|
34
|
+
<FdsTableHead>Namn</FdsTableHead>
|
|
35
|
+
<FdsTableHead>E-post</FdsTableHead>
|
|
36
|
+
<FdsTableHead>Roll</FdsTableHead>
|
|
37
|
+
</tr>
|
|
38
|
+
</thead>
|
|
39
|
+
<tbody>
|
|
40
|
+
<tr v-for="row in sampleData" :key="row.id">
|
|
41
|
+
<td>{{ row.id }}</td>
|
|
42
|
+
<td>{{ row.name }}</td>
|
|
43
|
+
<td>{{ row.email }}</td>
|
|
44
|
+
<td>{{ row.role }}</td>
|
|
45
|
+
</tr>
|
|
46
|
+
</tbody>
|
|
47
|
+
</table>
|
|
48
|
+
</FdsTable>`
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const sampleData = [
|
|
52
|
+
{ id: 1, name: 'Anna Andersson', email: 'anna@example.com', role: 'Admin' },
|
|
53
|
+
{ id: 2, name: 'Erik Eriksson', email: 'erik@example.com', role: 'User' },
|
|
54
|
+
{ id: 3, name: 'Maria Svensson', email: 'maria@example.com', role: 'User' },
|
|
55
|
+
{ id: 4, name: 'Lars Larsson', email: 'lars@example.com', role: 'Moderator' },
|
|
56
|
+
]
|
|
57
|
+
|
|
58
|
+
export const Default: Story = {
|
|
59
|
+
render: (args) => ({
|
|
60
|
+
components: { FdsTable, FdsTableHead },
|
|
61
|
+
setup: () => ({ args, sampleData }),
|
|
62
|
+
template: `
|
|
63
|
+
<FdsTable v-bind="args">
|
|
64
|
+
<table>
|
|
65
|
+
<thead>
|
|
66
|
+
<tr>
|
|
67
|
+
<FdsTableHead>ID</FdsTableHead>
|
|
68
|
+
<FdsTableHead>Namn</FdsTableHead>
|
|
69
|
+
<FdsTableHead>E-post</FdsTableHead>
|
|
70
|
+
<FdsTableHead>Roll</FdsTableHead>
|
|
71
|
+
</tr>
|
|
72
|
+
</thead>
|
|
73
|
+
<tbody>
|
|
74
|
+
<tr v-for="row in sampleData" :key="row.id">
|
|
75
|
+
<td>{{ row.id }}</td>
|
|
76
|
+
<td>{{ row.name }}</td>
|
|
77
|
+
<td>{{ row.email }}</td>
|
|
78
|
+
<td>{{ row.role }}</td>
|
|
79
|
+
</tr>
|
|
80
|
+
</tbody>
|
|
81
|
+
</table>
|
|
82
|
+
</FdsTable>
|
|
83
|
+
`,
|
|
84
|
+
}),
|
|
85
|
+
parameters: {
|
|
86
|
+
docs: {
|
|
87
|
+
source: {
|
|
88
|
+
transform: tableTransform,
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export const Bordered: Story = {
|
|
95
|
+
args: { bordered: true },
|
|
96
|
+
render: (args) => ({
|
|
97
|
+
components: { FdsTable, FdsTableHead },
|
|
98
|
+
setup: () => ({ args, sampleData }),
|
|
99
|
+
template: `
|
|
100
|
+
<FdsTable v-bind="args">
|
|
101
|
+
<table>
|
|
102
|
+
<thead>
|
|
103
|
+
<tr>
|
|
104
|
+
<FdsTableHead>ID</FdsTableHead>
|
|
105
|
+
<FdsTableHead>Namn</FdsTableHead>
|
|
106
|
+
<FdsTableHead>E-post</FdsTableHead>
|
|
107
|
+
<FdsTableHead>Roll</FdsTableHead>
|
|
108
|
+
</tr>
|
|
109
|
+
</thead>
|
|
110
|
+
<tbody>
|
|
111
|
+
<tr v-for="row in sampleData" :key="row.id">
|
|
112
|
+
<td>{{ row.id }}</td>
|
|
113
|
+
<td>{{ row.name }}</td>
|
|
114
|
+
<td>{{ row.email }}</td>
|
|
115
|
+
<td>{{ row.role }}</td>
|
|
116
|
+
</tr>
|
|
117
|
+
</tbody>
|
|
118
|
+
</table>
|
|
119
|
+
</FdsTable>
|
|
120
|
+
`,
|
|
121
|
+
}),
|
|
122
|
+
parameters: {
|
|
123
|
+
docs: {
|
|
124
|
+
source: {
|
|
125
|
+
transform: tableTransform,
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export const Compact: Story = {
|
|
132
|
+
args: { compact: true },
|
|
133
|
+
render: (args) => ({
|
|
134
|
+
components: { FdsTable, FdsTableHead },
|
|
135
|
+
setup: () => ({ args, sampleData }),
|
|
136
|
+
template: `
|
|
137
|
+
<FdsTable v-bind="args">
|
|
138
|
+
<table>
|
|
139
|
+
<thead>
|
|
140
|
+
<tr>
|
|
141
|
+
<FdsTableHead>ID</FdsTableHead>
|
|
142
|
+
<FdsTableHead>Namn</FdsTableHead>
|
|
143
|
+
<FdsTableHead>E-post</FdsTableHead>
|
|
144
|
+
<FdsTableHead>Roll</FdsTableHead>
|
|
145
|
+
</tr>
|
|
146
|
+
</thead>
|
|
147
|
+
<tbody>
|
|
148
|
+
<tr v-for="row in sampleData" :key="row.id">
|
|
149
|
+
<td>{{ row.id }}</td>
|
|
150
|
+
<td>{{ row.name }}</td>
|
|
151
|
+
<td>{{ row.email }}</td>
|
|
152
|
+
<td>{{ row.role }}</td>
|
|
153
|
+
</tr>
|
|
154
|
+
</tbody>
|
|
155
|
+
</table>
|
|
156
|
+
</FdsTable>
|
|
157
|
+
`,
|
|
158
|
+
}),
|
|
159
|
+
parameters: {
|
|
160
|
+
docs: {
|
|
161
|
+
source: {
|
|
162
|
+
transform: tableTransform,
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export const Sortable: Story = {
|
|
169
|
+
render: () => ({
|
|
170
|
+
components: { FdsTable, FdsTableHead },
|
|
171
|
+
setup: () => ({ sampleData }),
|
|
172
|
+
template: `
|
|
173
|
+
<FdsTable>
|
|
174
|
+
<table>
|
|
175
|
+
<thead>
|
|
176
|
+
<tr>
|
|
177
|
+
<FdsTableHead icon="sort">ID</FdsTableHead>
|
|
178
|
+
<FdsTableHead icon="ascending">Namn</FdsTableHead>
|
|
179
|
+
<FdsTableHead icon="descending">E-post</FdsTableHead>
|
|
180
|
+
<FdsTableHead>Roll</FdsTableHead>
|
|
181
|
+
</tr>
|
|
182
|
+
</thead>
|
|
183
|
+
<tbody>
|
|
184
|
+
<tr v-for="row in sampleData" :key="row.id">
|
|
185
|
+
<td>{{ row.id }}</td>
|
|
186
|
+
<td>{{ row.name }}</td>
|
|
187
|
+
<td>{{ row.email }}</td>
|
|
188
|
+
<td>{{ row.role }}</td>
|
|
189
|
+
</tr>
|
|
190
|
+
</tbody>
|
|
191
|
+
</table>
|
|
192
|
+
</FdsTable>
|
|
193
|
+
`,
|
|
194
|
+
}),
|
|
195
|
+
parameters: {
|
|
196
|
+
docs: {
|
|
197
|
+
source: {
|
|
198
|
+
code: `<FdsTable>
|
|
199
|
+
<table>
|
|
200
|
+
<thead>
|
|
201
|
+
<tr>
|
|
202
|
+
<FdsTableHead icon="sort">ID</FdsTableHead>
|
|
203
|
+
<FdsTableHead icon="ascending">Namn</FdsTableHead>
|
|
204
|
+
<FdsTableHead icon="descending">E-post</FdsTableHead>
|
|
205
|
+
<FdsTableHead>Roll</FdsTableHead>
|
|
206
|
+
</tr>
|
|
207
|
+
</thead>
|
|
208
|
+
<tbody>
|
|
209
|
+
<tr v-for="row in sampleData" :key="row.id">
|
|
210
|
+
<td>{{ row.id }}</td>
|
|
211
|
+
<td>{{ row.name }}</td>
|
|
212
|
+
<td>{{ row.email }}</td>
|
|
213
|
+
<td>{{ row.role }}</td>
|
|
214
|
+
</tr>
|
|
215
|
+
</tbody>
|
|
216
|
+
</table>
|
|
217
|
+
</FdsTable>`,
|
|
218
|
+
},
|
|
219
|
+
},
|
|
220
|
+
},
|
|
221
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
import type { FdsTableProps } from './types'
|
|
4
|
+
|
|
5
|
+
const props = withDefaults(defineProps<FdsTableProps>(), {
|
|
6
|
+
bordered: false,
|
|
7
|
+
compact: false,
|
|
8
|
+
})
|
|
9
|
+
|
|
10
|
+
const wrapperClasses = computed(() => [
|
|
11
|
+
'fds-table-wrapper',
|
|
12
|
+
props.bordered && 'fds-table-wrapper--bordered',
|
|
13
|
+
props.compact && 'fds-table-wrapper--compact',
|
|
14
|
+
])
|
|
15
|
+
|
|
16
|
+
defineSlots<{
|
|
17
|
+
default?: unknown
|
|
18
|
+
}>()
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<template>
|
|
22
|
+
<div :class="wrapperClasses">
|
|
23
|
+
<slot />
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/vue3'
|
|
2
|
+
import FdsTableHead from './FdsTableHead.vue'
|
|
3
|
+
|
|
4
|
+
const meta: Meta<typeof FdsTableHead> = {
|
|
5
|
+
title: 'FDS/Table/FdsTableHead',
|
|
6
|
+
component: FdsTableHead,
|
|
7
|
+
tags: ['autodocs'],
|
|
8
|
+
argTypes: {
|
|
9
|
+
heading: { control: { type: 'text' } },
|
|
10
|
+
align: { control: { type: 'radio' }, options: ['left', 'center', 'right'] },
|
|
11
|
+
icon: { control: { type: 'select' }, options: ['sort', 'ascending', 'descending'] },
|
|
12
|
+
},
|
|
13
|
+
args: {
|
|
14
|
+
heading: 'Namn',
|
|
15
|
+
align: 'left',
|
|
16
|
+
icon: 'sort',
|
|
17
|
+
},
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export default meta
|
|
21
|
+
type Story = StoryObj<typeof meta>
|
|
22
|
+
|
|
23
|
+
export const Default: Story = {
|
|
24
|
+
render: (args) => ({
|
|
25
|
+
components: { FdsTableHead },
|
|
26
|
+
setup: () => ({ args }),
|
|
27
|
+
template: `
|
|
28
|
+
<table class="min-w-full divide-y divide-gray-200">
|
|
29
|
+
<thead class="bg-gray-50">
|
|
30
|
+
<tr>
|
|
31
|
+
<FdsTableHead v-bind="args">Namn</FdsTableHead>
|
|
32
|
+
</tr>
|
|
33
|
+
</thead>
|
|
34
|
+
<tbody class="bg-white divide-y divide-gray-200">
|
|
35
|
+
<tr>
|
|
36
|
+
<td class="px-4 py-3 text-sm text-gray-700">Exempel data</td>
|
|
37
|
+
</tr>
|
|
38
|
+
</tbody>
|
|
39
|
+
</table>
|
|
40
|
+
`,
|
|
41
|
+
}),
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export const Sortable: Story = {
|
|
45
|
+
render: (args) => ({
|
|
46
|
+
components: { FdsTableHead },
|
|
47
|
+
setup: () => ({ args }),
|
|
48
|
+
template: `
|
|
49
|
+
<table class="min-w-full divide-y divide-gray-200">
|
|
50
|
+
<thead class="bg-gray-50">
|
|
51
|
+
<tr>
|
|
52
|
+
<FdsTableHead v-bind="args">Namn</FdsTableHead>
|
|
53
|
+
</tr>
|
|
54
|
+
</thead>
|
|
55
|
+
<tbody class="bg-white divide-y divide-gray-200">
|
|
56
|
+
<tr>
|
|
57
|
+
<td class="px-4 py-3 text-sm text-gray-700">Exempel data</td>
|
|
58
|
+
</tr>
|
|
59
|
+
</tbody>
|
|
60
|
+
</table>
|
|
61
|
+
`,
|
|
62
|
+
}),
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export const SortedAsc: Story = {
|
|
66
|
+
args: { icon: 'ascending' },
|
|
67
|
+
render: (args) => ({
|
|
68
|
+
components: { FdsTableHead },
|
|
69
|
+
setup: () => ({ args }),
|
|
70
|
+
template: `
|
|
71
|
+
<table class="min-w-full divide-y divide-gray-200">
|
|
72
|
+
<thead class="bg-gray-50">
|
|
73
|
+
<tr>
|
|
74
|
+
<FdsTableHead v-bind="args">Namn</FdsTableHead>
|
|
75
|
+
</tr>
|
|
76
|
+
</thead>
|
|
77
|
+
<tbody class="bg-white divide-y divide-gray-200">
|
|
78
|
+
<tr>
|
|
79
|
+
<td class="px-4 py-3 text-sm text-gray-700">Exempel data</td>
|
|
80
|
+
</tr>
|
|
81
|
+
</tbody>
|
|
82
|
+
</table>
|
|
83
|
+
`,
|
|
84
|
+
}),
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export const SortedDesc: Story = {
|
|
88
|
+
args: { icon: 'descending' },
|
|
89
|
+
render: (args) => ({
|
|
90
|
+
components: { FdsTableHead },
|
|
91
|
+
setup: () => ({ args }),
|
|
92
|
+
template: `
|
|
93
|
+
<table class="min-w-full divide-y divide-gray-200">
|
|
94
|
+
<thead class="bg-gray-50">
|
|
95
|
+
<tr>
|
|
96
|
+
<FdsTableHead v-bind="args">Namn</FdsTableHead>
|
|
97
|
+
</tr>
|
|
98
|
+
</thead>
|
|
99
|
+
<tbody class="bg-white divide-y divide-gray-200">
|
|
100
|
+
<tr>
|
|
101
|
+
<td class="px-4 py-3 text-sm text-gray-700">Exempel data</td>
|
|
102
|
+
</tr>
|
|
103
|
+
</tbody>
|
|
104
|
+
</table>
|
|
105
|
+
`,
|
|
106
|
+
}),
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export const CenterAligned: Story = {
|
|
110
|
+
args: { align: 'center' },
|
|
111
|
+
render: (args) => ({
|
|
112
|
+
components: { FdsTableHead },
|
|
113
|
+
setup: () => ({ args }),
|
|
114
|
+
template: `
|
|
115
|
+
<table class="min-w-full divide-y divide-gray-200">
|
|
116
|
+
<thead class="bg-gray-50">
|
|
117
|
+
<tr>
|
|
118
|
+
<FdsTableHead v-bind="args">Centrerad</FdsTableHead>
|
|
119
|
+
</tr>
|
|
120
|
+
</thead>
|
|
121
|
+
<tbody class="bg-white divide-y divide-gray-200">
|
|
122
|
+
<tr>
|
|
123
|
+
<td class="px-4 py-3 text-sm text-gray-700 text-center">Exempel data</td>
|
|
124
|
+
</tr>
|
|
125
|
+
</tbody>
|
|
126
|
+
</table>
|
|
127
|
+
`,
|
|
128
|
+
}),
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export const RightAligned: Story = {
|
|
132
|
+
args: { align: 'right' },
|
|
133
|
+
render: (args) => ({
|
|
134
|
+
components: { FdsTableHead },
|
|
135
|
+
setup: () => ({ args }),
|
|
136
|
+
template: `
|
|
137
|
+
<table class="min-w-full divide-y divide-gray-200">
|
|
138
|
+
<thead class="bg-gray-50">
|
|
139
|
+
<tr>
|
|
140
|
+
<FdsTableHead v-bind="args">Högerjusterad</FdsTableHead>
|
|
141
|
+
</tr>
|
|
142
|
+
</thead>
|
|
143
|
+
<tbody class="bg-white divide-y divide-gray-200">
|
|
144
|
+
<tr>
|
|
145
|
+
<td class="px-4 py-3 text-sm text-gray-700 text-right">Exempel data</td>
|
|
146
|
+
</tr>
|
|
147
|
+
</tbody>
|
|
148
|
+
</table>
|
|
149
|
+
`,
|
|
150
|
+
}),
|
|
151
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { useHasSlot } from '@/composables/useHasSlots'
|
|
3
|
+
import { computed } from 'vue'
|
|
4
|
+
import FdsIcon from '@/components/FdsIcon/FdsIcon.vue'
|
|
5
|
+
import type { FdsTableHeadProps } from './types'
|
|
6
|
+
|
|
7
|
+
const props = withDefaults(defineProps<FdsTableHeadProps>(), {
|
|
8
|
+
align: 'left',
|
|
9
|
+
icon: undefined,
|
|
10
|
+
heading: undefined,
|
|
11
|
+
})
|
|
12
|
+
|
|
13
|
+
const hasSlot = useHasSlot()
|
|
14
|
+
|
|
15
|
+
const headerClasses = computed(() => [
|
|
16
|
+
'appearance-none p-4 bg-transparent flex items-center border-none text-left w-full bg-transparent text-gray-800 whitespace-nowrap text-base font-bold leading-5 tracking-normal',
|
|
17
|
+
props.align === 'center' && 'text-center justify-center',
|
|
18
|
+
props.align === 'right' && 'text-right justify-end',
|
|
19
|
+
iconName.value &&
|
|
20
|
+
'text-blue-600! hover:bg-blue_t-200 cursor-pointer focus-visible:outline-dashed focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-blue-500 active:bg-blue_t-300',
|
|
21
|
+
])
|
|
22
|
+
|
|
23
|
+
/* Sending an icon makes the th sortable */
|
|
24
|
+
const iconName = computed(() => props.icon)
|
|
25
|
+
|
|
26
|
+
defineEmits<{
|
|
27
|
+
(e: 'sort'): void
|
|
28
|
+
}>()
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
<template>
|
|
32
|
+
<th class="fds-table-head">
|
|
33
|
+
<button
|
|
34
|
+
v-if="iconName"
|
|
35
|
+
:class="headerClasses"
|
|
36
|
+
@click="$emit('sort')"
|
|
37
|
+
>
|
|
38
|
+
<span v-if="hasSlot"><slot /></span>
|
|
39
|
+
<span v-else>{{ heading }}</span>
|
|
40
|
+
<FdsIcon
|
|
41
|
+
:name="iconName"
|
|
42
|
+
size="24px"
|
|
43
|
+
class="fill-blue-500"
|
|
44
|
+
/>
|
|
45
|
+
</button>
|
|
46
|
+
<div
|
|
47
|
+
v-else
|
|
48
|
+
:class="headerClasses"
|
|
49
|
+
>
|
|
50
|
+
<span v-if="hasSlot"><slot /></span>
|
|
51
|
+
<span v-else>{{ heading }}</span>
|
|
52
|
+
</div>
|
|
53
|
+
</th>
|
|
54
|
+
</template>
|